USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::WindowTool Class Reference

#include <WindowTool.h>

Inheritance diagram for Isis::WindowTool:
Inheritance graph
Collaboration diagram for Isis::WindowTool:
Collaboration graph

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

 WindowTool (QWidget *parent)
 WindowTool constructor.
 
void addTo (QMenu *menu)
 Adds the cascade windows, tile windows, resize windows, next window, previous window, close window, and close all windows actions to the menu.
 
void addTo (Workspace *ws)
 Adds the window to the workspace.
 
void addToPermanent (QToolBar *toolbar)
 Adds the link window action to the tool bar.
 
QString menuName () const
 Returns the menu name.
 
void addTo (ViewportMainWindow *mw)
 Adds the tool to the application.
 
void addTo (ToolPad *toolpad)
 Adds the tool to the toolpad.
 
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

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

void updateTool ()
 Updates the WindowTool.
 
void addConnections (MdiCubeViewport *cvp)
 Adds the connections to the cube viewport.
 
void removeConnections (MdiCubeViewport *cvp)
 Removes the connections from the cube viewport.
 
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 QWidgetcreateToolBarWidget (QStackedWidget *parent)
 Anytime a tool is created, you must add it to the tool bar.
 
virtual void enableRubberBandTool ()
 Anytime a tool is created, you may use the rubber band tool.
 
Workspaceworkspace ()
 

Private Slots

void changeCursor ()
 toggles the cursor from an arrow to a crosshair.
 
void linkWindows ()
 Links all viewport windows in the workspace.
 
void unlinkWindows ()
 Unlinks all the viewport windows in the workspace.
 
void resizeWindows ()
 Resizes all the viewport windows to the active viewport window size.
 
void updateViewportCursor (MdiCubeViewport *)
 

Private Attributes

QActionp_cascadeWindows
 cascade windows action
 
QActionp_tileWindows
 tile windows action
 
QActionp_resizeWindows
 resize windows action
 
QActionp_prevWindow
 previous window action
 
QActionp_nextWindow
 next window action
 
QActionp_closeWindow
 close window action
 
QActionp_closeAllWindows
 close all action
 
QActionp_linkWindow
 link window action
 
QActionp_linkAllWindows
 link all windows action
 
QActionp_unlinkAllWindows
 unlink all windows action
 
QActionp_changeCursor
 changes the cursor when it moves over the viewport
 

Detailed Description

Author
????-??-?? Unknown
History:

2010-06-26 Eric Hyer - Now uses MdiCubeViewport instead of CubeViewPort. Fixed include issues

2011-09-20 Steven Lambright - Cursors should remain consistent between all viewports now. Fixes #195.

Definition at line 20 of file WindowTool.h.

Member Typedef Documentation

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

A list of cubeviewports.

Definition at line 219 of file Tool.h.

Constructor & Destructor Documentation

Member Function Documentation

void Isis::WindowTool::addConnections ( MdiCubeViewport cvp)
protectedvirtual

Adds the connections to the cube viewport.

Parameters
cvp

Reimplemented from Isis::Tool.

Definition at line 173 of file WindowTool.cpp.

References Isis::Tool::cubeViewport(), and p_linkWindow.

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

Adds the cascade windows, tile windows, resize windows, next window, previous window, close window, and close all windows actions to the menu.

Parameters
menu

Reimplemented from Isis::Tool.

Definition at line 146 of file WindowTool.cpp.

References p_cascadeWindows, p_changeCursor, p_closeAllWindows, p_closeWindow, p_linkAllWindows, p_linkWindow, p_nextWindow, p_prevWindow, p_resizeWindows, p_tileWindows, and p_unlinkAllWindows.

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

Adds the window to the workspace.

Parameters
ws

Reimplemented from Isis::Tool.

Definition at line 114 of file WindowTool.cpp.

References Isis::Tool::addTo(), p_cascadeWindows, p_closeAllWindows, p_closeWindow, p_nextWindow, p_prevWindow, and p_tileWindows.

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

Adds the tool to the toolpad.

Parameters
toolpad

Definition at line 97 of file Tool.cpp.

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

void Isis::Tool::addToActive ( QToolBar toolbar)
inherited
void Isis::WindowTool::addToPermanent ( QToolBar perm)
virtual

Adds the link window action to the tool bar.

Parameters
perm

Reimplemented from Isis::Tool.

Definition at line 133 of file WindowTool.cpp.

References p_linkWindow.

