Isis 3 Developer Reference
Isis::SunShadowTool Class Reference

Tool for measuring shadow heights. More...

#include <SunShadowTool.h>

Inheritance diagram for Isis::SunShadowTool:
Inheritance graph
Collaboration diagram for Isis::SunShadowTool:
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

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

Protected Types

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

Protected Slots

virtual void mouseMove (QPoint p)
 When the mouse moves, if we're tracking then we go ahead and update all of our calculated values for the shadow measurement. More...
 
virtual void mouseButtonPress (QPoint p, Qt::MouseButton s)
 When the mouse left button is pressed we start tracking. More...
 
virtual void mouseButtonRelease (QPoint p, Qt::MouseButton s)
 When the mouse left button is released we finish tracking. More...
 
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, Qt::MouseButton)
 
virtual void mouseLeave ()
 

Protected Member Functions

QWidgetcreateToolBarWidget (QStackedWidget *parent)
 Creates the widget (button) that goes on the tool bar. More...
 
QActiontoolPadAction (ToolPad *pad)
 Create an action for activating this tool. More...
 
void updateTool ()
 This enables/disables this tool's functionality based on the active viewport's compatibility. More...
 
virtual void mouseDoubleClick (QPoint p)
 
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 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

Tool for measuring shadow heights.

Author
2012-03-12 Steven Lambright

Member Typedef Documentation

◆ CubeViewportList

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

A list of cubeviewports.

Constructor & Destructor Documentation

◆ SunShadowTool()

Isis::SunShadowTool::SunShadowTool ( QWidget parent)

Construct a sun shadow tool.

Parameters
parentThe qt-parent relationship parent.

References Isis::TableMainWindow::addToTable(), Isis::TableMainWindow::setStatusMessage(), Isis::TableMainWindow::setTrackListItems(), and Isis::Tool::viewportChanged().

Member Function Documentation

◆ activate

◆ addConnections()

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

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

Parameters
cvp

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

◆ addTo() [1/4]

void Isis::SunShadowTool::addTo ( QMenu menu)
virtual

Adds the measure action to the given menu.

Parameters
menu

Reimplemented from Isis::Tool.

◆ addTo() [2/4]

◆ addTo() [3/4]

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

Adds the tool to the toolpad.

Parameters
toolpad

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

◆ addTo() [4/4]

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

Adds the given workspace to the cubeviewport list.

Parameters
ws

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

References Isis::Tool::registerTool(), and Isis::Tool::setCubeViewport().

◆ addToActive()

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

◆ addToPermanent()

virtual void Isis::Tool::addToPermanent ( QToolBar toolbar)
inlinevirtualinherited

◆ clearWarningSignal

void Isis::Tool::clearWarningSignal ( )
signalinherited

◆ createToolBarWidget()

QWidget * Isis::SunShadowTool::createToolBarWidget ( QStackedWidget *  parent)
protectedvirtual

Creates the widget (button) that goes on the tool bar.

Parameters
parent
Returns
QWidget*

Reimplemented from Isis::Tool.

References Isis::Distance::Kilometers, and Isis::Distance::Meters.

◆ cubeViewport()

MdiCubeViewport* Isis::Tool::cubeViewport ( ) const
inlineprotectedinherited

Return the current cubeviewport.

Returns
CubeViewport*

Referenced by Isis::WindowTool::addConnections(), Isis::TrackTool::addConnections(), Isis::FileTool::discard(), Isis::FileTool::exportToList(), Isis::FileTool::exportView(), mouseButtonPress(), Isis::PanTool::mouseButtonRelease(), 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(), mouseMove(), Isis::TrackTool::mouseMove(), Isis::RubberBandTool::mouseMove(), 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(), updateTool(), Isis::AbstractPlotTool::updateTool(), Isis::ZoomTool::updateTool(), Isis::FileTool::updateTool(), Isis::EditTool::updateTool(), Isis::FindTool::updateTool(), Isis::StretchTool::updateTool(), and Isis::AbstractPlotTool::viewportsToPlot().

