Isis 3.0 Programmer Reference
Back | Home
ZoomTool.h
Go to the documentation of this file.
1 #ifndef ZoomTool_h
2 #define ZoomTool_h
3 
25 // This should be the only include in this file!
26 #include "Tool.h"
27 
28 // FIXME: remove this include
29 #include <QCursor>
30 
31 class QAction;
32 class QLineEdit;
33 
34 namespace Isis {
65  class ZoomTool : public Tool {
66  Q_OBJECT
67 
68  public:
69  ZoomTool(QWidget *parent);
70  void addTo(QMenu *menu);
71 
73  QString menuName() const {
74  return "&View";
75  }
76 
77  protected slots:
78  void rubberBandComplete();
79 
80  protected:
81  QAction *toolPadAction(ToolPad *toolpad);
82  void updateTool();
83  QWidget *createToolBarWidget(QStackedWidget *parent);
84  void enableRubberBandTool();
85 
86  private slots:
87  void zoomIn2X();
88  void zoomIn4X();
89  void zoomIn8X();
90 
91  void zoomOut2X();
92  void zoomOut4X();
93  void zoomOut8X();
94 
95  void zoomActual();
96  void zoomFit();
97  void zoomFitWidth();
98  void zoomFitHeight();
99  void zoomManual();
100 
101 
102  double setScale(MdiCubeViewport *d, double newScale);
103  double setScale(MdiCubeViewport *d, double newScale, int x, int y);
104  double setScale(MdiCubeViewport *d, double newScale, double samp, double line);
105 
106  private:
107  void zoomBy(double factor);
108 
112 
116 
119 
120  QLineEdit *p_zoomLineEdit;
121  double p_lastScale;
122  };
123 };
124 
125 #endif
126 
Cube display widget for certain Isis MDI applications.
QAction * p_zoomActual
Zoom to actual size action.
Definition: ZoomTool.h:117
QAction * p_zoomIn8X
Zoom in 8 times.
Definition: ZoomTool.h:111
void zoomFit()
Fits the cube in the viewport.
Definition: ZoomTool.cpp:376
void updateTool()
This method updates the line edits text to the correct zoom value.
Definition: ZoomTool.cpp:478
QAction * p_zoomOut8X
Zoom out 8 times.
Definition: ZoomTool.h:115
QAction * p_zoomFit
Fit the cube in the viewport action.
Definition: ZoomTool.h:118
void zoomManual()
This method zooms by the value input in the line edit next to the zoom tools.
Definition: ZoomTool.cpp:454
void zoomIn2X()
Zooms in 2 times.
Definition: ZoomTool.cpp:268
QAction * p_zoomOut4X
Zoom out 4 times.
Definition: ZoomTool.h:114
Handles zoom operations for Isis qt apps.
Definition: ZoomTool.h:65
QLineEdit * p_zoomLineEdit
Line edit for manual zoom factor.
Definition: ZoomTool.h:120
void zoomOut2X()
Zoom out 2 times.
Definition: ZoomTool.cpp:295
void zoomIn8X()
Zooms in 8 times.
Definition: ZoomTool.cpp:286
QAction * p_zoomOut2X
Zoom out 2 times.
Definition: ZoomTool.h:113
void zoomFitHeight()
Slot for the &quot;Fit to Heighth&quot; menu item on the Fit button.
Definition: ZoomTool.cpp:428
ZoomTool(QWidget *parent)
ZoomTool constructor.
Definition: ZoomTool.cpp:50
void addTo(QMenu *menu)
Adds the zoom action to the given menu.
Definition: ZoomTool.cpp:127
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition: ZoomTool.cpp:597
void zoomOut4X()
Zoom out 4 times.
Definition: ZoomTool.cpp:304
void rubberBandComplete()
This method is called when the RubberBandTool is complete.
Definition: ZoomTool.cpp:503
void zoomActual()
Zoom back to 1 to 1.
Definition: ZoomTool.cpp:322
void zoomBy(double factor)
Zoom by the given factor.
Definition: ZoomTool.cpp:340
QAction * p_zoomIn4X
Zoom in 4 times.
Definition: ZoomTool.h:110
Base class for the Qisis tools.
Definition: Tool.h:81
void zoomFitWidth()
Slot for the &quot;Fit to Width&quot; menu item on the Fit button.
Definition: ZoomTool.cpp:402
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget to add to the tool bar.
Definition: ZoomTool.cpp:153
QAction * toolPadAction(ToolPad *toolpad)
Adds the action to the toolpad.
Definition: ZoomTool.cpp:106
void zoomOut8X()
Zoom out 8 times.
Definition: ZoomTool.cpp:313
double setScale(MdiCubeViewport *d, double newScale)
This method will attempt to reset the scale for the given MdiCubeViewport using the new scale value...
Definition: ZoomTool.cpp:621
void zoomIn4X()
Zooms in 4 times.
Definition: ZoomTool.cpp:277
QAction * p_zoomIn2X
Zoom in 2 times.
Definition: ZoomTool.h:109
QString menuName() const
Returns the name of the menu.
Definition: ZoomTool.h:73

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:31:55