Isis 3 Programmer Reference
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. More...
 
void setCubeViewport (MdiCubeViewport *cvp)
 Sets the current viewport to the given cvp. More...
 

Signals

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

Public Member Functions

 WindowTool (QWidget *parent)
 WindowTool constructor. More...
 
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. More...
 
void addTo (Workspace *ws)
 Adds the window to the workspace. More...
 
void addToPermanent (QToolBar *toolbar)
 Adds the link window action to the tool bar. More...
 
QString menuName () const
 
void addTo (ViewportMainWindow *mw)
 Adds the tool to the application. More...
 
void addTo (ToolPad *toolpad)
 Adds the tool to the toolpad. More...
 
void addToActive (QToolBar *toolbar)
 
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 ()
 

Protected Member Functions

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

Private Slots

void changeCursor ()
 Toggles the cursor from an arrow to a crosshair. More...
 
void linkWindows ()
 Links all viewport windows in the workspace. More...
 
void unlinkWindows ()
 Unlinks all the viewport windows in the workspace. More...
 
void resizeWindows ()
 Resizes all the viewport windows to the active viewport window size. More...
 
void updateViewportCursor (MdiCubeViewport *)
 Updates the cursor over the viewport. More...
 
void tileViewports ()
 Tiles the cube viewports over the Cube DN View. More...
 

Private Member Functions

int viewportSize ()
 Helper function for determining the size of the viewports. More...
 

Private Attributes

QMdiArea * p_mdiArea
 area where viewports are displayed More...
 
QActionp_cascadeWindows
 cascade windows action More...
 
QActionp_tileWindows
 tile windows action More...
 
QActionp_resizeWindows
 resize windows action More...
 
QActionp_prevWindow
 previous window action More...
 
QActionp_nextWindow
 next window action More...
 
QActionp_closeWindow
 close window action More...
 
QActionp_closeAllWindows
 close all action More...
 
QActionp_linkWindow
 link window action More...
 
QActionp_linkAllWindows
 link all windows action More...
 
QActionp_unlinkAllWindows
 unlink all windows action More...
 
QActionp_changeCursor
 changes the cursor when it moves over the viewport More...
 

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.

2017-07-19 Marjorie Hahn and Tracie Sucharski - Implemented new viewport tiling scheme.

2018-01-09 Cole Neubauer - Returns windows to normal state before they are tiled to fix fullscreen tiling issue Fixes #5262

Definition at line 25 of file WindowTool.h.

Member Typedef Documentation

◆ CubeViewportList

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

A list of cubeviewports.

Definition at line 219 of file Tool.h.

Constructor & Destructor Documentation

◆ WindowTool()

Member Function Documentation

◆ activate

◆ addConnections()

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

Adds the connections to the cube viewport.

Parameters
cvp

Reimplemented from Isis::Tool.

Definition at line 244 of file WindowTool.cpp.

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

◆ addTo() [1/4]

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 217 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.

◆ addTo() [2/4]

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

Adds the window to the workspace.

Parameters
ws

Reimplemented from Isis::Tool.

Definition at line 122 of file WindowTool.cpp.

References Isis::Tool::addTo(), Isis::Workspace::mdiArea(), p_cascadeWindows, p_closeAllWindows, p_closeWindow, p_mdiArea, p_nextWindow, p_prevWindow, p_tileWindows, tileViewports(), and updateViewportCursor().

◆ addTo() [3/4]

◆ addTo() [4/4]

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

Adds the tool to the toolpad.

Parameters
toolpad

Definition at line 98 of file Tool.cpp.

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

◆ addToActive()

void Isis::Tool::addToActive ( QToolBar toolbar)
inherited

◆ addToPermanent()

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 204 of file WindowTool.cpp.

References p_linkWindow.

◆ changeCursor

void Isis::WindowTool::changeCursor ( )
privateslot

Toggles the cursor from an arrow to a crosshair.

Definition at line 293 of file WindowTool.cpp.

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

Referenced by WindowTool().

◆ createToolBarWidget()

virtual QWidget* Isis::Tool::createToolBarWidget ( QStackedWidget *  parent)
inlineprotectedvirtualinherited

◆ cubeViewport()

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::exportToList(), Isis::FileTool::exportView(), Isis::StatisticsTool::getStatistics(), Isis::FindTool::handleRecordClicked(), Isis::EditTool::LineToPoints(), Isis::TrackTool::locateCursor(), Isis::SunShadowTool::mouseButtonPress(), Isis::ControlNetTool::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::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::BandTool::updateTool(), Isis::SunShadowTool::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().

◆ cubeViewportList()

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

Return the list of cubeviewports.

Returns
CubeViewportList*

Definition at line 390 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::ControlNetTool::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::ControlNetTool::setControlNet(), 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().

◆ enableRubberBandTool()

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 339 of file Tool.cpp.

References Isis::RubberBandTool::disable().

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

◆ linkWindows

void Isis::WindowTool::linkWindows ( )
privateslot

Links all viewport windows in the workspace.

