Isis Developer Reference
ZoomTool.h
Go to the documentation of this file.
1#ifndef ZoomTool_h
2#define ZoomTool_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12
13
14// This should be the only include in this file!
15#include "Tool.h"
16
17// FIXME: remove this include
18#include <QCursor>
19
20class QAction;
21class QLineEdit;
22
23namespace Isis {
56 class ZoomTool : public Tool {
57 Q_OBJECT
58
59 public:
60 ZoomTool(QWidget *parent);
61 void addTo(QMenu *menu);
62
66 QString menuName() const {
67 return "&View";
68 }
69
70 protected slots:
71 void rubberBandComplete();
72
73 protected:
74 QAction *toolPadAction(ToolPad *toolpad);
75 void updateTool();
76 QWidget *createToolBarWidget(QStackedWidget *parent);
78
79 private slots:
80 void zoomIn2X();
81 void zoomIn4X();
82 void zoomIn8X();
83
84 void zoomOut2X();
85 void zoomOut4X();
86 void zoomOut8X();
87
88 void zoomActual();
89 void zoomFit();
90 void zoomFitWidth();
91 void zoomFitHeight();
92 void zoomManual();
93
94
95 double setScale(MdiCubeViewport *d, double newScale);
96 double setScale(MdiCubeViewport *d, double newScale, int x, int y);
97 double setScale(MdiCubeViewport *d, double newScale, double samp, double line);
98
99 private:
100 void zoomBy(double factor);
101
102 QAction *p_zoomIn2X;
103 QAction *p_zoomIn4X;
104 QAction *p_zoomIn8X;
105
106 QAction *p_zoomOut2X;
107 QAction *p_zoomOut4X;
108 QAction *p_zoomOut8X;
109
110 QAction *p_zoomActual;
111 QAction *p_zoomFit;
112
113 QLineEdit *p_zoomLineEdit;
114 double p_lastScale;
115 };
116};
117
118#endif
Cube display widget for certain Isis MDI applications.
Definition MdiCubeViewport.h:39
Base class for the Qisis tools.
Definition Tool.h:67
Definition ToolPad.h:14
Handles zoom operations for Isis qt apps.
Definition ZoomTool.h:56
void updateTool()
This method updates the line edits text to the correct zoom value.
Definition ZoomTool.cpp:471
void rubberBandComplete()
This method is called when the RubberBandTool is complete.
Definition ZoomTool.cpp:496
ZoomTool(QWidget *parent)
ZoomTool constructor.
Definition ZoomTool.cpp:40
void addTo(QMenu *menu)
Adds the zoom action to the given menu.
Definition ZoomTool.cpp:117
QAction * toolPadAction(ToolPad *toolpad)
Adds the action to the toolpad.
Definition ZoomTool.cpp:96
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition ZoomTool.cpp:590
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget to add to the tool bar.
Definition ZoomTool.cpp:143
QString menuName() const
Definition ZoomTool.h:66
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16