Isis 3 Programmer Reference
|
Handles zoom operations for Isis qt apps. More...
#include <MosaicZoomTool.h>
Public Slots | |
void | zoomIn2X (QPointF center=QPointF()) |
Zooms in 2 times. More... | |
void | zoomOut2X (QPointF center=QPointF()) |
Zoom out 2 times. More... | |
void | zoomActual (QPointF center=QPointF()) |
Zoom back to 1 to 1. More... | |
void | zoomFit () |
Fits the in the graphics view. More... | |
void | zoomFitWidth () |
Slot for the "Fit to Width" menu item on the Fit button. More... | |
void | zoomFitHeight () |
Slot for the "Fit to Heighth" menu item on the Fit button. More... | |
void | zoomManual () |
This method zooms by the value input in the line edit next to the zoom tools. More... | |
void | activate (bool) |
Activates the tool. More... | |
Signals | |
void | activated (bool) |
Public Member Functions | |
MosaicZoomTool (MosaicSceneWidget *) | |
MosaicZoomTool constructor. More... | |
void | updateResolutionBox () |
Updates the text in the screen resolution display box to the current screen resolution, in meters per pixel. More... | |
QList< QAction * > | getViewActions () |
bool | isActive () const |
Returns the activeness of this toool. More... | |
QPixmap | getIcon (QString iconName) const |
returns the path to the icon directory. More... | |
virtual void | addTo (QMenu *menu) |
virtual void | addTo (ToolPad *toolPad) |
virtual void | addTo (QToolBar *toolBar) |
virtual PvlObject | toPvl () const |
virtual void | fromPvl (const PvlObject &obj) |
virtual QString | projectPvlObjectName () const |
Protected Slots | |
void | updateTool () |
This method updates the line edits text to the correct zoom value. More... | |
Protected Member Functions | |
QAction * | getPrimaryAction () |
This method returns an action that is used to activate this tool. More... | |
QWidget * | getToolBarWidget () |
Creates the widget to add to the tool bar. More... | |
void | mouseButtonRelease (QPointF, Qt::MouseButton s) |
void | mouseWheel (QPointF, int) |
void | rubberBandComplete (QRectF r, Qt::MouseButton s) |
This method is called when the RubberBandTool is complete. More... | |
virtual void | mouseEnter () |
virtual void | mouseMove (QPointF) |
virtual void | mouseLeave () |
virtual void | mouseDoubleClick (QPointF) |
virtual void | mouseButtonPress (QPointF, Qt::MouseButton s) |
void | toolBarDestroyed (QObject *obj) |
MosaicSceneWidget * | getWidget () |
Private Member Functions | |
double | limitZoomBy (double factor) |
void | zoomBy (double factor, QPointF center=QPointF()) |
Zoom IN by the given factor. More... | |
Private Attributes | |
QLineEdit * | p_zoomLineEdit |
Line edit for manual zoom factor. More... | |
QDoubleSpinBox * | p_scaleBox |
double | p_screenResolution |
QPointer< QAction > | m_zoomInAction |
QPointer< QAction > | m_zoomOutAction |
QPointer< QAction > | m_zoomFitAction |
Handles zoom operations for Isis qt apps.
2011-09-27 Steven Lambright - Improved user documentation
2011-11-04 Steven Lambright - Mouse wheel improved
Definition at line 26 of file MosaicZoomTool.h.
Isis::MosaicZoomTool::MosaicZoomTool | ( | MosaicSceneWidget * | scene | ) |
MosaicZoomTool constructor.
parent |
Definition at line 27 of file MosaicZoomTool.cpp.
References Isis::MosaicTool::getIcon(), zoomFit(), zoomIn2X(), and zoomOut2X().
|
slotinherited |
Activates the tool.
on |
Definition at line 148 of file MosaicTool.cpp.
References Isis::MosaicTool::disableToolBar(), Isis::MosaicTool::enableToolBar(), and Isis::MosaicTool::p_active.
|
inherited |
returns the path to the icon directory.
Definition at line 115 of file MosaicTool.cpp.
References Isis::FileName::expanded().
Referenced by Isis::MosaicSelectTool::getPrimaryAction(), Isis::MosaicPanTool::getPrimaryAction(), getPrimaryAction(), Isis::MosaicAreaTool::getPrimaryAction(), Isis::MosaicFindTool::getPrimaryAction(), Isis::MosaicGridTool::getPrimaryAction(), Isis::MosaicControlNetTool::getPrimaryAction(), and MosaicZoomTool().
|
protectedvirtual |
This method returns an action that is used to activate this tool.
This method will only be called once so it can new the action without a problem.
Implements Isis::MosaicTool.
Definition at line 116 of file MosaicZoomTool.cpp.
References Isis::MosaicTool::getIcon().
|
protectedvirtual |
Creates the widget to add to the tool bar.
parent |
Reimplemented from Isis::MosaicTool.
Definition at line 143 of file MosaicZoomTool.cpp.
References zoomManual().
|
inlineinherited |
Returns the activeness of this toool.
Definition at line 50 of file MosaicTool.h.
References Isis::MosaicTool::p_active.
Referenced by rubberBandComplete(), Isis::MosaicSelectTool::updateTool(), updateTool(), Isis::MosaicFindTool::updateTool(), and Isis::MosaicControlNetTool::updateTool().
|
protectedvirtual |
This method is called when the RubberBandTool is complete.
The view is centered on the center point of the rubberband's rectangle, then zoomed based on the largest side of the rectange. (Width or height.)
Reimplemented from Isis::MosaicTool.
Definition at line 382 of file MosaicZoomTool.cpp.
References Isis::MosaicTool::isActive(), updateResolutionBox(), and zoomBy().
void Isis::MosaicZoomTool::updateResolutionBox | ( | ) |
Updates the text in the screen resolution display box to the current screen resolution, in meters per pixel.
Definition at line 83 of file MosaicZoomTool.cpp.
Referenced by rubberBandComplete(), updateTool(), zoomBy(), and zoomFit().
|
protectedslot |
This method updates the line edits text to the correct zoom value.
Definition at line 359 of file MosaicZoomTool.cpp.
References Isis::MosaicTool::isActive(), and updateResolutionBox().
|
slot |
|
private |
Zoom IN by the given factor.
factor |
Definition at line 295 of file MosaicZoomTool.cpp.
References updateResolutionBox().
Referenced by rubberBandComplete(), zoomActual(), zoomIn2X(), zoomManual(), and zoomOut2X().
|
slot |
Fits the in the graphics view.
Definition at line 312 of file MosaicZoomTool.cpp.
References Isis::MosaicSceneWidget::refit(), and updateResolutionBox().
Referenced by MosaicZoomTool().
|
slot |
Slot for the "Fit to Heighth" menu item on the Fit button.
This will display the cube so that the entire cube heighth is displayed.
Definition at line 332 of file MosaicZoomTool.cpp.
|
slot |
Slot for the "Fit to Width" menu item on the Fit button.
Definition at line 322 of file MosaicZoomTool.cpp.
|
slot |
Zooms in 2 times.
Definition at line 229 of file MosaicZoomTool.cpp.
References zoomBy().
Referenced by MosaicZoomTool().
|
slot |
This method zooms by the value input in the line edit next to the zoom tools.
This method is called when the double spin box value has been changed. First we figure out what we need to scale the graphics view in order to achive the user's desired screen resolution.
Definition at line 346 of file MosaicZoomTool.cpp.
References zoomBy().
Referenced by getToolBarWidget().
|
slot |
Zoom out 2 times.
Definition at line 238 of file MosaicZoomTool.cpp.
References zoomBy().
Referenced by MosaicZoomTool().
|
private |
Line edit for manual zoom factor.
Definition at line 58 of file MosaicZoomTool.h.