USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::ZoomTool Class Reference

Handles zoom operations for Isis qt apps. More...

#include <ZoomTool.h>

Inherits Isis::Tool.

Public Slots

void activate (bool)
 Activates the tool.
void setCubeViewport (MdiCubeViewport *cvp)
 Sets the current viewport to the given cvp.

Signals

void clearWarningSignal ()
void toolActivated ()
void viewportChanged ()

Public Member Functions

 ZoomTool (QWidget *parent)
 ZoomTool constructor.
void addTo (QMenu *menu)
 Adds the zoom action to the given menu.
QString menuName () const
 Returns the name of the menu.
void addTo (ViewportMainWindow *mw)
 Adds the tool to the application.
void addTo (ToolPad *toolpad)
 Adds the tool to the toolpad.
virtual void addTo (Workspace *ws)
 Adds the given workspace to the cubeviewport list.
virtual void addToPermanent (QToolBar *toolbar)
void addToActive (QToolBar *toolbar)
QString toolIconDir () const
 returns the path to the icon directory.
virtual void paintViewport (MdiCubeViewport *vp, QPainter *painter)
RubberBandToolrubberBandTool ()
void setList (ToolList *currentList)

Protected Types

typedef QVector
< MdiCubeViewport * > 
CubeViewportList
 A list of cubeviewports.

Protected Slots

void rubberBandComplete ()
 This method is called when the RubberBandTool is complete.
virtual void screenPixelsChanged ()
 This is called when actions change which pixels from the cube are displayed.
virtual void mouseEnter ()
virtual void mouseMove (QPoint p)
virtual void mouseMove (QPoint p, Qt::MouseButton)
virtual void mouseLeave ()
virtual void mouseDoubleClick (QPoint p)
virtual void mouseButtonPress (QPoint p, Qt::MouseButton s)
virtual void mouseButtonRelease (QPoint p, Qt::MouseButton s)
 Resets the Warning to Nowarning when a different activity occurs on the application.
virtual void updateMeasure ()
virtual void scaleChanged ()
virtual void stretchRequested (MdiCubeViewport *, int)
void registerTool (MdiCubeViewport *viewport)
 Registers the tool to the viewport.

Protected Member Functions

QActiontoolPadAction (ToolPad *toolpad)
 Adds the action to the toolpad.
void updateTool ()
 This method updates the line edits text to the correct zoom value.
QWidgetcreateToolBarWidget (QStackedWidget *parent)
 Creates the widget to add to the tool bar.
void enableRubberBandTool ()
 This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow all clicks.
MdiCubeViewportcubeViewport () const
 Return the current cubeviewport.
CubeViewportListcubeViewportList () const
 Return the list of cubeviewports.
virtual void addConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must add the connections for it.
virtual void removeConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must be able to remove it's connections.
Workspaceworkspace ()

Detailed Description

Handles zoom operations for Isis qt apps.

Author
????-??-?? Jeff Anderson - ???

Member Typedef Documentation

typedef QVector< MdiCubeViewport * > Isis::Tool::CubeViewportList
protectedinherited

A list of cubeviewports.

Constructor & Destructor Documentation

Isis::ZoomTool::ZoomTool ( QWidget parent)

ZoomTool constructor.

Parameters
parentParent widget

References Isis::Tool::toolIconDir().

Member Function Documentation

virtual void Isis::Tool::addConnections ( MdiCubeViewport cvp)
inlineprotectedvirtualinherited

Anytime a tool is created, you must add the connections for it.

Parameters
cvp

Reimplemented in Isis::TrackTool, and Isis::WindowTool.

void Isis::ZoomTool::addTo ( QMenu *  menu)
virtual

Adds the zoom action to the given menu.

This will include the Zoom In (by factor of 2), Zoom Out (by factor of 1/2), Zoom Actual (1:1) and Zoom Fit actions.

Parameters
menuPointer to the QMenu

Reimplemented from Isis::Tool.

void Isis::Tool::addTo ( ToolPad toolpad)
inherited

Adds the tool to the toolpad.

Parameters
toolpad

References Isis::Tool::activate(), Isis::ToolPad::addAction(), and Isis::Tool::toolPadAction().

