Isis Developer Reference
MosaicZoomTool.h
Go to the documentation of this file.
1 #ifndef MosaicZoomTool_h
2 #define MosaicZoomTool_h
3 
4 #include "MosaicTool.h"
5 
6 #include <QPointer>
7 
8 class QAction;
9 class QDoubleSpinBox;
10 class QGraphicsSceneMouseEvent;
11 class QLineEdit;
12 class QRect;
13 
14 namespace Isis {
26  class MosaicZoomTool : public MosaicTool {
27  Q_OBJECT
28 
29  public:
31  void updateResolutionBox();
32 
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 
Isis::MosaicZoomTool::getToolBarWidget
QWidget * getToolBarWidget()
Creates the widget to add to the tool bar.
Definition: MosaicZoomTool.cpp:143
Isis::MosaicSceneWidget::getView
MosaicGraphicsView * getView() const
Definition: MosaicSceneWidget.h:162
Isis::MosaicZoomTool::zoomManual
void zoomManual()
This method zooms by the value input in the line edit next to the zoom tools.
Definition: MosaicZoomTool.cpp:346
QWidget
Isis::MosaicTool::getIcon
QPixmap getIcon(QString iconName) const
returns the path to the icon directory.
Definition: MosaicTool.cpp:115
Isis::MosaicZoomTool::updateTool
void updateTool()
This method updates the line edits text to the correct zoom value.
Definition: MosaicZoomTool.cpp:359
MosaicSceneWidget.h
QList< QAction * >
Isis::MosaicSceneWidget::enableRubberBand
void enableRubberBand(bool)
Definition: MosaicSceneWidget.cpp:496
Isis::MosaicSceneWidget::refit
void refit()
This method refits t:he items in the graphics view.
Definition: MosaicSceneWidget.cpp:1485
Isis::MosaicZoomTool::getPrimaryAction
QAction * getPrimaryAction()
This method returns an action that is used to activate this tool.
Definition: MosaicZoomTool.cpp:116
Isis::MosaicSceneWidget::setCubesSelectable
void setCubesSelectable(bool)
Definition: MosaicSceneWidget.cpp:1499
Isis::MosaicTool::getWidget
MosaicSceneWidget * getWidget()
Definition: MosaicTool.h:96
Isis::MosaicZoomTool::getViewActions
QList< QAction * > getViewActions()
Definition: MosaicZoomTool.cpp:105
Isis::MosaicSceneWidget
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
MosaicZoomTool.h
Isis::MosaicTool
Base class for the MosaicTools.
Definition: MosaicTool.h:37
Isis::MosaicZoomTool::rubberBandComplete
void rubberBandComplete(QRectF r, Qt::MouseButton s)
This method is called when the RubberBandTool is complete.
Definition: MosaicZoomTool.cpp:382
IString.h
Isis::MosaicZoomTool::updateResolutionBox
void updateResolutionBox()
Updates the text in the screen resolution display box to the current screen resolution,...
Definition: MosaicZoomTool.cpp:83
Isis::MosaicZoomTool::mouseButtonRelease
void mouseButtonRelease(QPointF, Qt::MouseButton s)
Definition: MosaicZoomTool.cpp:186
Isis::MosaicZoomTool::MosaicZoomTool
MosaicZoomTool(MosaicSceneWidget *)
MosaicZoomTool constructor.
Definition: MosaicZoomTool.cpp:27
Isis::MosaicZoomTool::zoomFit
void zoomFit()
Fits the in the graphics view.
Definition: MosaicZoomTool.cpp:312
Isis::MosaicZoomTool::zoomFitHeight
void zoomFitHeight()
Slot for the "Fit to Heighth" menu item on the Fit button.
Definition: MosaicZoomTool.cpp:332
Isis::MosaicZoomTool::mouseWheel
void mouseWheel(QPointF, int)
Definition: MosaicZoomTool.cpp:197
MosaicGraphicsView.h
Isis::MosaicTool::isActive
bool isActive() const
Returns the activeness of this toool.
Definition: MosaicTool.h:50
Isis::MosaicZoomTool::zoomOut2X
void zoomOut2X(QPointF center=QPointF())
Zoom out 2 times.
Definition: MosaicZoomTool.cpp:238
Projection.h
Isis::MosaicZoomTool::zoomFitWidth
void zoomFitWidth()
Slot for the "Fit to Width" menu item on the Fit button.
Definition: MosaicZoomTool.cpp:322
MosaicTool.h
QAction
Isis::MosaicZoomTool::zoomIn2X
void zoomIn2X(QPointF center=QPointF())
Zooms in 2 times.
Definition: MosaicZoomTool.cpp:229
Isis::MosaicZoomTool
Handles zoom operations for Isis qt apps.
Definition: MosaicZoomTool.h:26
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::MosaicZoomTool::zoomActual
void zoomActual(QPointF center=QPointF())
Zoom back to 1 to 1.
Definition: MosaicZoomTool.cpp:247