USGS

Isis 3.0 Developer's Reference (API)

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::FileTool, Isis::FindTool, Isis::HelpTool, Isis::MeasureTool, Isis::PanTool, Isis::RubberBandTool, Isis::ScatterPlotTool, Isis::SpecialPixelTool, Isis::StatisticsTool, Isis::StretchTool, Isis::TrackTool, Isis::WindowTool, and Isis::ZoomTool.

List of all members.

Public Slots

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

Signals

void clearWarningSignal ()
void viewportChanged ()

Public Member Functions

 Tool (QWidget *parent)
 Tool constructor.
void addTo (ViewportMainWindow *mw)
 Adds the tool to the application.
void addTo (ToolPad *toolpad)
 Adds the tool to the toolpad.
virtual void addTo (QMenu *menu)
 requires the programmer to have this member
virtual void addToPermanent (QToolBar *toolbar)
 requires the programmer to have this member
void addToActive (QToolBar *toolbar)
virtual void addTo (Workspace *ws)
 requires the programmer to have this member
QString toolIconDir () const
 returns the path to the icon directory.
virtual void paintViewport (MdiCubeViewport *vp, QPainter *painter)
 requires the programmer to have this member

Protected Types

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

Protected Slots

virtual void rubberBandComplete ()
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

MdiCubeViewportcubeViewport () const
 Return the current cubeviewport.
CubeViewportListcubeViewportList () const
 Return the list of cubeviewports.
virtual QActiontoolPadAction (ToolPad *toolpad)
 Anytime a tool is created, you must setup a tool pad action with it.
virtual QString menuName () const
 Anytime a tool is created, you must give it a name for the menu.
virtual QWidgetcreateToolBarWidget (QStackedWidget *parent)
 Anytime a tool is created, you must add it to the tool bar.
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.
virtual void enableRubberBandTool ()
 Anytime a tool is created, you may use the rubber band tool.

Protected Attributes

MdiCubeViewportp_cvp
 current cubeviewport
Workspacep_workspace

Detailed Description

Base class for the Qisis tools.

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

Member Typedef Documentation

typedef QVector< MdiCubeViewport * > Isis::Tool::CubeViewportList [protected]

A list of cubeviewports.


Constructor & Destructor Documentation

Tool::Tool ( QWidget parent  ) 

Tool constructor.

Parameters:
parent 

References p_cvp, and p_workspace.


Member Function Documentation

void Tool::activate ( bool  on  )  [slot]
virtual void Isis::Tool::addConnections ( MdiCubeViewport cvp  )  [inline, protected, virtual]

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

Parameters:
cvp 

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

void Tool::addTo ( Workspace ws  )  [virtual]

requires the programmer to have this member

Adds the given workspace to the cubeviewport list.

Parameters:
ws 

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

References p_workspace, registerTool(), and setCubeViewport().

virtual void Isis::Tool::addTo ( QMenu *  menu  )  [inline, virtual]
void Tool::addTo ( ToolPad toolpad  ) 

Adds the tool to the toolpad.

Parameters:
toolpad 

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

void Tool::addTo ( ViewportMainWindow pViewPortMnWin  ) 
void Tool::addToActive ( QToolBar toolbar  ) 
Parameters:
toolbar 

References createToolBarWidget().

Referenced by addTo().

virtual void Isis::Tool::addToPermanent ( QToolBar toolbar  )  [inline, virtual]

requires the programmer to have this member

Parameters:
toolbar 

Reimplemented in Isis::AdvancedTrackTool, Isis::BlinkTool, Isis::FileTool, Isis::HelpTool, Isis::SpecialPixelTool, and Isis::WindowTool.

Referenced by addTo().

void Tool::clearWarningSignal (  )  [signal]
virtual QWidget* Isis::Tool::createToolBarWidget ( QStackedWidget *  parent  )  [inline, protected, virtual]

Anytime a tool is created, you must add it to the tool bar.

Parameters:
parent 
Returns:
QWidget*

Reimplemented in Isis::AbstractPlotTool, Isis::BandTool, Isis::EditTool, Isis::FindTool, Isis::HistogramTool, Isis::MeasureTool, Isis::PanTool, Isis::ScatterPlotTool, Isis::SpatialPlotTool, Isis::SpectralPlotTool, Isis::StatisticsTool, Isis::StretchTool, and Isis::ZoomTool.

Referenced by addToActive().

MdiCubeViewport* Isis::Tool::cubeViewport (  )  const [inline, protected]
Tool::CubeViewportList * Tool::cubeViewportList (  )  const [protected]
void Tool::enableRubberBandTool (  )  [protected, virtual]

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