void Isis::Tool::addTo ( Workspace ws)
virtualinherited

Adds the given workspace to the cubeviewport list.

Parameters
ws

Reimplemented in Isis::EditTool, Isis::FileTool, Isis::SpecialPixelTool, and Isis::WindowTool.

References Isis::Tool::registerTool(), and Isis::Tool::setCubeViewport().

void Isis::Tool::addToActive ( QToolBar toolbar)
inherited
virtual void Isis::Tool::addToPermanent ( QToolBar toolbar)
inlinevirtualinherited
void Isis::Tool::clearWarningSignal ( )
signalinherited
QWidget * Isis::ZoomTool::createToolBarWidget ( QStackedWidget *  parent)
protectedvirtual

Creates the widget to add to the tool bar.

For each button, this method assigns the icons, ToolTips, WhatsThis, and connects a slot to the clicked signal. The following buttons are included

  • Zoom In - uses the magnifying glass with "+" icon and shortcut +
  • Zoom Out - uses the magnifying glass with "-" icon and shortcut -
  • Zoom 1:1 - uses the magnifying glass with "1:1" icon and shortcut /
  • Fit in viewport - uses the magnifying glass with "dotted square" icon, shortcut * and drop down menu to choose to "Fit Width" or "Fit Height"
  • Scale - Text box to manually enter scale
Parameters
parentParent stacked widget
Returns
QWidget* Horizontal box to which the zoom tools icons will be added

Reimplemented from Isis::Tool.

References Isis::Tool::toolIconDir().

MdiCubeViewport* Isis::Tool::cubeViewport ( ) const
inlineprotectedinherited

Return the current cubeviewport.

Returns
CubeViewport*

