USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::FeatureNomenclatureTool::FeatureDisplayPosition Class Reference

A named feature's position in a viewport. More...

Collaboration diagram for Isis::FeatureNomenclatureTool::FeatureDisplayPosition:
Collaboration graph

Public Member Functions

 FeatureDisplayPosition ()
 Instantiate a blank feature display position.
 FeatureDisplayPosition (QRect textRect, QRect fullDisplayRect, QList< QPoint > edgePoints)
 Instantiate a feature display position with the given data.
 FeatureDisplayPosition (const FeatureDisplayPosition &other)
 Copy a feature display position.
 ~FeatureDisplayPosition ()
 Free the allocated memory.
QRect textArea () const
 Get the screen pixel rect in viewport screen coordinates that ought to be filled with the textual name.
QRect displayArea () const
 Get the screen pixel rect in viewport screen coordinates that encapsulates the entire feature.
QList< QPoint > edgePoints () const
 Get the edge screen pixel points in viewport screen coordinates that circle the feature.
void swap (FeatureDisplayPosition &other)
 Swap member data with another instance of this class.
FeatureDisplayPositionoperator= (const FeatureDisplayPosition &rhs)
 Assign the state of rhs to this.This is exception-safe.

Private Attributes

QRect * m_textRect
 The viewport screen pixel rect which the text will consume.
QRect * m_fullDisplayRect
 The viewport screen pixel rect which the entire display will use.
QList< QPoint > * m_edgePoints
 The viewport screen pixel points which the edges are at.

Detailed Description

A named feature's position in a viewport.

This class encapsulates the screen x,y boxes, extents, and edge points of a named feature in a viewport.

Author
2012-03-22 Steven Lambright and Jai Rideout

Definition at line 235 of file FeatureNomenclatureTool.h.

Constructor & Destructor Documentation

Isis::FeatureNomenclatureTool::FeatureDisplayPosition::FeatureDisplayPosition ( )

Instantiate a blank feature display position.

Definition at line 1284 of file FeatureNomenclatureTool.cpp.

Isis::FeatureNomenclatureTool::FeatureDisplayPosition::FeatureDisplayPosition ( QRect  textRect,
QRect  fullDisplayRect,
QList< QPoint >  edgePoints 
)

Instantiate a feature display position with the given data.

Parameters
textRectThe screen pixel rect in viewport screen coordinates that ought to be filled with the textual name.
fullDisplayRectThe screen pixel rect in viewport screen coordinates that encapsulates the entire feature.
edgePointsThe edge screen pixel points in viewport screen coordinates that circle the feature.

Definition at line 1305 of file FeatureNomenclatureTool.cpp.

Isis::FeatureNomenclatureTool::FeatureDisplayPosition::FeatureDisplayPosition ( const FeatureDisplayPosition other)

Copy a feature display position.

Parameters
otherThe position to copy

Definition at line 1321 of file FeatureNomenclatureTool.cpp.

References m_edgePoints, m_fullDisplayRect, and m_textRect.

Isis::FeatureNomenclatureTool::FeatureDisplayPosition::~FeatureDisplayPosition ( )

Free the allocated memory.

Definition at line 1336 of file FeatureNomenclatureTool.cpp.

Member Function Documentation

QRect Isis::FeatureNomenclatureTool::FeatureDisplayPosition::displayArea ( ) const

Get the screen pixel rect in viewport screen coordinates that encapsulates the entire feature.

Returns
Screen pixel rect in viewport screen coordinates

Definition at line 1365 of file FeatureNomenclatureTool.cpp.

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

QList< QPoint > Isis::FeatureNomenclatureTool::FeatureDisplayPosition::edgePoints ( ) const

Get the edge screen pixel points in viewport screen coordinates that circle the feature.

Returns
Screen pixel edge points in viewport screen coordinates

Definition at line 1376 of file FeatureNomenclatureTool.cpp.

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

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

Assign the state of rhs to this.This is exception-safe.

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

Definition at line 1404 of file FeatureNomenclatureTool.cpp.

void Isis::FeatureNomenclatureTool::FeatureDisplayPosition::swap ( FeatureDisplayPosition other)

Swap member data with another instance of this class.

This trades the state of this with other and will never throw an exception.

Parameters
otherThe instance to trade state with

Definition at line 1388 of file FeatureNomenclatureTool.cpp.

References m_edgePoints, m_fullDisplayRect, and m_textRect.

QRect Isis::FeatureNomenclatureTool::FeatureDisplayPosition::textArea ( ) const

Get the screen pixel rect in viewport screen coordinates that ought to be filled with the textual name.

Returns
Screen pixel rect in viewport screen coordinates

Definition at line 1354 of file FeatureNomenclatureTool.cpp.

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

Member Data Documentation

QList<QPoint>* Isis::FeatureNomenclatureTool::FeatureDisplayPosition::m_edgePoints
private

The viewport screen pixel points which the edges are at.

Definition at line 257 of file FeatureNomenclatureTool.h.

Referenced by FeatureDisplayPosition(), and swap().

QRect* Isis::FeatureNomenclatureTool::FeatureDisplayPosition::m_fullDisplayRect
private

The viewport screen pixel rect which the entire display will use.

Definition at line 255 of file FeatureNomenclatureTool.h.

Referenced by FeatureDisplayPosition(), and swap().

QRect* Isis::FeatureNomenclatureTool::FeatureDisplayPosition::m_textRect
private

The viewport screen pixel rect which the text will consume.

Definition at line 253 of file FeatureNomenclatureTool.h.

Referenced by FeatureDisplayPosition(), and swap().


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