|
Isis 3.0 Developer's Reference (API) |
Home |
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::MatchTool, Isis::MeasureTool, Isis::PanTool, 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. | |
| virtual void | updateTool () |
| Updates the tool. | |
| void | setCubeViewport (MdiCubeViewport *cvp) |
| Sets the current viewport to the given cvp. | |
Signals | |
| void | clearWarningSignal () |
| void | toolActivated () |
| 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 | |
| MdiCubeViewport * | cubeViewport () const |
| Return the current cubeviewport. | |
| CubeViewportList * | cubeViewportList () const |
| Return the list of cubeviewports. | |
| virtual QAction * | toolPadAction (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 QWidget * | createToolBarWidget (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 | |
| MdiCubeViewport * | p_cvp |
| current cubeviewport | |
| Workspace * | p_workspace |
Base class for the Qisis tools.
typedef QVector< MdiCubeViewport * > Isis::Tool::CubeViewportList [protected] |
A list of cubeviewports.
| Tool::Tool | ( | QWidget * | parent | ) |
| void Tool::activate | ( | bool | on | ) | [slot] |
Activates the tool.
| on |
References clearWarningSignal(), and toolActivated().
Referenced by addTo(), Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::RubberBandTool::disableBanding(), Isis::RubberBandTool::enableBanding(), Isis::AdvancedTrackTool::eventFilter(), Isis::FileTool::FileTool(), Isis::TrackTool::TrackTool(), and Isis::WindowTool::WindowTool().
| virtual void Isis::Tool::addConnections | ( | MdiCubeViewport * | cvp | ) | [inline, protected, virtual] |
Anytime a tool is created, you must add the connections for it.
| 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.
| ws |
Reimplemented in Isis::EditTool, Isis::FileTool, Isis::SpecialPixelTool, and Isis::WindowTool.
References p_workspace, registerTool(), and setCubeViewport().
| virtual void Isis::Tool::addTo | ( | QMenu * | menu | ) | [inline, virtual] |
requires the programmer to have this member
| menu |
Reimplemented in Isis::AdvancedTrackTool, Isis::BlinkTool, Isis::FeatureNomenclatureTool, Isis::FileTool, Isis::FindTool, Isis::HelpTool, Isis::MeasureTool, Isis::PanTool, Isis::SpecialPixelTool, Isis::SpectralPlotTool, Isis::StretchTool, Isis::SunShadowTool, Isis::WindowTool, and Isis::ZoomTool.
| void Tool::addTo | ( | ToolPad * | toolpad | ) |
Adds the tool to the toolpad.
| toolpad |
References activate(), Isis::ToolPad::addAction(), and toolPadAction().
| void Tool::addTo | ( | ViewportMainWindow * | pViewPortMnWin | ) |
Adds the tool to the application.
| pViewPortMnWin |
References Isis::ViewportMainWindow::activeToolBar(), addToActive(), addToPermanent(), Isis::ViewportMainWindow::getMenu(), menuName(), Isis::ViewportMainWindow::permanentToolBar(), Isis::ViewportMainWindow::toolPad(), and Isis::ViewportMainWindow::workspace().
Referenced by Isis::ViewportMainWindow::ViewportMainWindow().
| void Tool::addToActive | ( | QToolBar * | toolbar | ) |
| virtual void Isis::Tool::addToPermanent | ( | QToolBar * | toolbar | ) | [inline, virtual] |
requires the programmer to have this member
| toolbar |
Reimplemented in Isis::AdvancedTrackTool, Isis::BlinkTool, Isis::FileTool, Isis::HelpTool, Isis::SpecialPixelTool, and Isis::WindowTool.
Referenced by addTo().
| void Isis::Tool::clearWarningSignal | ( | ) | [signal] |
Referenced by activate(), mouseButtonPress(), mouseButtonRelease(), and mouseDoubleClick().
| virtual QWidget* Isis::Tool::createToolBarWidget | ( | QStackedWidget * | parent | ) | [inline, protected, virtual] |
Anytime a tool is created, you must add it to the tool bar.
| parent |
Reimplemented in Isis::AbstractPlotTool, Isis::BandTool, Isis::EditTool, Isis::FeatureNomenclatureTool, Isis::FindTool, Isis::HistogramTool, Isis::MatchTool, Isis::MeasureTool, Isis::PanTool, Isis::ScatterPlotTool, Isis::SpatialPlotTool, Isis::SpectralPlotTool, Isis::StatisticsTool, Isis::StereoTool, Isis::StretchTool, Isis::SunShadowTool, and Isis::ZoomTool.
Referenced by addToActive().
| MdiCubeViewport* Isis::Tool::cubeViewport | ( | ) | const [inline, protected] |
Return the current cubeviewport.
References p_cvp.
Referenced by Isis::WindowTool::addConnections(), Isis::TrackTool::addConnections(), Isis::FileTool::discard(), Isis::FileTool::exportView(), Isis::SunShadowTool::mouseButtonPress(), Isis::StretchTool::mouseButtonRelease(), Isis::RubberBandTool::mouseButtonRelease(), Isis::PanTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::FeatureNomenclatureTool::mouseButtonRelease(), Isis::EditTool::mouseButtonRelease(), Isis::AdvancedTrackTool::mouseLeave(), Isis::TrackTool::mouseMove(), Isis::SunShadowTool::mouseMove(), Isis::ScatterPlotTool::mouseMove(), Isis::RubberBandTool::mouseMove(), Isis::SunShadowTool::paintViewport(), Isis::RubberBandTool::paintViewport(), Isis::FindTool::paintViewport(), Isis::FileTool::print(), Isis::SpectralPlotTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::HistogramTool::refreshPlot(), Isis::WindowTool::removeConnections(), Isis::TrackTool::removeConnections(), Isis::ZoomTool::rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::StereoTool::rubberBandComplete(), Isis::HistogramTool::rubberBandComplete(), Isis::EditTool::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::ZoomTool::updateTool(), Isis::WindowTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::StretchTool::updateTool(), Isis::SpecialPixelTool::updateTool(), Isis::FindTool::updateTool(), Isis::FileTool::updateTool(), Isis::EditTool::updateTool(), Isis::BlinkTool::updateTool(), Isis::BandTool::updateTool(), Isis::AbstractPlotTool::updateTool(), and Isis::AbstractPlotTool::viewportsToPlot().
| Tool::CubeViewportList * Tool::cubeViewportList | ( | ) | const [protected] |
Return the list of cubeviewports.
References Isis::Workspace::cubeViewportList(), and p_workspace.
Referenced by Isis::FileTool::closeAll(), Isis::MatchTool::createPoint(), Isis::BlinkTool::eventFilter(), Isis::RubberBandTool::mouseButtonRelease(), Isis::PanTool::mouseButtonRelease(), Isis::RubberBandTool::mouseMove(), Isis::ScatterPlotTool::repaintViewports(), Isis::AbstractPlotTool::repaintViewports(), Isis::ZoomTool::rubberBandComplete(), Isis::FeatureNomenclatureTool::setFontColor(), Isis::FeatureNomenclatureTool::setFontSize(), Isis::FeatureNomenclatureTool::setShowApprovedOnly(), Isis::FeatureNomenclatureTool::setVectorType(), Isis::StretchTool::stretchGlobalAllViewports(), Isis::MeasureTool::updateMeasure(), Isis::WindowTool::updateTool(), Isis::FindTool::updateTool(), Isis::BlinkTool::updateTool(), and Isis::AbstractPlotTool::viewportsToPlot().
| 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::StereoTool, 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.
Reimplemented in Isis::AdvancedTrackTool, Isis::BandTool, Isis::BlinkTool, Isis::FeatureNomenclatureTool, 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] |
| p | ||
| s |
Reimplemented in Isis::PanTool, Isis::RubberBandTool, and Isis::SunShadowTool.
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.
| p | ||
| s |
Reimplemented in Isis::EditTool, Isis::FeatureNomenclatureTool, Isis::FindTool, Isis::MatchTool, Isis::PanTool, Isis::RubberBandTool, Isis::StatisticsTool, Isis::StretchTool, and Isis::SunShadowTool.
References clearWarningSignal().
| void Tool::mouseDoubleClick | ( | QPoint | p | ) | [protected, virtual, slot] |
| virtual void Isis::Tool::mouseEnter | ( | ) | [inline, protected, virtual, slot] |
| virtual void Isis::Tool::mouseLeave | ( | ) | [inline, protected, virtual, slot] |
Reimplemented in Isis::AdvancedTrackTool, Isis::MeasureTool, Isis::ScatterPlotTool, and Isis::TrackTool.
| virtual void Isis::Tool::mouseMove | ( | QPoint | p, | |
| Qt::MouseButton | ||||
| ) | [inline, protected, virtual, slot] |
Reimplemented in Isis::RubberBandTool, and Isis::ScatterPlotTool.
| void Tool::mouseMove | ( | QPoint | p | ) | [protected, virtual, slot] |
| p |
Reimplemented in Isis::AdvancedTrackTool, Isis::PanTool, Isis::SunShadowTool, and Isis::TrackTool.
| virtual void Isis::Tool::paintViewport | ( | MdiCubeViewport * | vp, | |
| QPainter * | painter | |||
| ) | [inline, virtual] |
requires the programmer to have this member
| vp | ||
| painter |
Reimplemented in Isis::AbstractPlotTool, Isis::FeatureNomenclatureTool, Isis::FindTool, Isis::MatchTool, Isis::RubberBandTool, Isis::ScatterPlotTool, Isis::StereoTool, and Isis::SunShadowTool.
| void Tool::registerTool | ( | MdiCubeViewport * | viewport | ) | [protected, slot] |
Registers the tool to the viewport.
| 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.
| cvp |
Reimplemented in Isis::MeasureTool, Isis::TrackTool, and Isis::WindowTool.
| virtual void Isis::Tool::rubberBandComplete | ( | ) | [inline, protected, virtual, slot] |
Reimplemented in Isis::EditTool, Isis::HistogramTool, Isis::MeasureTool, Isis::SpatialPlotTool, Isis::SpectralPlotTool, Isis::StereoTool, Isis::StretchTool, and Isis::ZoomTool.
| 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.
| cvp |
References p_cvp, updateTool(), and viewportChanged().
Referenced by addTo(), and Isis::FileTool::closeAll().
| virtual void Isis::Tool::stretchRequested | ( | MdiCubeViewport * | , | |
| int | ||||
| ) | [inline, protected, virtual, slot] |
Reimplemented in Isis::StretchTool.
Referenced by registerTool().
| void Isis::Tool::toolActivated | ( | ) | [signal] |
| QString Isis::Tool::toolIconDir | ( | ) | const [inline] |
returns the path to the icon directory.
Referenced by Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::BlinkTool::BlinkTool(), Isis::ZoomTool::createToolBarWidget(), Isis::StretchTool::createToolBarWidget(), Isis::StereoTool::createToolBarWidget(), Isis::PanTool::createToolBarWidget(), Isis::MatchTool::createToolBarWidget(), Isis::FindTool::createToolBarWidget(), Isis::EditTool::createToolBarWidget(), Isis::BandTool::createToolBarWidget(), Isis::FileTool::FileTool(), Isis::FindTool::FindTool(), Isis::HelpTool::HelpTool(), Isis::HistogramTool::HistogramTool(), Isis::PanTool::PanTool(), Isis::SpatialPlotTool::SpatialPlotTool(), Isis::SpecialPixelTool::SpecialPixelTool(), Isis::SpectralPlotTool::SpectralPlotTool(), Isis::RubberBandComboBox::toolIconDir(), Isis::ZoomTool::toolPadAction(), Isis::SunShadowTool::toolPadAction(), Isis::StretchTool::toolPadAction(), Isis::StereoTool::toolPadAction(), Isis::StatisticsTool::toolPadAction(), Isis::ScatterPlotTool::toolPadAction(), Isis::PanTool::toolPadAction(), Isis::MeasureTool::toolPadAction(), Isis::MatchTool::toolPadAction(), Isis::HistogramTool::toolPadAction(), Isis::FindTool::toolPadAction(), Isis::FeatureNomenclatureTool::toolPadAction(), Isis::EditTool::toolPadAction(), Isis::BandTool::toolPadAction(), Isis::WindowTool::WindowTool(), and Isis::ZoomTool::ZoomTool().
Anytime a tool is created, you must setup a tool pad action with it.
| toolpad |
Reimplemented in Isis::BandTool, Isis::EditTool, Isis::FeatureNomenclatureTool, Isis::FindTool, Isis::HistogramTool, Isis::MatchTool, Isis::MeasureTool, Isis::PanTool, Isis::ScatterPlotTool, Isis::SpatialPlotTool, Isis::SpectralPlotTool, Isis::StatisticsTool, Isis::StereoTool, Isis::StretchTool, Isis::SunShadowTool, and Isis::ZoomTool.
Referenced by addTo().
| virtual void Isis::Tool::updateMeasure | ( | ) | [inline, protected, virtual, slot] |
Reimplemented in Isis::MeasureTool.
| void Tool::updateTool | ( | ) | [virtual, slot] |
Updates the tool.
Reimplemented in Isis::AbstractPlotTool, Isis::BandTool, Isis::BlinkTool, Isis::EditTool, Isis::FeatureNomenclatureTool, Isis::FileTool, Isis::FindTool, Isis::HistogramTool, Isis::MeasureTool, Isis::SpatialPlotTool, Isis::SpecialPixelTool, Isis::SpectralPlotTool, Isis::StretchTool, Isis::SunShadowTool, Isis::WindowTool, and Isis::ZoomTool.
Referenced by setCubeViewport().
| void Isis::Tool::viewportChanged | ( | ) | [signal] |
MdiCubeViewport* Isis::Tool::p_cvp [protected] |
current cubeviewport
Referenced by cubeViewport(), registerTool(), Isis::MeasureTool::rubberBandComplete(), setCubeViewport(), and Tool().
Workspace* Isis::Tool::p_workspace [protected] |
Referenced by addTo(), cubeViewportList(), Isis::ScatterPlotTool::showNewScatterPlotConfig(), and Tool().