Definition at line 268 of file WindowTool.cpp.

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

Referenced by WindowTool().

◆ menuName()

QString Isis::WindowTool::menuName ( ) const
inlinevirtual
Returns
the menu name

Reimplemented from Isis::Tool.

Definition at line 37 of file WindowTool.h.

◆ mouseButtonPress()

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

Definition at line 367 of file Tool.cpp.

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

◆ mouseButtonRelease()

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

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 380 of file Tool.cpp.

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

◆ mouseDoubleClick()

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

Definition at line 358 of file Tool.cpp.

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

◆ mouseMove

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

Definition at line 352 of file Tool.cpp.

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

◆ paintViewport()

virtual void Isis::Tool::paintViewport ( MdiCubeViewport vp,
QPainter *  painter 
)
inlinevirtualinherited

◆ registerTool()

void Isis::Tool::registerTool ( MdiCubeViewport viewport)
protectedinherited

Registers the tool to the viewport.

Parameters
viewport

Definition at line 327 of file Tool.cpp.

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

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

◆ removeConnections()

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

Removes the connections from the cube viewport.

Parameters
cvp

Reimplemented from Isis::Tool.

Definition at line 257 of file WindowTool.cpp.

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

◆ resizeWindows

void Isis::WindowTool::resizeWindows ( )
privateslot

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

Definition at line 327 of file WindowTool.cpp.

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

Referenced by WindowTool().

◆ screenPixelsChanged

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

◆ setCubeViewport

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

◆ tileViewports

void Isis::WindowTool::tileViewports ( )
privateslot

Tiles the cube viewports over the Cube DN View.

History:
2017-07-19 Marjorie Hahn and Tracie Sucharski - Original version.

Definition at line 175 of file WindowTool.cpp.

References p_mdiArea, and viewportSize().

Referenced by addTo().

◆ toolIconDir()

QString Isis::Tool::toolIconDir ( ) const
inlineinherited

◆ toolPadAction()

virtual QAction* Isis::Tool::toolPadAction ( ToolPad toolpad)
inlineprotectedvirtualinherited

◆ unlinkWindows

void Isis::WindowTool::unlinkWindows ( )
privateslot

Unlinks all the viewport windows in the workspace.

Definition at line 281 of file WindowTool.cpp.

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

Referenced by WindowTool().

◆ updateTool()

◆ updateViewportCursor

void Isis::WindowTool::updateViewportCursor ( MdiCubeViewport cvp)
privateslot

Updates the cursor over the viewport.

Definition at line 310 of file WindowTool.cpp.

References p_changeCursor.

Referenced by addTo(), and changeCursor().

◆ viewportSize()

int Isis::WindowTool::viewportSize ( )
private

Helper function for determining the size of the viewports.

Returns
Returns the size that the viewports should be.
History:
2017-07-19 Tracie Sucharski - Original version.

Definition at line 143 of file WindowTool.cpp.

References p_mdiArea.

Referenced by tileViewports().

Member Data Documentation

◆ p_cascadeWindows

QAction* Isis::WindowTool::p_cascadeWindows
private

cascade windows action

Definition at line 59 of file WindowTool.h.

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

◆ p_changeCursor

QAction* Isis::WindowTool::p_changeCursor
private

changes the cursor when it moves over the viewport

Definition at line 69 of file WindowTool.h.

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

◆ p_closeAllWindows

QAction* Isis::WindowTool::p_closeAllWindows
private

close all action

Definition at line 65 of file WindowTool.h.

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

◆ p_closeWindow

QAction* Isis::WindowTool::p_closeWindow
private

close window action

Definition at line 64 of file WindowTool.h.

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

◆ p_linkAllWindows

QAction* Isis::WindowTool::p_linkAllWindows
private

link all windows action

Definition at line 67 of file WindowTool.h.

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

◆ p_linkWindow

QAction* Isis::WindowTool::p_linkWindow
private

link window action

Definition at line 66 of file WindowTool.h.

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

◆ p_mdiArea

QMdiArea* Isis::WindowTool::p_mdiArea
private

area where viewports are displayed

Definition at line 58 of file WindowTool.h.

Referenced by addTo(), tileViewports(), and viewportSize().

◆ p_nextWindow

QAction* Isis::WindowTool::p_nextWindow
private

next window action

Definition at line 63 of file WindowTool.h.

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

◆ p_prevWindow

QAction* Isis::WindowTool::p_prevWindow
private

previous window action

Definition at line 62 of file WindowTool.h.

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

◆ p_resizeWindows

QAction* Isis::WindowTool::p_resizeWindows
private

resize windows action

Definition at line 61 of file WindowTool.h.

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

◆ p_tileWindows

QAction* Isis::WindowTool::p_tileWindows
private

tile windows action

Definition at line 60 of file WindowTool.h.

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

◆ p_unlinkAllWindows

QAction* Isis::WindowTool::p_unlinkAllWindows
private

unlink all windows action

Definition at line 68 of file WindowTool.h.

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


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