Isis 3 Programmer Reference
MosaicZoomTool.h
1#ifndef MosaicZoomTool_h
2#define MosaicZoomTool_h
3
4#include "MosaicTool.h"
5
6#include <QPointer>
7
8class QAction;
9class QDoubleSpinBox;
10class QGraphicsSceneMouseEvent;
11class QLineEdit;
12class QRect;
13
14namespace Isis {
26 class MosaicZoomTool : public MosaicTool {
27 Q_OBJECT
28
29 public:
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
This widget encompasses the entire mosaic scene.
Base class for the MosaicTools.
Definition MosaicTool.h:37
Handles zoom operations for Isis qt apps.
MosaicZoomTool(MosaicSceneWidget *)
MosaicZoomTool constructor.
void updateTool()
This method updates the line edits text to the correct zoom value.
QLineEdit * p_zoomLineEdit
Line edit for manual zoom factor.
QWidget * getToolBarWidget()
Creates the widget to add to the tool bar.
void rubberBandComplete(QRectF r, Qt::MouseButton s)
This method is called when the RubberBandTool is complete.
void zoomFitHeight()
Slot for the "Fit to Heighth" menu item on the Fit button.
void zoomOut2X(QPointF center=QPointF())
Zoom out 2 times.
QAction * getPrimaryAction()
This method returns an action that is used to activate this tool.
void zoomFit()
Fits the in the graphics view.
void zoomFitWidth()
Slot for the "Fit to Width" menu item on the Fit button.
void zoomActual(QPointF center=QPointF())
Zoom back to 1 to 1.
void zoomManual()
This method zooms by the value input in the line edit next to the zoom tools.
void zoomIn2X(QPointF center=QPointF())
Zooms in 2 times.
void updateResolutionBox()
Updates the text in the screen resolution display box to the current screen resolution,...
void zoomBy(double factor, QPointF center=QPointF())
Zoom IN by the given factor.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16