Isis 3 Programmer Reference
ZoomTool.h
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
105
109
112
113 QLineEdit *p_zoomLineEdit;
114 double p_lastScale;
115 };
116};
117
118#endif
Cube display widget for certain Isis MDI applications.
Base class for the Qisis tools.
Definition Tool.h:67
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
QAction * p_zoomIn8X
Zoom in 8 times.
Definition ZoomTool.h:104
void zoomFitHeight()
Slot for the "Fit to Heighth" menu item on the Fit button.
Definition ZoomTool.cpp:420
QAction * p_zoomOut4X
Zoom out 4 times.
Definition ZoomTool.h:107
void zoomOut8X()
Zoom out 8 times.
Definition ZoomTool.cpp:303
void zoomIn2X()
Zooms in 2 times.
Definition ZoomTool.cpp:258
QAction * p_zoomOut2X
Zoom out 2 times.
Definition ZoomTool.h:106
double p_lastScale
Last scale.
Definition ZoomTool.h:114
void addTo(QMenu *menu)
Adds the zoom action to the given menu.
Definition ZoomTool.cpp:117
QAction * p_zoomFit
Fit the cube in the viewport action.
Definition ZoomTool.h:111
void zoomFitWidth()
Slot for the "Fit to Width" menu item on the Fit button.
Definition ZoomTool.cpp:394
void zoomIn8X()
Zooms in 8 times.
Definition ZoomTool.cpp:276
void zoomOut2X()
Zoom out 2 times.
Definition ZoomTool.cpp:285
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:614
QAction * p_zoomIn4X
Zoom in 4 times.
Definition ZoomTool.h:103
void zoomBy(double factor)
Zoom by the given factor.
Definition ZoomTool.cpp:330
QAction * p_zoomIn2X
Zoom in 2 times.
Definition ZoomTool.h:102
QAction * toolPadAction(ToolPad *toolpad)
Adds the action to the toolpad.
Definition ZoomTool.cpp:96
QAction * p_zoomActual
Zoom to actual size action.
Definition ZoomTool.h:110
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition ZoomTool.cpp:590
void zoomActual()
Zoom back to 1 to 1.
Definition ZoomTool.cpp:312
void zoomFit()
Fits the cube in the viewport.
Definition ZoomTool.cpp:368
void zoomManual()
This method zooms by the value input in the line edit next to the zoom tools.
Definition ZoomTool.cpp:447
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget to add to the tool bar.
Definition ZoomTool.cpp:143
QAction * p_zoomOut8X
Zoom out 8 times.
Definition ZoomTool.h:108
void zoomIn4X()
Zooms in 4 times.
Definition ZoomTool.cpp:267
void zoomOut4X()
Zoom out 4 times.
Definition ZoomTool.cpp:294
QLineEdit * p_zoomLineEdit
Line edit for manual zoom factor.
Definition ZoomTool.h:113
QString menuName() const
Definition ZoomTool.h:66
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16