◆ cubeViewportList()

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

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

◆ menuName()

virtual QString Isis::Tool::menuName ( ) const
inlinevirtualinherited

◆ mouseButtonPress

void Isis::SunShadowTool::mouseButtonPress ( QPoint  p,
Qt::MouseButton  s 
)
protectedvirtualslot

When the mouse left button is pressed we start tracking.

Parameters
pThe current mouse position in viewport screen pixel coordinates
sThe mouse button that was pressed.

References Isis::Cube::camera(), Isis::CubeViewport::cube(), Isis::Tool::cubeViewport(), Isis::Angle::Degrees, Isis::Null, Isis::Camera::SetImage(), Isis::Camera::SunAzimuth(), and Isis::CubeViewport::viewportToCube().

◆ mouseButtonRelease

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

When the mouse left button is released we finish tracking.

Parameters
pThe current mouse position in viewport screen pixel coordinates
sThe mouse button that was pressed.

References mouseMove().

◆ mouseDoubleClick()

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

References Isis::Tool::clearWarningSignal().

◆ mouseEnter

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

◆ mouseLeave

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

◆ mouseMove [1/2]

void Isis::SunShadowTool::mouseMove ( QPoint  p)
protectedvirtualslot

When the mouse moves, if we're tracking then we go ahead and update all of our calculated values for the shadow measurement.

Parameters
pThe current mouse position in viewport screen pixel coordinates

References Isis::Tool::cubeViewport(), Isis::Angle::Degrees, Isis::Angle::isValid(), Isis::Angle::radians(), Isis::TableMainWindow::table(), and Isis::CubeViewport::viewportToCube().

Referenced by mouseButtonRelease().

◆ mouseMove [2/2]

virtual void Isis::Tool::mouseMove ( QPoint  p,
Qt::MouseButton   
)
inlineprotectedvirtualslotinherited

◆ paintViewport()

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

Paint anything we need to on the viewport.

Currently, we draw a line along where the user is measuring a shadow.

Parameters
vpViewport to paint
painterThe painter to use for painting

Reimplemented from Isis::Tool.

References Isis::CubeViewport::cubeToViewport(), Isis::Tool::cubeViewport(), and Isis::Null.

◆ registerTool()

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

Registers the tool to the viewport.

Parameters
viewport

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

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

◆ removeConnections()

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

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.

◆ rubberBandComplete

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

◆ rubberBandTool()

◆ scaleChanged()

virtual void Isis::Tool::scaleChanged ( )
inlineprotectedvirtualinherited

Reimplemented in Isis::RubberBandTool.

◆ screenPixelsChanged

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

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

◆ setCubeViewport

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

Sets the current viewport to the given cvp.

Parameters
cvp

References Isis::Tool::updateTool(), and Isis::Tool::viewportChanged().

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

◆ setList()

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

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

◆ stretchRequested()

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

Reimplemented in Isis::StretchTool.

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

◆ toolActivated

◆ toolIconDir()

◆ toolPadAction()

QAction * Isis::SunShadowTool::toolPadAction ( ToolPad toolpad)
protectedvirtual

Create an action for activating this tool.

Parameters
toolpadThe tool pad that will contain the given action
Returns
The created action

Reimplemented from Isis::Tool.

References Isis::Tool::toolIconDir().

◆ updateMeasure()

virtual void Isis::Tool::updateMeasure ( )
inlineprotectedvirtualinherited

◆ updateTool()

void Isis::SunShadowTool::updateTool ( )
protectedvirtual

This enables/disables this tool's functionality based on the active viewport's compatibility.

Reimplemented from Isis::Tool.

References Isis::Cube::camera(), Isis::CubeViewport::cube(), and Isis::Tool::cubeViewport().

◆ viewportChanged

◆ workspace()


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