Isis 3.0
Back | Home
Isis::Tool Class Reference

Base class for the Qisis tools. More...

#include <Tool.h>

Inherits QObject.

Inherited by Isis::AbstractPlotTool, Isis::AdvancedTrackTool, Isis::BandTool, Isis::BlinkTool, Isis::EditTool, Isis::FeatureNomenclatureTool, Isis::FileTool, Isis::FindTool, Isis::HelpTool, Isis::IpceTool, Isis::MatchTool, Isis::MeasureTool, Isis::PanTool, Isis::QnetNavTool, Isis::QnetTool, Isis::RubberBandTool, Isis::ScatterPlotTool, Isis::SpecialPixelTool, Isis::StatisticsTool, Isis::StretchTool, Isis::SunShadowTool, Isis::TrackTool, Isis::WindowTool, and Isis::ZoomTool.

Public Slots

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

Signals

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

Public Member Functions

 Tool (QWidget *parent)
 Tool constructor. More...
 
void addTo (ViewportMainWindow *mw)
 Adds the tool to the application. More...
 
void addTo (ToolPad *toolpad)
 Adds the tool to the toolpad. More...
 
virtual QString menuName () const
 Anytime a tool is created, you must give it a name for the menu. More...
 
virtual void addTo (QMenu *menu)
 
virtual void addToPermanent (QToolBar *toolbar)
 
void addToActive (QToolBar *toolbar)
 
virtual void addTo (Workspace *ws)
 Adds the given workspace to the cubeviewport list. More...
 
QString toolIconDir () const
 returns the path to the icon directory. More...
 
virtual void paintViewport (MdiCubeViewport *vp, QPainter *painter)
 
RubberBandToolrubberBandTool ()
 
void setList (ToolList *currentList)
 

Protected Types

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

Protected Slots

virtual void rubberBandComplete ()
 
virtual void screenPixelsChanged ()
 This is called when actions change which pixels from the cube are displayed. More...
 
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. More...
 
virtual void updateMeasure ()
 
virtual void scaleChanged ()
 
virtual void stretchRequested (MdiCubeViewport *, int)
 
void registerTool (MdiCubeViewport *viewport)
 Registers the tool to the viewport. More...
 

Protected Member Functions

MdiCubeViewportcubeViewport () const
 Return the current cubeviewport. More...
 
CubeViewportListcubeViewportList () const
 Return the list of cubeviewports. More...
 
virtual QActiontoolPadAction (ToolPad *toolpad)
 Anytime a tool is created, you must setup a tool pad action with it. More...
 
virtual QWidgetcreateToolBarWidget (QStackedWidget *parent)
 Anytime a tool is created, you must add it to the tool bar. More...
 
virtual void addConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must add the connections for it. More...
 
virtual void removeConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must be able to remove it's connections. More...
 
virtual void enableRubberBandTool ()
 Anytime a tool is created, you may use the rubber band tool. More...
 
Workspaceworkspace ()
 

Detailed Description

Base class for the Qisis tools.

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

Member Typedef Documentation

A list of cubeviewports.

Constructor & Destructor Documentation

Isis::Tool::Tool ( QWidget parent)

Tool constructor.

Parameters
parent

References Isis::FileName::expanded().

Member Function Documentation

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

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

Parameters
cvp

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

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

Adds the tool to the toolpad.

Parameters
toolpad

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

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

Adds the given workspace to the cubeviewport list.

Parameters
ws

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

References registerTool(), and setCubeViewport().

void Isis::Tool::addToActive ( QToolBar toolbar)
virtual void Isis::Tool::addToPermanent ( QToolBar toolbar)
inlinevirtual
void Isis::Tool::clearWarningSignal ( )
signal
virtual QWidget* Isis::Tool::createToolBarWidget ( QStackedWidget *  parent)
inlineprotectedvirtual
MdiCubeViewport* Isis::Tool::cubeViewport ( ) const
inlineprotected

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::IpceTool::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::ZoomTool::rubberBandComplete(), Isis::StereoTool::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::BandTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::AbstractPlotTool::updateTool(), Isis::ZoomTool::updateTool(), Isis::FileTool::updateTool(), Isis::EditTool::updateTool(), Isis::FindTool::updateTool(), Isis::StretchTool::updateTool(), and Isis::AbstractPlotTool::viewportsToPlot().

void Isis::Tool::enableRubberBandTool ( )
protectedvirtual

Anytime a tool is created, you may use the rubber band tool.

Enable the use of the rubberband tool.

Reimplemented in Isis::RubberBandTool, Isis::ZoomTool, Isis::MeasureTool, Isis::StereoTool, Isis::SpatialPlotTool, Isis::SpectralPlotTool, and Isis::HistogramTool.

References Isis::RubberBandTool::disable(), and rubberBandTool().

virtual QString Isis::Tool::menuName ( ) const
inlinevirtual
void Isis::Tool::mouseButtonPress ( QPoint  p,
Qt::MouseButton  s 
)
protectedvirtualslot
Parameters
p
s

References clearWarningSignal().

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

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 clearWarningSignal().

Referenced by Isis::StretchTool::mouseButtonRelease().

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

References clearWarningSignal().

virtual void Isis::Tool::mouseEnter ( )
inlineprotectedvirtualslot
virtual void Isis::Tool::mouseLeave ( )
inlineprotectedvirtualslot
void Isis::Tool::mouseMove ( QPoint  p)
protectedvirtualslot
Parameters
p
virtual void Isis::Tool::mouseMove ( QPoint  p,
Qt::MouseButton   
)
inlineprotectedvirtualslot
virtual void Isis::Tool::paintViewport ( MdiCubeViewport vp,
QPainter *  painter 
)
inlinevirtual
void Isis::Tool::registerTool ( MdiCubeViewport viewport)
protectedslot

Registers the tool to the viewport.

Parameters
viewport

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

Referenced by addTo().

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

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.

virtual void Isis::Tool::rubberBandComplete ( )
inlineprotectedvirtualslot
virtual void Isis::Tool::scaleChanged ( )
inlineprotectedvirtualslot

Reimplemented in Isis::RubberBandTool.

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

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

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

Sets the current viewport to the given cvp.

Parameters
cvp

References updateTool(), and viewportChanged().

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

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

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

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

Reimplemented in Isis::StretchTool.

Referenced by registerTool().

virtual QAction* Isis::Tool::toolPadAction ( ToolPad toolpad)
inlineprotectedvirtual
virtual void Isis::Tool::updateMeasure ( )
inlineprotectedvirtualslot
Workspace * Isis::Tool::workspace ( )
protected

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

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:47:05