Isis 3 Programmer Reference
|
The feature display on a single viewport. More...
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::Feature > | features () |
Get a list of features available on this viewport. | |
QList< FeaturePosition > | featurePositions () |
Get the list of feature positions for a given display. | |
MdiCubeViewport * | sourceViewport () 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. | |
ViewportFeatureDisplay & | operator= (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 | |
MdiCubeViewport * | m_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. | |
The feature display on a single viewport.
This class encapsulates everything to do with displaying found features on a single viewport.
Definition at line 275 of file FeatureNomenclatureTool.h.
Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::ViewportFeatureDisplay | ( | ) |
Create a blank feature display.
Definition at line 1415 of file FeatureNomenclatureTool.cpp.
Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::ViewportFeatureDisplay | ( | FeatureNomenclatureTool * | tool, |
MdiCubeViewport * | sourceViewport, | ||
QList< FeatureNomenclature::Feature > | features, | ||
VectorType | vectorType ) |
Create a feature display for a given viewport.
tool | The tool that has the appropriate view settings |
sourceViewport | The viewport that this display will be used for |
features | The named features that are in the image in the viewport |
vectorType | The type of extent vector to display |
Definition at line 1435 of file FeatureNomenclatureTool.cpp.
References Isis::FeatureNomenclature::featureDiameterGreaterThan(), and Isis::FeatureNomenclatureTool::vectorType().
Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::ViewportFeatureDisplay | ( | const ViewportFeatureDisplay & | other | ) |
Copy another feature display.
other | The feature display to copy |
Definition at line 1466 of file FeatureNomenclatureTool.cpp.
Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::~ViewportFeatureDisplay | ( | ) |
Cleans up memory allocated by this feature display.
Definition at line 1484 of file FeatureNomenclatureTool.cpp.
void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::applyExtentType | ( | VectorType | vectorType | ) |
Apply the extent type to all of the features for the source viewport.
vectorType | The type of extents to be drawn |
Definition at line 1503 of file FeatureNomenclatureTool.cpp.
References Isis::FeatureNomenclatureTool::vectorType().
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.
feature | The feature to center on |
Definition at line 1516 of file FeatureNomenclatureTool.cpp.
References Isis::FeatureNomenclature::Feature::displayName().
Referenced by Isis::FeatureNomenclatureTool::centerOnFeature().
QList< FeatureNomenclatureTool::FeaturePosition > Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::featurePositions | ( | ) |
Get the list of feature positions for a given display.
Definition at line 1564 of file FeatureNomenclatureTool.cpp.
QList< FeatureNomenclature::Feature > Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::features | ( | ) |
Get a list of features available on this viewport.
Definition at line 1548 of file FeatureNomenclatureTool.cpp.
Referenced by Isis::FeatureNomenclatureTool::featuresForViewportFound().
void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::handleMouseClicked | ( | FeatureNomenclatureTool * | tool, |
QPoint | p, | ||
Qt::MouseButton | s ) |
Handle a mouse click event on the viewport.
tool | The feature nomenclature tool that can show the user informative dialogs and can be controlled through this action. |
p | The viewport screen pixel coordinates of the mouse click |
s | The 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().
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.
tool | The 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().
FeatureNomenclatureTool::ViewportFeatureDisplay & Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::operator= | ( | const ViewportFeatureDisplay & | rhs | ) |
Copy the data of rhs into *this.
This assignment operator is exception safe.
rhs | The instance on the right hand side of the '=' operator. |
Definition at line 1887 of file FeatureNomenclatureTool.cpp.
void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::paint | ( | QPainter * | painter, |
bool | showVectors, | ||
VectorType | vectorType, | ||
bool | approvedOnly ) const |
Paint features onto the viewport.
painter | The painter to use for painting on the viewport |
showVectors | True if we're painting the vectors |
vectorType | The extent type to paint |
approvedOnly | True 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().
MdiCubeViewport * Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::sourceViewport | ( | ) | const |
Get the viewport associated with this feature display.
Definition at line 1580 of file FeatureNomenclatureTool.cpp.
void Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::swap | ( | ViewportFeatureDisplay & | other | ) |
Swap *this and other's member data in an exception-free way.
other | The instance to trade member data with |
Definition at line 1870 of file FeatureNomenclatureTool.cpp.
|
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.
Definition at line 1903 of file FeatureNomenclatureTool.cpp.
|
private |
The features on the image in m_sourceViewport.
Definition at line 311 of file FeatureNomenclatureTool.h.
|
private |
The visible features on the image in m_sourceViewport.
Definition at line 313 of file FeatureNomenclatureTool.h.
|
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.
|
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.