Referenced by Isis::WindowTool::addConnections(), Isis::TrackTool::addConnections(), Isis::FileTool::discard(), Isis::FileTool::exportView(), Isis::SunShadowTool::mouseButtonPress(), Isis::PanTool::mouseButtonRelease(), Isis::RubberBandTool::mouseButtonRelease(), Isis::EditTool::mouseButtonRelease(), Isis::FeatureNomenclatureTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::StretchTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::AdvancedTrackTool::mouseLeave(), Isis::ScatterPlotTool::mouseMove(), Isis::SunShadowTool::mouseMove(), Isis::TrackTool::mouseMove(), Isis::RubberBandTool::mouseMove(), Isis::SunShadowTool::paintViewport(), Isis::RubberBandTool::paintViewport(), Isis::FindTool::paintViewport(), Isis::FileTool::print(), Isis::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::WindowTool::removeConnections(), Isis::TrackTool::removeConnections(), Isis::HistogramTool::rubberBandComplete(), Isis::MeasureTool::rubberBandComplete(), Isis::StereoTool::rubberBandComplete(), rubberBandComplete(), Isis::EditTool::rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAs(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveInfo(), Isis::ScatterPlotTool::showNewScatterPlotConfig(), Isis::StretchTool::stretchGlobal(), Isis::StretchTool::stretchGlobalAllBands(), Isis::StretchTool::stretchRegional(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), Isis::MeasureTool::updateMeasure(), Isis::WindowTool::updateTool(), Isis::BlinkTool::updateTool(), Isis::SpecialPixelTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::BandTool::updateTool(), Isis::AbstractPlotTool::updateTool(), updateTool(), Isis::FileTool::updateTool(), Isis::EditTool::updateTool(), Isis::FindTool::updateTool(), Isis::StretchTool::updateTool(), and Isis::AbstractPlotTool::viewportsToPlot().

void Isis::ZoomTool::enableRubberBandTool ( )
protectedvirtual
QString Isis::ZoomTool::menuName ( ) const
inlinevirtual

Returns the name of the menu.

Reimplemented from Isis::Tool.

void Isis::Tool::mouseButtonPress ( QPoint  p,
Qt::MouseButton  s 
)
protectedvirtualslotinherited
Parameters
p
s

References Isis::Tool::clearWarningSignal().

void Isis::Tool::mouseButtonRelease ( QPoint  p,
Qt::MouseButton  s 
)
protectedvirtualslotinherited

Resets the Warning to Nowarning when a different activity occurs on the application.

This is called by all the mouseButtonRelease events in all the tools.

Parameters
p
s

Reimplemented in Isis::FeatureNomenclatureTool.

References Isis::Tool::clearWarningSignal().

void Isis::Tool::mouseDoubleClick ( QPoint  p)
protectedvirtualslotinherited
Parameters
p

References Isis::Tool::clearWarningSignal().

virtual void Isis::Tool::mouseEnter ( )
inlineprotectedvirtualslotinherited
virtual void Isis::Tool::mouseLeave ( )
inlineprotectedvirtualslotinherited
void Isis::Tool::mouseMove ( QPoint  p)
protectedvirtualslotinherited
Parameters
p
virtual void Isis::Tool::mouseMove ( QPoint  p,
Qt::MouseButton   
)
inlineprotectedvirtualslotinherited
virtual void Isis::Tool::paintViewport ( MdiCubeViewport vp,
QPainter *  painter 
)
inlinevirtualinherited
void Isis::Tool::registerTool ( MdiCubeViewport viewport)
protectedslotinherited

Registers the tool to the viewport.

Parameters
viewport

References Isis::MdiCubeViewport::registerTool(), and Isis::Tool::stretchRequested().

Referenced by Isis::Tool::addTo().

virtual void Isis::Tool::removeConnections ( MdiCubeViewport cvp)
inlineprotectedvirtualinherited

Anytime a tool is created, you must be able to remove it's connections.

Parameters
cvp

Reimplemented in Isis::MeasureTool, Isis::TrackTool, and Isis::WindowTool.

void Isis::ZoomTool::rubberBandComplete ( )
protectedslot

This method is called when the RubberBandTool is complete.

It will either zoom the CubeViewport to the rectangle specified by the RubberBandTool or will handle different zoom methods specified by the last RubberBandTool's mouse button.

References Isis::Tool::cubeViewport(), Isis::Tool::cubeViewportList(), Isis::MdiCubeViewport::isLinked(), Isis::RubberBandTool::rectangle(), Isis::Tool::rubberBandTool(), Isis::CubeViewport::scale(), updateTool(), and Isis::RubberBandTool::vertices().

virtual void Isis::Tool::scaleChanged ( )
inlineprotectedvirtualslotinherited

Reimplemented in Isis::RubberBandTool.

virtual void Isis::Tool::screenPixelsChanged ( )
inlineprotectedvirtualslotinherited

This is called when actions change which pixels from the cube are displayed.

void Isis::Tool::setCubeViewport ( MdiCubeViewport cvp)
slotinherited

Sets the current viewport to the given cvp.

Parameters
cvp

References Isis::Tool::updateTool(), and Isis::Tool::viewportChanged().

Referenced by Isis::Tool::addTo(), and Isis::FileTool::closeAll().

void Isis::Tool::setList ( ToolList currentList)
inherited

Referenced by Isis::ToolList::append().

virtual void Isis::Tool::stretchRequested ( MdiCubeViewport ,
int   
)
inlineprotectedvirtualslotinherited

Reimplemented in Isis::StretchTool.

Referenced by Isis::Tool::registerTool().

QAction * Isis::ZoomTool::toolPadAction ( ToolPad toolpad)
protectedvirtual

Adds the action to the toolpad.

The icon used will be the magnifying glass. The tool tip reads "Zoom (Z)" with shortcut key "Z".

Parameters
toolpadToolpad to which the zoom tool will be added
Returns
QAction* ZoomTool action defined by the cursor, ToolTip,

Reimplemented from Isis::Tool.

References Isis::Tool::toolIconDir().

virtual void Isis::Tool::updateMeasure ( )
inlineprotectedvirtualslotinherited
void Isis::ZoomTool::updateTool ( )
protectedvirtual

This method updates the line edits text to the correct zoom value.

Reimplemented from Isis::Tool.

References Isis::Tool::cubeViewport(), and Isis::CubeViewport::scale().

Referenced by rubberBandComplete().

Workspace * Isis::Tool::workspace ( )
protectedinherited

The documentation for this class was generated from the following files: