Isis 3 Programmer Reference
Isis::FeatureNomenclatureTool::ViewportFeatureDisplay Class Reference

The feature display on a single viewport. More...

Collaboration diagram for Isis::FeatureNomenclatureTool::ViewportFeatureDisplay:
Collaboration graph

Public Member Functions

 ViewportFeatureDisplay ()
 Create a blank feature display.
 
 ViewportFeatureDisplay (FeatureNomenclatureTool *tool, MdiCubeViewport *sourceViewport, QList< FeatureNomenclature::Feature > features, VectorType vectorType)
 Create a feature display for a given viewport.
 
 ViewportFeatureDisplay (const ViewportFeatureDisplay &other)
 Copy another feature display.
 
 ~ViewportFeatureDisplay ()
 Cleans up memory allocated by this feature display.
 
void applyExtentType (VectorType vectorType)
 Apply the extent type to all of the features for the source viewport.
 
void centerFeature (FeatureNomenclature::Feature)
 Center the viewport on this feature.
 
QList< FeatureNomenclature::Featurefeatures ()
 Get a list of features available on this viewport.
 
QList< FeaturePositionfeaturePositions ()
 Get the list of feature positions for a given display.
 
MdiCubeViewportsourceViewport () const
 Get the viewport associated with this feature display.
 
void paint (QPainter *painter, bool showVectors, VectorType vectorType, bool approvedOnly) const
 Paint features onto the viewport.
 
void handleMouseClicked (FeatureNomenclatureTool *tool, QPoint p, Qt::MouseButton s)
 Handle a mouse click event on the viewport.
 
void handleViewChanged (FeatureNomenclatureTool *tool)
 The display options or area on the viewport has changed.
 
void swap (ViewportFeatureDisplay &other)
 Swap *this and other's member data in an exception-free way.
 
ViewportFeatureDisplayoperator= (const ViewportFeatureDisplay &rhs)
 Copy the data of rhs into *this.
 

Private Member Functions

QPair< QPointF, QPointF > viewportCubeRange () const
 Get the min/max cube line/sample positions of the viewport.
 

Private Attributes

MdiCubeViewportm_sourceViewport
 The viewport this display is working with; we paint onto this viewport and react to events on this viewport.
 
QList< FeaturePosition > * m_features
 The features on the image in m_sourceViewport.
 
QList< FeatureDisplayPosition > * m_featureScreenAreas
 The visible features on the image in m_sourceViewport.
 
QPair< QPointF, QPointF > * m_viewportCubeRange
 A check to make sure the cube viewport is in the correct state for painting.
 

Detailed Description

The feature display on a single viewport.

This class encapsulates everything to do with displaying found features on a single viewport.

Author
2012-03-22 Steven Lambright and Jai Rideout
History
2012-06-06 Steven Lambright and Kimberly Oyama - Added support for multiple extent/vector types (ViewportFeatureDisplay(), applyExtentType(), features()). Fixes #852. Fixes #892.

Definition at line 275 of file FeatureNomenclatureTool.h.

Constructor & Destructor Documentation

◆ ViewportFeatureDisplay() [1/3]

Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::ViewportFeatureDisplay ( )

Create a blank feature display.

Definition at line 1415 of file FeatureNomenclatureTool.cpp.

◆ ViewportFeatureDisplay() [2/3]

Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::ViewportFeatureDisplay ( FeatureNomenclatureTool * tool,
MdiCubeViewport * sourceViewport,
QList< FeatureNomenclature::Feature > features,
VectorType vectorType )

Create a feature display for a given viewport.

Parameters
toolThe tool that has the appropriate view settings
sourceViewportThe viewport that this display will be used for
featuresThe named features that are in the image in the viewport
vectorTypeThe type of extent vector to display

Definition at line 1435 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclature::featureDiameterGreaterThan(), and Isis::FeatureNomenclatureTool::vectorType().

◆ ViewportFeatureDisplay() [3/3]

Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::ViewportFeatureDisplay ( const ViewportFeatureDisplay & other)

Copy another feature display.

Parameters
otherThe feature display to copy

Definition at line 1466 of file FeatureNomenclatureTool.cpp.

◆ ~ViewportFeatureDisplay()

Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::~ViewportFeatureDisplay ( )

Cleans up memory allocated by this feature display.

Definition at line 1484 of file FeatureNomenclatureTool.cpp.

Member Function Documentation

◆ applyExtentType()

void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::applyExtentType ( VectorType vectorType)

Apply the extent type to all of the features for the source viewport.

Parameters
vectorTypeThe type of extents to be drawn

Definition at line 1503 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclatureTool::vectorType().

◆ centerFeature()

void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::centerFeature ( FeatureNomenclature::Feature feature)

Center the viewport on this feature.

This also brings the feature to the top of the drawing priority list.

