USGS

Isis 3.0 Object Programmers' Reference

Home

MosaicZoomTool.h

00001 #ifndef MosaicZoomTool_h
00002 #define MosaicZoomTool_h
00003 
00004 #include "MosaicTool.h"
00005 
00006 #include <QPointer>
00007 
00008 class QAction;
00009 class QDoubleSpinBox;
00010 class QGraphicsSceneMouseEvent;
00011 class QLineEdit;
00012 class QRect;
00013 
00014 namespace Isis {
00026   class MosaicZoomTool : public MosaicTool {
00027       Q_OBJECT
00028 
00029     public:
00030       MosaicZoomTool(MosaicSceneWidget *);
00031       void updateResolutionBox();
00032 
00033       QList<QAction *> getViewActions();
00034 
00035     protected slots:
00036       void updateTool();
00037 
00038     protected:
00039       QAction *getPrimaryAction();
00040       QWidget *getToolBarWidget();
00041       void mouseButtonRelease(QPointF, Qt::MouseButton s);
00042       void mouseWheel(QPointF, int);
00043       void rubberBandComplete(QRectF r, Qt::MouseButton s);
00044 
00045     public slots:
00046       void zoomIn2X(QPointF center = QPointF());
00047       void zoomOut2X(QPointF center = QPointF());
00048 
00049       void zoomActual(QPointF center = QPointF());
00050       void zoomFit();
00051       void zoomFitWidth();
00052       void zoomFitHeight();
00053       void zoomManual();
00054 
00055     private:
00056       double limitZoomBy(double factor);
00057       void zoomBy(double factor, QPointF center = QPointF());
00058       QLineEdit *p_zoomLineEdit; 
00059       QDoubleSpinBox *p_scaleBox;
00060       double p_screenResolution;
00061 
00062       QPointer<QAction> m_zoomInAction;
00063       QPointer<QAction> m_zoomOutAction;
00064       QPointer<QAction> m_zoomFitAction;
00065   };
00066 };
00067 
00068 #endif
00069