Isis 3 Programmer Reference
Isis::FeatureNomenclatureTool Class Reference

Display nomenclature on MDI Cube Viewports. More...

#include <FeatureNomenclatureTool.h>

Inheritance diagram for Isis::FeatureNomenclatureTool:
Inheritance graph
Collaboration diagram for Isis::FeatureNomenclatureTool:
Collaboration graph

Classes

class  FeatureDisplayPosition
 A named feature's position in a viewport. More...
 
class  FeaturePosition
 A named feature's position in a cube. More...
 
class  ViewportFeatureDisplay
 The feature display on a single viewport. More...
 

Public Types

enum  VectorType { None, Arrows4, Arrows8, Box }
 Enumeration of extent vector typess. More...
 

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

 FeatureNomenclatureTool (QWidget *parent)
 This instantiates a FeatureNomenclatureTool. More...
 
 ~FeatureNomenclatureTool ()
 Cleans up memory allocated by this tool. More...
 
void addTo (QMenu *menu)
 Add the 'Show Nomenclature' option to the options menu. More...
 
void paintViewport (MdiCubeViewport *vp, QPainter *painter)
 Paint features on the given viewport. More...
 
bool defaultEnabled () const
 Is this tool enabled by default? (i.e. More...
 
QColor fontColor () const
 What is the font color to use? More...
 
int fontSize () const
 Retrieve the font size of the features in this tool. More...
 
bool showApprovedOnly () const
 Show approved features only? More...
 
VectorType vectorType () const
 Draw vectors to the extents of features? More...
 
void setDefaultEnabled (bool defaultEnabled)
 Set whether this tool is enabled by default. More...
 
void setFontColor (QColor color)
 Set the color to use for drawing on the viewport. More...
 
void setFontSize (int newFontSize)
 Set the font point size to use for drawing text on the viewport. More...
 
void setShowApprovedOnly (bool approvedOnly)
 Set whether to show approved features and exclude unapproved features. More...
 
void setVectorType (VectorType show)
 Set whether to draw vectors from the feature center to the feature extents on the viewport. More...
 
QString menuName () const
 This is the name of the menu that should be passed into "addTo()". 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 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 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

QWidgetcreateToolBarWidget (QStackedWidget *parent)
 Creates the widget that goes on the tool bar when this tool is active. More...
 
QActiontoolPadAction (ToolPad *pad)
 Add this tool's action to the toolpad. More...
 
void mouseButtonRelease (QPoint p, Qt::MouseButton s)
 This handles a mouse release on one of the cube viewports when this tool is active. More...
 
void updateTool ()
 Updates the state of the current tool. More...
 
virtual void mouseDoubleClick (QPoint p)
 
virtual void mouseButtonPress (QPoint p, Qt::MouseButton s)
 
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 ()
 

Private Slots

void centerOnSelectedFeature ()
 Center the relevent viewport (and any viewports linked to it) on the feature selected in the feature selection combo box. More...
 
void configure ()
 Give a configuration dialog for the options available in this tool. More...
 
void featureSelected ()
 This handles a feature being selected in the feature list combo box. More...
 
void featuresIdentified (FeatureNomenclature *)
 A feature nomenclature has finished querying... More...
 
void findNomenclatureStateChanged (int)
 The 'Name Features' check box has changed state. More...
 
void nomenclaturePositionsOutdated ()
 Update the screen coordinates of the named features because the viewport has changed it's mappings. More...
 
void onToolActivated ()
 When this tool is activated (clicked on in the tool bar), turn ourselves on immediately. More...
 
void showDisclaimer ()
 Show the user our nomenclature disclaimer and make note that we have shown the disclaimer. More...
 

Private Member Functions

void centerOnFeature (MdiCubeViewport *vp, FeatureNomenclature::Feature)
 Center the given and any linked viewports (which contain the same feature) on the given feature. More...
 
void featuresForViewportFound (MdiCubeViewport *vp)
 Move the features from a searching state to a found state for the given viewport. More...
 
void findMissingNomenclature ()
 Update this tool's nomenclature data based on this tool's enabled state and the current viewport list. More...
 
void findMissingNomenclature (MdiCubeViewport *vp)
 Query for nomenclature on the given viewport. More...
 
void rebuildFeaturesCombo ()
 Rebuild m_foundFeaturesCombo's data from scratch. More...
 
void removeFeatureDisplay (MdiCubeViewport *vp)
 Remove knowledge of features on the given viewport. More...
 
void showFeatureDetails (FeatureNomenclature::Feature)
 Show a dialog with full feature details of a given feature. More...
 
void showFeatureWebsite (FeatureNomenclature::Feature)
 Show a web view pointed to the feature's web page. More...
 
void toolStateChanged ()
 This should be called any time this tool's enabled or searching state could have changed. More...
 
void viewportDone (MdiCubeViewport *vp)
 Finalize the search results for the given viewport. More...
 
ViewportFeatureDisplayviewportFeatureDisplay (MdiCubeViewport *vp)
 Map from viewport to feature display. More...
 
const ViewportFeatureDisplayviewportFeatureDisplay (MdiCubeViewport *vp) const
 Map from viewport to feature display. More...
 
bool viewportFeaturesFound (MdiCubeViewport *vp) const
 Test if features have already been found for a given viewport. More...
 
QList< MdiCubeViewport * > viewportsWithFoundNomenclature ()
 Get a list of viewports with found nomenclature. More...
 
void readSettings ()
 Read this tool's preserved state. More...
 
void writeSettings ()
 Write out this tool's preserved state between runs. More...
 

Private Attributes

QPointer< QActionm_action
 This is the 'Show Nomenclature' toggleable action in the options menu. More...
 
QPointer< QCheckBox > m_findNomenclatureCheckBox
 This is the 'Name Features' check box when this tool is active. More...
 
QPointer< QComboBoxm_foundFeaturesCombo
 This combo box lists all of the found features and their viewports. More...
 
QPointer< QPushButton > m_nomenclatureCenterBtn
 This is the 'Center' button in this tool's tool bar. More...
 
QPointer< QPushButton > m_nomenclatureOptionsBtn
 This is the 'Tool Options' button in this tool's tool bar. More...
 
QPointer< QPushButton > m_disclaimerBtn
 This is the 'Disclaimer' button in this tool's tool bar. More...
 
QPointer< QProgressBarm_queryingProgress
 This is a busy indicator that is visible when queries are out to the nomenclature database. More...
 
QList< ViewportFeatureDisplay > * m_foundNomenclature
 The nomenclature that has been identified, one for each viewport. More...
 
QMap< MdiCubeViewport *, FeatureNomenclature * > * m_nomenclatureSearchers
 The nomenclature being queried currently, one for each viewport that has no found nomenclature. More...
 
bool m_nomenclatureEnabled
 Do we find and display nomenclature? This corresponds to the 'Name Features' check box and the 'Show Nomenclature' action in the options menu. More...
 
QString m_disclaimerText
 The (HTML) contents of the disclaimer to show the user. More...
 
int m_fontSize
 The font size to use when naming features. More...
 
QColor * m_fontColor
 The color to use when drawing on the viewport. More...
 
bool m_defaultEnabled
 Do we turn ourselves on immediately? More...
 
bool m_disclaimedAlready
 Have we ever shown the user our disclaimer? More...
 
VectorType m_extentType
 How we need to draw extents (if at all) More...
 
bool m_showApprovedOnly
 Only show IAU approved features. More...
 

Detailed Description

Display nomenclature on MDI Cube Viewports.

This tool is designed to paint named features onto the viewports' displays. The nomenclature and it's positioning comes from the FeatureNomenclature class. Options such as auto-enabling from program start, showing vectors, font configurations, showing detailed feature information and linking back to the nomenclature website are built-in.

Author
2012-03-22 Steven Lambright and Jai Rideout
History:

2012-06-12 Steven Lambright and Kimberly Oyama - Implemented multiple extent types (Box, 4 Arrows, 8 Arrows). Added ability to hide unapproved or dropped features. Added appropriate mutators and accessors (showApprovedOnly(), vectorType(), setShowApprovedOnly(), setVectorType()). Added an enumerator for the vector types. Fixes #852. Fixes #892.

2012-06-26 Kimberly Oyama - Minor refactoring in the findMissingNomenclature() method. References #958.

2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis coding standards. References #972

2012-10-11 Debbie A. Cook, Updated to use new Target class. References Mantis tickets #775 and #1114.

2016-06-21 Kris Becker - Properly forward declare QPair as struct not class

Definition at line 56 of file FeatureNomenclatureTool.h.

Member Typedef Documentation

◆ CubeViewportList

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

A list of cubeviewports.

Definition at line 219 of file Tool.h.

Member Enumeration Documentation

◆ VectorType

Enumeration of extent vector typess.

Enumerator
None 

When using this vector (extent) type, no extents will be drawn.

Arrows4 

When using this vector (extent) type, 4 arrows will be drawn out from the text of the feature.

If an arrow doesn't extend past the text then it will not be drawn. The extents should look something like this:


^

<-— Feature Name ---—>

v


Arrows8 

When using this vector (extent) type, 8 arrows will be drawn out from the text of the feature.

If an arrow doesn't extend past the text then it will not be drawn. The extents would look similar to the 4 arrow version shown above. There would be 8 arrows extending to the marked points:

*

  • Feature Name *
     *             *

            *
Box 

When using this vector (extent) type, 4 arrows will be drawn out from the text of the feature.

If the arrow doesn't extend past the text then it will not be drawn. The extents should look something like this:


|Feature Name | |_____________|

Definition at line 62 of file FeatureNomenclatureTool.h.

Constructor & Destructor Documentation

◆ FeatureNomenclatureTool()

Isis::FeatureNomenclatureTool::FeatureNomenclatureTool ( QWidget parent)

◆ ~FeatureNomenclatureTool()

Isis::FeatureNomenclatureTool::~FeatureNomenclatureTool ( )

Cleans up memory allocated by this tool.

Definition at line 98 of file FeatureNomenclatureTool.cpp.

References m_foundNomenclature, and m_nomenclatureSearchers.

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.

Definition at line 253 of file Tool.h.

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

◆ addTo() [1/4]

◆ addTo() [2/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().

◆ addTo() [3/4]

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

Add the 'Show Nomenclature' option to the options menu.

Parameters
menuMenu to add 'Show Nomenclature' to.

Reimplemented from Isis::Tool.

Definition at line 116 of file FeatureNomenclatureTool.cpp.

References m_action, m_findNomenclatureCheckBox, and m_nomenclatureEnabled.

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

Definition at line 45 of file Tool.cpp.

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

◆ centerOnFeature()

void Isis::FeatureNomenclatureTool::centerOnFeature ( MdiCubeViewport vp,
FeatureNomenclature::Feature  feature 
)
private

Center the given and any linked viewports (which contain the same feature) on the given feature.

This also prioritizes the feature to display on top of the other features in the viewport(s) which center on the feature.

Parameters
vpThe viewport to center (and to use for finding linked viewports)
featureThe feature to center on the viewport

Definition at line 550 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::centerFeature(), Isis::MdiCubeViewport::isLinked(), viewportFeatureDisplay(), and viewportsWithFoundNomenclature().

Referenced by centerOnSelectedFeature(), and Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleMouseClicked().

◆ centerOnSelectedFeature

void Isis::FeatureNomenclatureTool::centerOnSelectedFeature ( )
privateslot

Center the relevent viewport (and any viewports linked to it) on the feature selected in the feature selection combo box.

Definition at line 413 of file FeatureNomenclatureTool.cpp.

References centerOnFeature(), and m_foundFeaturesCombo.

Referenced by createToolBarWidget().

◆ configure

void Isis::FeatureNomenclatureTool::configure ( )
privateslot

Give a configuration dialog for the options available in this tool.

Definition at line 432 of file FeatureNomenclatureTool.cpp.

Referenced by createToolBarWidget().

◆ createToolBarWidget()

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

Creates the widget that goes on the tool bar when this tool is active.

Parameters
parent
Returns
QWidget*

Reimplemented from Isis::Tool.

Definition at line 303 of file FeatureNomenclatureTool.cpp.

References centerOnSelectedFeature(), configure(), featureSelected(), findNomenclatureStateChanged(), m_disclaimerBtn, m_findNomenclatureCheckBox, m_foundFeaturesCombo, m_nomenclatureCenterBtn, m_nomenclatureEnabled, m_nomenclatureOptionsBtn, m_queryingProgress, and showDisclaimer().

◆ 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 Isis::WindowTool::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(), 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(), Isis::WindowTool::removeConnections(), Isis::TrackTool::removeConnections(), Isis::RubberBandTool::repaint(), Isis::WindowTool::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(), Isis::WindowTool::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(), Isis::WindowTool::changeCursor(), Isis::FileTool::closeAll(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::MatchTool::createPoint(), Isis::BlinkTool::eventFilter(), featuresIdentified(), findMissingNomenclature(), findNomenclatureStateChanged(), Isis::FindTool::handleLinkClicked(), Isis::WindowTool::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(), Isis::WindowTool::resizeWindows(), Isis::BlinkTool::reverse(), Isis::ZoomTool::rubberBandComplete(), Isis::MatchTool::serialNumberList(), Isis::ControlNetTool::setControlNet(), setFontColor(), setFontSize(), setShowApprovedOnly(), Isis::StretchTool::setStretchAllViewports(), setVectorType(), Isis::StretchTool::stretchGlobalAllViewports(), Isis::BlinkTool::toggleLink(), Isis::WindowTool::unlinkWindows(), Isis::MeasureTool::updateMeasure(), Isis::AdvancedTrackTool::updateRow(), Isis::WindowTool::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().

◆ defaultEnabled()

bool Isis::FeatureNomenclatureTool::defaultEnabled ( ) const

Is this tool enabled by default? (i.e.

on program start)

Returns
True if this tool is automatically enabled

Definition at line 151 of file FeatureNomenclatureTool.cpp.

References m_defaultEnabled.

Referenced by Isis::NomenclatureToolConfigDialog::readSettings(), and setDefaultEnabled().

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

◆ featureSelected

void Isis::FeatureNomenclatureTool::featureSelected ( )
privateslot

This handles a feature being selected in the feature list combo box.

The 'Center' button's enabled state is set to reflect if a feature is selected and the tool is enabled.

Definition at line 447 of file FeatureNomenclatureTool.cpp.

References m_foundFeaturesCombo, m_nomenclatureCenterBtn, and m_nomenclatureEnabled.

Referenced by createToolBarWidget(), and toolStateChanged().

◆ featuresForViewportFound()

void Isis::FeatureNomenclatureTool::featuresForViewportFound ( MdiCubeViewport vp)
private

◆ featuresIdentified

void Isis::FeatureNomenclatureTool::featuresIdentified ( FeatureNomenclature searcher)
privateslot

A feature nomenclature has finished querying...

we need to translate the features into visible names.

Definition at line 463 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewportList(), featuresForViewportFound(), m_nomenclatureEnabled, m_nomenclatureSearchers, and viewportDone().

Referenced by findMissingNomenclature().

◆ findMissingNomenclature() [1/2]

void Isis::FeatureNomenclatureTool::findMissingNomenclature ( )
private

Update this tool's nomenclature data based on this tool's enabled state and the current viewport list.

This will always remove results of viewports that no longer exist. If displaying nomenclature is enabled, then this will also look for features on any viewports that don't have results and aren't currently querying.

Definition at line 695 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewportList(), m_nomenclatureEnabled, m_nomenclatureSearchers, rebuildFeaturesCombo(), removeFeatureDisplay(), viewportFeaturesFound(), and viewportsWithFoundNomenclature().

Referenced by findNomenclatureStateChanged(), and updateTool().

◆ findMissingNomenclature() [2/2]

void Isis::FeatureNomenclatureTool::findMissingNomenclature ( MdiCubeViewport vp)
private

Query for nomenclature on the given viewport.

Parameters
vpA viewport that both has no results and is not currently querying the nomenclature database.

Definition at line 734 of file FeatureNomenclatureTool.cpp.

References Isis::CubeViewport::camera(), Isis::CubeViewport::cube(), featuresIdentified(), Isis::UniversalGroundMap::GroundRange(), Isis::PvlContainer::hasKeyword(), Isis::Target::name(), Isis::CubeViewport::projection(), Isis::Spice::target(), toolStateChanged(), Isis::CubeViewport::universalGroundMap(), and viewportDone().

◆ findNomenclatureStateChanged

void Isis::FeatureNomenclatureTool::findNomenclatureStateChanged ( int  newState)
privateslot

The 'Name Features' check box has changed state.

Handle identifying any missing features and naming any already-found features if enabling, hide all names if disabling.

Definition at line 487 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewportList(), findMissingNomenclature(), m_nomenclatureEnabled, and toolStateChanged().

Referenced by createToolBarWidget().

◆ fontColor()

QColor Isis::FeatureNomenclatureTool::fontColor ( ) const

What is the font color to use?

Returns
Color that is used for painting features

Definition at line 161 of file FeatureNomenclatureTool.cpp.

References m_fontColor.

Referenced by Isis::NomenclatureToolConfigDialog::readSettings().

◆ fontSize()

int Isis::FeatureNomenclatureTool::fontSize ( ) const

Retrieve the font size of the features in this tool.

Returns
Font point size used to render feature names

Definition at line 171 of file FeatureNomenclatureTool.cpp.

References m_fontSize.

Referenced by Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleViewChanged(), and Isis::NomenclatureToolConfigDialog::readSettings().

◆ menuName()

QString Isis::FeatureNomenclatureTool::menuName ( ) const
virtual

This is the name of the menu that should be passed into "addTo()".

Returns
The options menu's name

Reimplemented from Isis::Tool.

Definition at line 291 of file FeatureNomenclatureTool.cpp.

◆ 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::FeatureNomenclatureTool::mouseButtonRelease ( QPoint  p,
Qt::MouseButton  s 
)
protectedvirtual

This handles a mouse release on one of the cube viewports when this tool is active.

The responsibilities are forwarde to ViewportFeatureDisplay::handleMouseClicked().

Parameters
pThe point in the viewport where the mouse was released
sThe mouse buttons that were released

Reimplemented from Isis::Tool.

Definition at line 391 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewport(), Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleMouseClicked(), m_nomenclatureEnabled, and viewportFeatureDisplay().

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

◆ nomenclaturePositionsOutdated

void Isis::FeatureNomenclatureTool::nomenclaturePositionsOutdated ( )
privateslot

Update the screen coordinates of the named features because the viewport has changed it's mappings.

This uses the already found cube sample, line positions... it just needs to do the appropriate transformations from cube to viewport. This method does not cause a repaint.

Definition at line 510 of file FeatureNomenclatureTool.cpp.

References m_foundNomenclature, and m_nomenclatureEnabled.

Referenced by setFontSize(), setShowApprovedOnly(), setVectorType(), and viewportDone().

◆ onToolActivated

void Isis::FeatureNomenclatureTool::onToolActivated ( )
privateslot

When this tool is activated (clicked on in the tool bar), turn ourselves on immediately.

Definition at line 524 of file FeatureNomenclatureTool.cpp.

References m_findNomenclatureCheckBox.

Referenced by FeatureNomenclatureTool().

◆ paintViewport()

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

Paint features on the given viewport.

Parameters
vpThe viewport that needs painted
painterThe painter to use for painting

Reimplemented from Isis::Tool.

Definition at line 132 of file FeatureNomenclatureTool.cpp.

References m_extentType, m_fontColor, m_fontSize, m_nomenclatureEnabled, m_showApprovedOnly, None, Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::paint(), viewportFeatureDisplay(), and viewportFeaturesFound().

◆ readSettings()

void Isis::FeatureNomenclatureTool::readSettings ( )
private

Read this tool's preserved state.

This uses the current state as defaults, so please make sure your variables are initialized before calling this method.

Definition at line 990 of file FeatureNomenclatureTool.cpp.

References Isis::FileName::expanded(), m_defaultEnabled, m_disclaimedAlready, m_extentType, m_fontColor, m_fontSize, and m_showApprovedOnly.

Referenced by FeatureNomenclatureTool().

◆ rebuildFeaturesCombo()

void Isis::FeatureNomenclatureTool::rebuildFeaturesCombo ( )
private

Rebuild m_foundFeaturesCombo's data from scratch.

This should only be necessary when viewports are lost.

Definition at line 783 of file FeatureNomenclatureTool.cpp.

References featuresForViewportFound(), m_foundFeaturesCombo, and viewportsWithFoundNomenclature().

Referenced by findMissingNomenclature(), and setShowApprovedOnly().

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

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.

Definition at line 261 of file Tool.h.

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

◆ removeFeatureDisplay()

void Isis::FeatureNomenclatureTool::removeFeatureDisplay ( MdiCubeViewport vp)
private

Remove knowledge of features on the given viewport.

The viewport does not have to be a valid (allocated) pointer.

Parameters
vpThe viewport to forget.

Definition at line 801 of file FeatureNomenclatureTool.cpp.

References m_foundNomenclature.

Referenced by findMissingNomenclature().

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

◆ setCubeViewport

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

◆ setDefaultEnabled()

void Isis::FeatureNomenclatureTool::setDefaultEnabled ( bool  defaultEnabled)

Set whether this tool is enabled by default.

Parameters
defaultEnabledTrue to enable by default

Definition at line 201 of file FeatureNomenclatureTool.cpp.

References defaultEnabled(), m_defaultEnabled, and writeSettings().

Referenced by Isis::NomenclatureToolConfigDialog::applySettings().

◆ setFontColor()

void Isis::FeatureNomenclatureTool::setFontColor ( QColor  color)

Set the color to use for drawing on the viewport.

This takes effect immediately.

Parameters
colorThe color to use for drawing

Definition at line 215 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewportList(), m_fontColor, and writeSettings().

Referenced by Isis::NomenclatureToolConfigDialog::applySettings().

◆ setFontSize()

void Isis::FeatureNomenclatureTool::setFontSize ( int  newFontSize)

Set the font point size to use for drawing text on the viewport.

This takes effect immediately.

Parameters
newFontSizeThe font point size to use for rendering text

Definition at line 232 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewportList(), m_fontSize, nomenclaturePositionsOutdated(), and writeSettings().

Referenced by Isis::NomenclatureToolConfigDialog::applySettings().

◆ setShowApprovedOnly()

void Isis::FeatureNomenclatureTool::setShowApprovedOnly ( bool  approvedOnly)

Set whether to show approved features and exclude unapproved features.

Parameters
approvedOnlyTrue to show only appproved features

Definition at line 250 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewportList(), m_showApprovedOnly, nomenclaturePositionsOutdated(), rebuildFeaturesCombo(), and writeSettings().

Referenced by Isis::NomenclatureToolConfigDialog::applySettings().

◆ setVectorType()

void Isis::FeatureNomenclatureTool::setVectorType ( VectorType  show)

Set whether to draw vectors from the feature center to the feature extents on the viewport.

This takes effect immediately.

Parameters
showTrue to show the vectors

Definition at line 269 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::cubeViewportList(), m_extentType, m_foundNomenclature, nomenclaturePositionsOutdated(), and writeSettings().

Referenced by Isis::NomenclatureToolConfigDialog::applySettings().

◆ showApprovedOnly()

bool Isis::FeatureNomenclatureTool::showApprovedOnly ( ) const

Show approved features only?

Returns
True if we're showing only approved features.

Definition at line 181 of file FeatureNomenclatureTool.cpp.

References m_showApprovedOnly.

Referenced by Isis::NomenclatureToolConfigDialog::readSettings().

◆ showDisclaimer

void Isis::FeatureNomenclatureTool::showDisclaimer ( )
privateslot

Show the user our nomenclature disclaimer and make note that we have shown the disclaimer.

Definition at line 534 of file FeatureNomenclatureTool.cpp.

References m_disclaimedAlready, m_disclaimerText, and writeSettings().

Referenced by createToolBarWidget(), and toolStateChanged().

◆ showFeatureDetails()

void Isis::FeatureNomenclatureTool::showFeatureDetails ( FeatureNomenclature::Feature  feature)
private

Show a dialog with full feature details of a given feature.

Parameters
featureThe feature to describe

Definition at line 814 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclature::Feature::toWidget().

Referenced by Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleMouseClicked().

◆ showFeatureWebsite()

void Isis::FeatureNomenclatureTool::showFeatureWebsite ( FeatureNomenclature::Feature  feature)
private

Show a web view pointed to the feature's web page.

Parameters
featureThe feature to bring up in the web view

Definition at line 847 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclature::Feature::referenceUrl().

Referenced by Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleMouseClicked().

◆ toolIconDir()

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

◆ toolPadAction()

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

Add this tool's action to the toolpad.

This defines the name and hotkey of this tool.

Parameters
toolpad
Returns
QAction*

Reimplemented from Isis::Tool.

Definition at line 364 of file FeatureNomenclatureTool.cpp.

References Isis::Tool::toolIconDir().

◆ toolStateChanged()

void Isis::FeatureNomenclatureTool::toolStateChanged ( )
private

This should be called any time this tool's enabled or searching state could have changed.

This enabled/disables and shows/hides widgets appropriately to match the current state.

Definition at line 858 of file FeatureNomenclatureTool.cpp.

References featureSelected(), m_action, m_disclaimedAlready, m_findNomenclatureCheckBox, m_nomenclatureCenterBtn, m_nomenclatureEnabled, m_nomenclatureSearchers, m_queryingProgress, and showDisclaimer().

Referenced by findMissingNomenclature(), findNomenclatureStateChanged(), and viewportDone().

◆ updateTool()

void Isis::FeatureNomenclatureTool::updateTool ( )
protectedvirtual

Updates the state of the current tool.

This will find any missing nomenclature if appropriate.

Reimplemented from Isis::Tool.

Definition at line 404 of file FeatureNomenclatureTool.cpp.

References findMissingNomenclature().

◆ vectorType()

◆ viewportDone()

void Isis::FeatureNomenclatureTool::viewportDone ( MdiCubeViewport vp)
private

Finalize the search results for the given viewport.

The viewport doesn't have to be a valid (allocated) pointer. This will destroy any searchers with the given viewport, and if there are no found results for the viewport this will create a blank one as a place holder. This prevents searching for features on the viewport again.

Parameters
vpThe viewport to finalize the search results for

Definition at line 892 of file FeatureNomenclatureTool.cpp.

References m_extentType, m_foundNomenclature, m_nomenclatureSearchers, nomenclaturePositionsOutdated(), Isis::Tool::screenPixelsChanged(), toolStateChanged(), and viewportFeatureDisplay().

Referenced by featuresIdentified(), and findMissingNomenclature().

◆ viewportFeatureDisplay() [1/2]

FeatureNomenclatureTool::ViewportFeatureDisplay * Isis::FeatureNomenclatureTool::viewportFeatureDisplay ( MdiCubeViewport vp)
private

Map from viewport to feature display.

Parameters
vpThe viewport to map
Returns
NULL if there is no found nomenclature for the viewport, otherwise the appropriate feature display.

Definition at line 923 of file FeatureNomenclatureTool.cpp.

References m_foundNomenclature.

Referenced by centerOnFeature(), featuresForViewportFound(), mouseButtonRelease(), paintViewport(), viewportDone(), and viewportFeaturesFound().

◆ viewportFeatureDisplay() [2/2]

const FeatureNomenclatureTool::ViewportFeatureDisplay * Isis::FeatureNomenclatureTool::viewportFeatureDisplay ( MdiCubeViewport vp) const
private

Map from viewport to feature display.

Parameters
vpThe viewport to map
Returns
NULL if there is no found nomenclature for the viewport, otherwise the appropriate feature display.

Definition at line 941 of file FeatureNomenclatureTool.cpp.

References m_foundNomenclature.

◆ viewportFeaturesFound()

bool Isis::FeatureNomenclatureTool::viewportFeaturesFound ( MdiCubeViewport vp) const
private

Test if features have already been found for a given viewport.

Parameters
vpThe viewport to test
Returns
True if features have been found, false if we're either still searching for features or haven't started searching for features on the viewport.

Definition at line 960 of file FeatureNomenclatureTool.cpp.

References viewportFeatureDisplay().

Referenced by findMissingNomenclature(), and paintViewport().

◆ viewportsWithFoundNomenclature()

QList< MdiCubeViewport * > Isis::FeatureNomenclatureTool::viewportsWithFoundNomenclature ( )
private

Get a list of viewports with found nomenclature.

This may include viewports that no longer exist but haven't been cleaned up already.

Returns
A list of viewports with a feature display.

Definition at line 973 of file FeatureNomenclatureTool.cpp.

References m_foundNomenclature.

Referenced by centerOnFeature(), findMissingNomenclature(), and rebuildFeaturesCombo().

◆ writeSettings()

void Isis::FeatureNomenclatureTool::writeSettings ( )
private

Write out this tool's preserved state between runs.

This is NOT called on close, so you should call this any time you change the preserved state.

Definition at line 1012 of file FeatureNomenclatureTool.cpp.

References Isis::FileName::expanded(), m_defaultEnabled, m_disclaimedAlready, m_extentType, m_fontColor, m_fontSize, and m_showApprovedOnly.

Referenced by setDefaultEnabled(), setFontColor(), setFontSize(), setShowApprovedOnly(), setVectorType(), and showDisclaimer().

Member Data Documentation

◆ m_action

QPointer<QAction> Isis::FeatureNomenclatureTool::m_action
private

This is the 'Show Nomenclature' toggleable action in the options menu.

Definition at line 324 of file FeatureNomenclatureTool.h.

Referenced by addTo(), and toolStateChanged().

◆ m_defaultEnabled

bool Isis::FeatureNomenclatureTool::m_defaultEnabled
private

Do we turn ourselves on immediately?

Definition at line 374 of file FeatureNomenclatureTool.h.

Referenced by defaultEnabled(), FeatureNomenclatureTool(), readSettings(), setDefaultEnabled(), and writeSettings().

◆ m_disclaimedAlready

bool Isis::FeatureNomenclatureTool::m_disclaimedAlready
private

Have we ever shown the user our disclaimer?

Definition at line 376 of file FeatureNomenclatureTool.h.

Referenced by FeatureNomenclatureTool(), readSettings(), showDisclaimer(), toolStateChanged(), and writeSettings().

◆ m_disclaimerBtn

QPointer<QPushButton> Isis::FeatureNomenclatureTool::m_disclaimerBtn
private

This is the 'Disclaimer' button in this tool's tool bar.

Definition at line 343 of file FeatureNomenclatureTool.h.

Referenced by createToolBarWidget(), and FeatureNomenclatureTool().

◆ m_disclaimerText

QString Isis::FeatureNomenclatureTool::m_disclaimerText
private

The (HTML) contents of the disclaimer to show the user.

Definition at line 367 of file FeatureNomenclatureTool.h.

Referenced by FeatureNomenclatureTool(), and showDisclaimer().

◆ m_extentType

VectorType Isis::FeatureNomenclatureTool::m_extentType
private

◆ m_findNomenclatureCheckBox

QPointer<QCheckBox> Isis::FeatureNomenclatureTool::m_findNomenclatureCheckBox
private

This is the 'Name Features' check box when this tool is active.

Definition at line 327 of file FeatureNomenclatureTool.h.

Referenced by addTo(), createToolBarWidget(), FeatureNomenclatureTool(), featuresForViewportFound(), onToolActivated(), and toolStateChanged().

◆ m_fontColor

QColor* Isis::FeatureNomenclatureTool::m_fontColor
private

The color to use when drawing on the viewport.

Definition at line 372 of file FeatureNomenclatureTool.h.

Referenced by FeatureNomenclatureTool(), fontColor(), paintViewport(), readSettings(), setFontColor(), and writeSettings().

◆ m_fontSize

int Isis::FeatureNomenclatureTool::m_fontSize
private

The font size to use when naming features.

Definition at line 370 of file FeatureNomenclatureTool.h.

Referenced by FeatureNomenclatureTool(), fontSize(), paintViewport(), readSettings(), setFontSize(), and writeSettings().

◆ m_foundFeaturesCombo

QPointer<QComboBox> Isis::FeatureNomenclatureTool::m_foundFeaturesCombo
private

This combo box lists all of the found features and their viewports.

The data stored in this combo box is of format:

Map<QString, QVariant>: "Viewport" -> MdiCubeViewport* "Feature" -> FeatureNomenclature::Feature "Target" -> QString(target name, all upper case)

Definition at line 337 of file FeatureNomenclatureTool.h.

Referenced by centerOnSelectedFeature(), createToolBarWidget(), FeatureNomenclatureTool(), featureSelected(), featuresForViewportFound(), and rebuildFeaturesCombo().

◆ m_foundNomenclature

QList<ViewportFeatureDisplay>* Isis::FeatureNomenclatureTool::m_foundNomenclature
private

◆ m_nomenclatureCenterBtn

QPointer<QPushButton> Isis::FeatureNomenclatureTool::m_nomenclatureCenterBtn
private

This is the 'Center' button in this tool's tool bar.

Definition at line 339 of file FeatureNomenclatureTool.h.

Referenced by createToolBarWidget(), FeatureNomenclatureTool(), featureSelected(), and toolStateChanged().

◆ m_nomenclatureEnabled

bool Isis::FeatureNomenclatureTool::m_nomenclatureEnabled
private

Do we find and display nomenclature? This corresponds to the 'Name Features' check box and the 'Show Nomenclature' action in the options menu.

Definition at line 364 of file FeatureNomenclatureTool.h.

Referenced by addTo(), createToolBarWidget(), FeatureNomenclatureTool(), featureSelected(), featuresIdentified(), findMissingNomenclature(), findNomenclatureStateChanged(), mouseButtonRelease(), nomenclaturePositionsOutdated(), paintViewport(), and toolStateChanged().

◆ m_nomenclatureOptionsBtn

QPointer<QPushButton> Isis::FeatureNomenclatureTool::m_nomenclatureOptionsBtn
private

This is the 'Tool Options' button in this tool's tool bar.

Definition at line 341 of file FeatureNomenclatureTool.h.

Referenced by createToolBarWidget(), and FeatureNomenclatureTool().

◆ m_nomenclatureSearchers

QMap< MdiCubeViewport *, FeatureNomenclature *>* Isis::FeatureNomenclatureTool::m_nomenclatureSearchers
private

The nomenclature being queried currently, one for each viewport that has no found nomenclature.

Definition at line 357 of file FeatureNomenclatureTool.h.

Referenced by FeatureNomenclatureTool(), featuresForViewportFound(), featuresIdentified(), findMissingNomenclature(), toolStateChanged(), viewportDone(), and ~FeatureNomenclatureTool().

◆ m_queryingProgress

QPointer<QProgressBar> Isis::FeatureNomenclatureTool::m_queryingProgress
private

This is a busy indicator that is visible when queries are out to the nomenclature database.

Definition at line 348 of file FeatureNomenclatureTool.h.

Referenced by createToolBarWidget(), FeatureNomenclatureTool(), and toolStateChanged().

◆ m_showApprovedOnly

bool Isis::FeatureNomenclatureTool::m_showApprovedOnly
private

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