Parameters
featureThe feature to center on

Definition at line 1516 of file FeatureNomenclatureTool.cpp.

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

Referenced by Isis::FeatureNomenclatureTool::centerOnFeature().

◆ featurePositions()

QList< FeatureNomenclatureTool::FeaturePosition > Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::featurePositions ( )

Get the list of feature positions for a given display.

Returns
The feature positions of the display.

Definition at line 1564 of file FeatureNomenclatureTool.cpp.

◆ features()

QList< FeatureNomenclature::Feature > Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::features ( )

Get a list of features available on this viewport.

Returns
The features that successfully project into the image on this viewport

Definition at line 1548 of file FeatureNomenclatureTool.cpp.

Referenced by Isis::FeatureNomenclatureTool::featuresForViewportFound().

◆ handleMouseClicked()

void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleMouseClicked ( FeatureNomenclatureTool * tool,
QPoint p,
Qt::MouseButton s )

Handle a mouse click event on the viewport.

Parameters
toolThe feature nomenclature tool that can show the user informative dialogs and can be controlled through this action.
pThe viewport screen pixel coordinates of the mouse click
sThe mouse buttons that were clicked.

Definition at line 1720 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclature::Feature::displayName(), and Isis::FeatureNomenclature::Feature::referenceUrl().

Referenced by Isis::FeatureNomenclatureTool::mouseButtonRelease().

◆ handleViewChanged()

void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleViewChanged ( FeatureNomenclatureTool * tool)

The display options or area on the viewport has changed.

We need to figure out what's visible where again.

Parameters
toolThe nomenclature tool with the appropriate view preferences

Definition at line 1774 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclature::Approved, Isis::FeatureNomenclatureTool::Box, Isis::FeatureNomenclature::Feature::name(), Isis::FeatureNomenclatureTool::None, and Isis::FeatureNomenclature::Feature::status().

◆ operator=()

FeatureNomenclatureTool::ViewportFeatureDisplay & Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::operator= ( const ViewportFeatureDisplay & rhs)

Copy the data of rhs into *this.

This assignment operator is exception safe.

Parameters
rhsThe instance on the right hand side of the '=' operator.
Returns
*this

Definition at line 1887 of file FeatureNomenclatureTool.cpp.

◆ paint()

void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::paint ( QPainter * painter,
bool showVectors,
VectorType vectorType,
bool approvedOnly ) const

Paint features onto the viewport.

Parameters
painterThe painter to use for painting on the viewport
showVectorsTrue if we're painting the vectors
vectorTypeThe extent type to paint
approvedOnlyTrue if only painting approved features

Definition at line 1593 of file FeatureNomenclatureTool.cpp.

References Isis::FeatureNomenclatureTool::Box, Isis::Angle::Degrees, Isis::FeatureNomenclature::Feature::name(), Isis::FeatureNomenclatureTool::FeatureDisplayPosition::textArea(), and Isis::FeatureNomenclatureTool::vectorType().

◆ sourceViewport()

MdiCubeViewport * Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::sourceViewport ( ) const

Get the viewport associated with this feature display.

Returns
The viewport that this display is supposed to work with.

Definition at line 1580 of file FeatureNomenclatureTool.cpp.

◆ swap()

void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::swap ( ViewportFeatureDisplay & other)

Swap *this and other's member data in an exception-free way.

Parameters
otherThe instance to trade member data with

Definition at line 1870 of file FeatureNomenclatureTool.cpp.

◆ viewportCubeRange()

QPair< QPointF, QPointF > Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::viewportCubeRange ( ) const
private

Get the min/max cube line/sample positions of the viewport.

This is designed to be used to detect viewport repositioning/screen pixels changing to block painting when we're out of sync.

Returns
The pair of minimum coordinates

Definition at line 1903 of file FeatureNomenclatureTool.cpp.

Member Data Documentation

◆ m_features

QList<FeaturePosition>* Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::m_features
private

The features on the image in m_sourceViewport.

Definition at line 311 of file FeatureNomenclatureTool.h.

◆ m_featureScreenAreas

QList<FeatureDisplayPosition>* Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::m_featureScreenAreas
private

The visible features on the image in m_sourceViewport.

Definition at line 313 of file FeatureNomenclatureTool.h.

◆ m_sourceViewport

MdiCubeViewport* Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::m_sourceViewport
private

The viewport this display is working with; we paint onto this viewport and react to events on this viewport.

Definition at line 309 of file FeatureNomenclatureTool.h.

◆ m_viewportCubeRange

QPair<QPointF, QPointF>* Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::m_viewportCubeRange
private

A check to make sure the cube viewport is in the correct state for painting.

Sometimes (mac laptop ssh'd to linux) paints happen before handleViewChanged().

Definition at line 319 of file FeatureNomenclatureTool.h.


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