File failed to load: https://isis.astrogeology.usgs.gov/3.9.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Developer Reference
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 {
67  class ZoomTool : public Tool {
68  Q_OBJECT
69 
70  public:
71  ZoomTool(QWidget *parent);
72  void addTo(QMenu *menu);
73 
77  QString menuName() const {
78  return "&View";
79  }
80 
81  protected slots:
82  void rubberBandComplete();
83 
84  protected:
85  QAction *toolPadAction(ToolPad *toolpad);
86  void updateTool();
87  QWidget *createToolBarWidget(QStackedWidget *parent);
88  void enableRubberBandTool();
89 
90  private slots:
91  void zoomIn2X();
92  void zoomIn4X();
93  void zoomIn8X();
94 
95  void zoomOut2X();
96  void zoomOut4X();
97  void zoomOut8X();
98 
99  void zoomActual();
100  void zoomFit();
101  void zoomFitWidth();
102  void zoomFitHeight();
103  void zoomManual();
104 
105 
106  double setScale(MdiCubeViewport *d, double newScale);
107  double setScale(MdiCubeViewport *d, double newScale, int x, int y);
108  double setScale(MdiCubeViewport *d, double newScale, double samp, double line);
109 
110  private:
111  void zoomBy(double factor);
112 
113  QAction *p_zoomIn2X;
114  QAction *p_zoomIn4X;
115  QAction *p_zoomIn8X;
116 
117  QAction *p_zoomOut2X;
118  QAction *p_zoomOut4X;
119  QAction *p_zoomOut8X;
120 
121  QAction *p_zoomActual;
122  QAction *p_zoomFit;
123 
124  QLineEdit *p_zoomLineEdit;
125  double p_lastScale;
126  };
127 };
128 
129 #endif
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:53
void updateTool()
This method updates the line edits text to the correct zoom value.
Definition: ZoomTool.cpp:482
Handles zoom operations for Isis qt apps.
Definition: ZoomTool.h:67
QString menuName() const
Definition: ZoomTool.h:77
ZoomTool(QWidget *parent)
ZoomTool constructor.
Definition: ZoomTool.cpp:51
void addTo(QMenu *menu)
Adds the zoom action to the given menu.
Definition: ZoomTool.cpp:128
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition: ZoomTool.cpp:601
void rubberBandComplete()
This method is called when the RubberBandTool is complete.
Definition: ZoomTool.cpp:507
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Base class for the Qisis tools.
Definition: Tool.h:81
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget to add to the tool bar.
Definition: ZoomTool.cpp:154
QAction * toolPadAction(ToolPad *toolpad)
Adds the action to the toolpad.
Definition: ZoomTool.cpp:107
Definition: ToolPad.h:14

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 USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/12/2023 23:32:49