void Isis::WindowTool::changeCursor ( )
privateslot

toggles the cursor from an arrow to a crosshair.

Definition at line 227 of file WindowTool.cpp.

References Isis::Tool::cubeViewportList(), and p_changeCursor.

Referenced by WindowTool().

virtual QWidget* Isis::Tool::createToolBarWidget ( QStackedWidget *  parent)
inlineprotectedvirtualinherited
MdiCubeViewport* Isis::Tool::cubeViewport ( ) const
inlineprotectedinherited

Return the current cubeviewport.

Returns
CubeViewport*

Definition at line 211 of file Tool.h.

References Isis::Tool::m_cvp.

Referenced by addConnections(), Isis::TrackTool::addConnections(), Isis::StretchTool::advancedStretchChanged(), Isis::FindTool::centerLinkedViewports(), Isis::StretchTool::changeStretch(), Isis::BandTool::changeView(), Isis::BandTool::copyLinkedViewports(), Isis::FileTool::discard(), Isis::Tool::enableToolBar(), Isis::FileTool::exportView(), Isis::StatisticsTool::getStatistics(), Isis::FindTool::handleRecordClicked(), Isis::EditTool::LineToPoints(), Isis::TrackTool::locateCursor(), Isis::SunShadowTool::mouseButtonPress(), 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::SunShadowTool::recalculateShadowHeight(), Isis::EditTool::redoEdit(), Isis::FindTool::refresh(), Isis::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), removeConnections(), Isis::TrackTool::removeConnections(), Isis::RubberBandTool::repaint(), resizeWindows(), Isis::HistogramTool::rubberBandComplete(), Isis::MeasureTool::rubberBandComplete(), Isis::ZoomTool::rubberBandComplete(), Isis::EditTool::rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAs(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsReducedCube(), Isis::FileTool::saveInfo(), Isis::BandTool::setBandBin(), Isis::BandTool::setList(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::showAdvancedDialog(), Isis::ScatterPlotTool::showNewScatterPlotConfig(), Isis::StretchTool::stretchChanged(), Isis::StretchTool::stretchGlobal(), Isis::StretchTool::stretchGlobalAllBands(), Isis::StretchTool::stretchRegional(), Isis::EditTool::undoEdit(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), Isis::TrackTool::updateLabels(), Isis::MeasureTool::updateMeasure(), Isis::AdvancedTrackTool::updateRow(), updateTool(), Isis::BlinkTool::updateTool(), Isis::SpecialPixelTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::BandTool::updateTool(), Isis::AbstractPlotTool::updateTool(), Isis::ZoomTool::updateTool(), Isis::FileTool::updateTool(), Isis::EditTool::updateTool(), Isis::FindTool::updateTool(), Isis::StretchTool::updateTool(), Isis::AbstractPlotTool::viewportsToPlot(), Isis::EditTool::writeToCube(), Isis::ZoomTool::zoomBy(), Isis::ZoomTool::zoomFit(), Isis::ZoomTool::zoomFitHeight(), Isis::ZoomTool::zoomFitWidth(), and Isis::ZoomTool::zoomManual().

Tool::CubeViewportList * Isis::Tool::cubeViewportList ( ) const
protectedinherited

Return the list of cubeviewports.

Returns
CubeViewportList*

Definition at line 389 of file Tool.cpp.

References Isis::Workspace::cubeViewportList().

Referenced by Isis::BlinkTool::advance(), Isis::SpecialPixelTool::apply(), Isis::FindTool::centerLinkedViewports(), changeCursor(), Isis::FileTool::closeAll(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::MatchTool::createPoint(), Isis::BlinkTool::eventFilter(), Isis::FeatureNomenclatureTool::featuresIdentified(), Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::FeatureNomenclatureTool::findNomenclatureStateChanged(), Isis::FindTool::handleLinkClicked(), linkWindows(), Isis::RubberBandTool::mouseButtonRelease(), Isis::RubberBandTool::mouseMove(), Isis::QnetTool::openGround(), Isis::StereoTool::paintAllViewports(), Isis::MatchTool::paintAllViewports(), Isis::QnetTool::paintAllViewports(), Isis::FindTool::refresh(), Isis::ScatterPlotTool::repaintViewports(), Isis::AbstractPlotTool::repaintViewports(), resizeWindows(), Isis::BlinkTool::reverse(), Isis::ZoomTool::rubberBandComplete(), Isis::MatchTool::serialNumberList(), Isis::FeatureNomenclatureTool::setFontColor(), Isis::FeatureNomenclatureTool::setFontSize(), Isis::FeatureNomenclatureTool::setShowApprovedOnly(), Isis::StretchTool::setStretchAllViewports(), Isis::FeatureNomenclatureTool::setVectorType(), Isis::StretchTool::stretchGlobalAllViewports(), Isis::BlinkTool::toggleLink(), unlinkWindows(), Isis::MeasureTool::updateMeasure(), Isis::AdvancedTrackTool::updateRow(), updateTool(), Isis::BlinkTool::updateTool(), Isis::FindTool::updateTool(), Isis::AbstractPlotTool::viewportsToPlot(), Isis::ZoomTool::zoomBy(), Isis::ZoomTool::zoomFit(), Isis::ZoomTool::zoomFitHeight(), Isis::ZoomTool::zoomFitWidth(), and Isis::ZoomTool::zoomManual().

void Isis::Tool::enableRubberBandTool ( )
protectedvirtualinherited

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.

Definition at line 338 of file Tool.cpp.

References Isis::RubberBandTool::disable().

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

void Isis::WindowTool::linkWindows ( )
privateslot

Links all viewport windows in the workspace.

Definition at line 202 of file WindowTool.cpp.

References Isis::Tool::cubeViewportList(), and Isis::MdiCubeViewport::setLinked().

Referenced by WindowTool().

QString Isis::WindowTool::menuName ( ) const
inlinevirtual

Returns the menu name.

Reimplemented from Isis::Tool.

Definition at line 30 of file WindowTool.h.

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

Definition at line 366 of file Tool.cpp.

Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().

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.

Definition at line 379 of file Tool.cpp.

Referenced by Isis::Tool::addViewportConnections(), Isis::StretchTool::mouseButtonRelease(), and Isis::Tool::removeViewportConnections().

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

Definition at line 357 of file Tool.cpp.

Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().

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

Definition at line 351 of file Tool.cpp.

Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().

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

Definition at line 326 of file Tool.cpp.

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

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

void Isis::WindowTool::removeConnections ( MdiCubeViewport cvp)
protectedvirtual

Removes the connections from the cube viewport.

Parameters
cvp

Reimplemented from Isis::Tool.

Definition at line 186 of file WindowTool.cpp.

References Isis::Tool::cubeViewport(), and p_linkWindow.

void Isis::WindowTool::resizeWindows ( )
privateslot

Resizes all the viewport windows to the active viewport window size.

Definition at line 258 of file WindowTool.cpp.

References Isis::Tool::cubeViewport(), Isis::Tool::cubeViewportList(), and Isis::MdiCubeViewport::isLinked().

Referenced by WindowTool().

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

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

Definition at line 162 of file Tool.h.

Referenced by Isis::Tool::addViewportConnections(), Isis::Tool::removeViewportConnections(), and Isis::FeatureNomenclatureTool::viewportDone().

void Isis::Tool::setCubeViewport ( MdiCubeViewport cvp)
slotinherited
virtual QAction* Isis::Tool::toolPadAction ( ToolPad toolpad)
inlineprotectedvirtualinherited
void Isis::WindowTool::unlinkWindows ( )
privateslot

Unlinks all the viewport windows in the workspace.

Definition at line 215 of file WindowTool.cpp.

References Isis::Tool::cubeViewportList(), and Isis::MdiCubeViewport::setLinked().

Referenced by WindowTool().

Member Data Documentation

QAction* Isis::WindowTool::p_cascadeWindows
private

cascade windows action

Definition at line 49 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_changeCursor
private

changes the cursor when it moves over the viewport

Definition at line 59 of file WindowTool.h.

Referenced by addTo(), changeCursor(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_closeAllWindows
private

close all action

Definition at line 55 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_closeWindow
private

close window action

Definition at line 54 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_linkAllWindows
private

link all windows action

Definition at line 57 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_linkWindow
private

link window action

Definition at line 56 of file WindowTool.h.

Referenced by addConnections(), addTo(), addToPermanent(), removeConnections(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_nextWindow
private

next window action

Definition at line 53 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_prevWindow
private

previous window action

Definition at line 52 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_resizeWindows
private

resize windows action

Definition at line 51 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_tileWindows
private

tile windows action

Definition at line 50 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().

QAction* Isis::WindowTool::p_unlinkAllWindows
private

unlink all windows action

Definition at line 58 of file WindowTool.h.

Referenced by addTo(), updateTool(), and WindowTool().


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