USGS

Isis 3.0 Object Programmers' Reference

Home

MosaicZoomTool.h
1 #ifndef MosaicZoomTool_h
2 #define MosaicZoomTool_h
3 
4 #include "MosaicTool.h"
5 
6 #include <QPointer>
7 
8 class QAction;
9 class QDoubleSpinBox;
10 class QGraphicsSceneMouseEvent;
11 class QLineEdit;
12 class QRect;
13 
14 namespace Isis {
26  class MosaicZoomTool : public MosaicTool {
27  Q_OBJECT
28 
29  public:
31  void updateResolutionBox();
32 
33  QList<QAction *> getViewActions();
34 
35  protected slots:
36  void updateTool();
37 
38  protected:
41  void mouseButtonRelease(QPointF, Qt::MouseButton s);
42  void mouseWheel(QPointF, int);
43  void rubberBandComplete(QRectF r, Qt::MouseButton s);
44 
45  public slots:
46  void zoomIn2X(QPointF center = QPointF());
47  void zoomOut2X(QPointF center = QPointF());
48 
49  void zoomActual(QPointF center = QPointF());
50  void zoomFit();
51  void zoomFitWidth();
52  void zoomFitHeight();
53  void zoomManual();
54 
55  private:
56  double limitZoomBy(double factor);
57  void zoomBy(double factor, QPointF center = QPointF());
58  QLineEdit *p_zoomLineEdit;
59  QDoubleSpinBox *p_scaleBox;
60  double p_screenResolution;
61 
62  QPointer<QAction> m_zoomInAction;
63  QPointer<QAction> m_zoomOutAction;
64  QPointer<QAction> m_zoomFitAction;
65  };
66 };
67 
68 #endif
69