Enable the use of the rubberband tool.

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

References Isis::RubberBandTool::disable().

virtual QString Isis::Tool::menuName (  )  const [inline, protected, virtual]

Anytime a tool is created, you must give it a name for the menu.

Returns:
QString

Reimplemented in Isis::AdvancedTrackTool, Isis::BandTool, Isis::BlinkTool, Isis::FileTool, Isis::FindTool, Isis::HelpTool, Isis::MeasureTool, Isis::PanTool, Isis::SpecialPixelTool, Isis::StretchTool, Isis::WindowTool, and Isis::ZoomTool.

Referenced by addTo().

void Tool::mouseButtonPress ( QPoint  p,
Qt::MouseButton  s 
) [protected, virtual, slot]
Parameters:
p 
s 

Reimplemented in Isis::PanTool, and Isis::RubberBandTool.

References clearWarningSignal().

void Tool::mouseButtonRelease ( QPoint  p,
Qt::MouseButton  s 
) [protected, virtual, slot]

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::EditTool, Isis::FindTool, Isis::PanTool, Isis::RubberBandTool, Isis::StatisticsTool, and Isis::StretchTool.

References clearWarningSignal().

void Tool::mouseDoubleClick ( QPoint  p  )  [protected, virtual, slot]
Parameters:
p 

Reimplemented in Isis::RubberBandTool.

References clearWarningSignal().

virtual void Isis::Tool::mouseEnter (  )  [inline, protected, virtual, slot]
virtual void Isis::Tool::mouseLeave (  )  [inline, protected, virtual, slot]
virtual void Isis::Tool::mouseMove ( QPoint  p,
Qt::MouseButton   
) [inline, protected, virtual, slot]
void Tool::mouseMove ( QPoint  p  )  [protected, virtual, slot]
Parameters:
p 

Reimplemented in Isis::AdvancedTrackTool, Isis::PanTool, and Isis::TrackTool.

virtual void Isis::Tool::paintViewport ( MdiCubeViewport vp,
QPainter *  painter 
) [inline, virtual]

requires the programmer to have this member

Parameters:
vp 
painter 

Reimplemented in Isis::AbstractPlotTool, Isis::FindTool, Isis::RubberBandTool, and Isis::ScatterPlotTool.

void Tool::registerTool ( MdiCubeViewport viewport  )  [protected, slot]

Registers the tool to the viewport.

Parameters:
viewport 

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

Referenced by addTo().

virtual void Isis::Tool::removeConnections ( MdiCubeViewport cvp  )  [inline, protected, virtual]

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 (  )  [inline, protected, virtual, slot]
virtual void Isis::Tool::scaleChanged (  )  [inline, protected, virtual, slot]

Reimplemented in Isis::RubberBandTool.

virtual void Isis::Tool::screenPixelsChanged (  )  [inline, protected, virtual, slot]

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

Reimplemented in Isis::StretchTool.

void Tool::setCubeViewport ( MdiCubeViewport cvp  )  [slot]

Sets the current viewport to the given cvp.

Parameters:
cvp 

References p_cvp, updateTool(), and viewportChanged().

Referenced by addTo().

virtual void Isis::Tool::stretchRequested ( MdiCubeViewport ,
int   
) [inline, protected, virtual, slot]

Reimplemented in Isis::StretchTool.

Referenced by registerTool().

QString Isis::Tool::toolIconDir (  )  const [inline]
virtual QAction* Isis::Tool::toolPadAction ( ToolPad toolpad  )  [inline, protected, virtual]

Anytime a tool is created, you must setup a tool pad action with it.

Parameters:
toolpad 
Returns:
QAction*

Reimplemented in Isis::BandTool, Isis::EditTool, Isis::FindTool, Isis::HistogramTool, Isis::MeasureTool, Isis::PanTool, Isis::ScatterPlotTool, Isis::SpatialPlotTool, Isis::SpectralPlotTool, Isis::StatisticsTool, Isis::StretchTool, and Isis::ZoomTool.

Referenced by addTo().

virtual void Isis::Tool::updateMeasure (  )  [inline, protected, virtual, slot]

Reimplemented in Isis::MeasureTool.

void Tool::updateTool (  )  [virtual, slot]
void Tool::viewportChanged (  )  [signal]

Member Data Documentation

current cubeviewport

Referenced by cubeViewport(), registerTool(), setCubeViewport(), and Tool().


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