Isis 3 Programmer Reference
Isis::FeatureNomenclature::Feature Class Reference

A named feature on a target. More...

#include <FeatureNomenclature.h>

Collaboration diagram for Isis::FeatureNomenclature::Feature:
Collaboration graph

Public Member Functions

 Feature ()
 Construct a feature with no data.
 
 Feature (QDomElement searchResultFeature, IAUStatus status)
 Construct a feature with the data encapsulated inside of the XML.
 
 Feature (const Feature &other)
 Copy a feature.
 
 ~Feature ()
 Clean up allocated memory by this feature.
 
QWidgettoWidget () const
 This converts the data in this feature to a widget.
 
QString id () const
 
QString name () const
 
QString cleanName () const
 
QString controlNet () const
 
QString displayName () const
 
QString target () const
 
QString system () const
 
Distance diameter () const
 
QString diameterString () const
 
Latitude centerLatitude () const
 
QString centerLatitudeString () const
 
Longitude centerLongitude () const
 
QString centerLongitudeString () const
 
Latitude northernLatitude () const
 
QString northernLatitudeString () const
 
Latitude southernLatitude () const
 
QString southernLatitudeString () const
 
Longitude easternLongitude () const
 
QString easternLongitudeString () const
 
Longitude westernLongitude () const
 
QString westernLongitudeString () const
 
QString originatingContinent () const
 
QString originatingEthnicity () const
 
QString approvalStatus () const
 
QString approvalDate () const
 
QString featureType () const
 
QString referenceString () const
 
QString origin () const
 
QString lastUpdated () const
 
QUrl referenceUrl () const
 
QString referenceUrlString () const
 
IAUStatus status () const
 
void swap (Feature &other)
 Swap the member data of this feature with another feature.
 
Featureoperator= (const Feature &rhs)
 Assign the values of this feature from the values of rhs.
 

Private Member Functions

QString getTagText (QString tagName) const
 Get the string value of an element of the XML.
 

Private Attributes

QDomElement * m_xmlRepresenation
 This is the XML returned by the nomenclature DB.
 
IAUStatus m_approvalStatus
 The approval status of the feature.
 

Detailed Description

A named feature on a target.

This class encapsulates the idea of a single named feature on a target. The accessor methods will return empty strings/invalid data types if data is not present or available. These should be instantiated (originally) by the FeatureNomenclature class.

Author
2012-03-22 Steven Lambright
History

2012-06-06 Steven Lambright and Kimberly Oyama - Added approval status to the list of characteristics of the feature and added the accessor (status()). Fixes #852. Fixes #892.

2016-05-23 Ian Humphrey - Modified runQuery() to correctly send POST request to find the features for the feature nomenclature tool (Qt5).

Definition at line 117 of file FeatureNomenclature.h.

Constructor & Destructor Documentation

◆ Feature() [1/3]

Isis::FeatureNomenclature::Feature::Feature ( )

Construct a feature with no data.

Definition at line 213 of file FeatureNomenclature.cpp.

References m_approvalStatus, m_xmlRepresenation, and Isis::FeatureNomenclature::NoStatus.

◆ Feature() [2/3]

Isis::FeatureNomenclature::Feature::Feature ( QDomElement searchResultFeature,
IAUStatus status )

Construct a feature with the data encapsulated inside of the XML.

Definition at line 222 of file FeatureNomenclature.cpp.

◆ Feature() [3/3]

Isis::FeatureNomenclature::Feature::Feature ( const Feature & other)

Copy a feature.

This is a shallow copy.

Parameters
otherThe feature to copy

Definition at line 234 of file FeatureNomenclature.cpp.

◆ ~Feature()

Isis::FeatureNomenclature::Feature::~Feature ( )

Clean up allocated memory by this feature.

Definition at line 245 of file FeatureNomenclature.cpp.

Member Function Documentation

◆ approvalDate()

QString Isis::FeatureNomenclature::Feature::approvalDate ( ) const
Returns
The approval date of the feature.

Definition at line 681 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ approvalStatus()

QString Isis::FeatureNomenclature::Feature::approvalStatus ( ) const
Returns
The IAU approval status of the feature.

Definition at line 673 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ centerLatitude()

Latitude Isis::FeatureNomenclature::Feature::centerLatitude ( ) const
Returns
The feature's center latitude.

Definition at line 505 of file FeatureNomenclature.cpp.

References Isis::Angle::Degrees, and Isis::toDouble().

◆ centerLatitudeString()

QString Isis::FeatureNomenclature::Feature::centerLatitudeString ( ) const
Returns
The feature's center latitude as a human readable string.

Definition at line 521 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ centerLongitude()

Longitude Isis::FeatureNomenclature::Feature::centerLongitude ( ) const
Returns
The feature's center longitude.

Definition at line 529 of file FeatureNomenclature.cpp.

References Isis::Angle::Degrees, and Isis::toDouble().

◆ centerLongitudeString()

QString Isis::FeatureNomenclature::Feature::centerLongitudeString ( ) const
Returns
The feature's center longitude as a human readable string.

Definition at line 546 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ cleanName()

QString Isis::FeatureNomenclature::Feature::cleanName ( ) const
Returns
The 'clean' feature name (non-ascii characters cleaned up)

Definition at line 420 of file FeatureNomenclature.cpp.

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

◆ controlNet()

QString Isis::FeatureNomenclature::Feature::controlNet ( ) const
Returns
The source control network for the feature position information. This is implied by what's currently available for targets, since the database does not return this information.

Definition at line 430 of file FeatureNomenclature.cpp.

Referenced by Isis::FeatureNomenclatureTool::featuresForViewportFound(), and toWidget().

◆ diameter()

Distance Isis::FeatureNomenclature::Feature::diameter ( ) const
Returns
The feature's diameter

Definition at line 480 of file FeatureNomenclature.cpp.

References Isis::Distance::Kilometers, and Isis::toDouble().

◆ diameterString()

QString Isis::FeatureNomenclature::Feature::diameterString ( ) const
Returns
The feature's diameter as a human readable string.

Definition at line 497 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ displayName()

QString Isis::FeatureNomenclature::Feature::displayName ( ) const

◆ easternLongitude()

Longitude Isis::FeatureNomenclature::Feature::easternLongitude ( ) const
Returns
The feature's easternmost (max) longitude.

Definition at line 604 of file FeatureNomenclature.cpp.

References Isis::Angle::Degrees, and Isis::toDouble().

◆ easternLongitudeString()

QString Isis::FeatureNomenclature::Feature::easternLongitudeString ( ) const
Returns
The feature's easternmost (max) longitude as a human readable string.

Definition at line 622 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ featureType()

QString Isis::FeatureNomenclature::Feature::featureType ( ) const
Returns
The type of feature (for example, crater)

Definition at line 689 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ getTagText()

QString Isis::FeatureNomenclature::Feature::getTagText ( QString tagName) const
private

Get the string value of an element of the XML.

Returns an empty string if anything goes wrong.

Parameters
tagNamethe XML tag name, from the nomenclature server, of what you want
Returns
The data in the tag

Definition at line 778 of file FeatureNomenclature.cpp.

◆ id()

QString Isis::FeatureNomenclature::Feature::id ( ) const
Returns
The feature ID (typically a number)

Definition at line 404 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ lastUpdated()

QString Isis::FeatureNomenclature::Feature::lastUpdated ( ) const
Returns
The feature's last updated time as a string.

Definition at line 713 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ name()

QString Isis::FeatureNomenclature::Feature::name ( ) const
Returns
The feature name (not always compatible with QString)

Definition at line 412 of file FeatureNomenclature.cpp.

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

◆ northernLatitude()

Latitude Isis::FeatureNomenclature::Feature::northernLatitude ( ) const
Returns
The feature's northernmost (max) latitude.

Definition at line 554 of file FeatureNomenclature.cpp.

References Isis::Angle::Degrees, and Isis::toDouble().

◆ northernLatitudeString()

QString Isis::FeatureNomenclature::Feature::northernLatitudeString ( ) const
Returns
The feature's northernmost (max) latitude as a human readable string.

Definition at line 571 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ operator=()

FeatureNomenclature::Feature & Isis::FeatureNomenclature::Feature::operator= ( const Feature & rhs)

Assign the values of this feature from the values of rhs.

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

Definition at line 762 of file FeatureNomenclature.cpp.

References Isis::FeatureNomenclature::swap().

◆ origin()

QString Isis::FeatureNomenclature::Feature::origin ( ) const
Returns
The feature's origin

Definition at line 705 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ originatingContinent()

QString Isis::FeatureNomenclature::Feature::originatingContinent ( ) const
Returns
The continent from which the person who named the feature originated.

Definition at line 657 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ originatingEthnicity()

QString Isis::FeatureNomenclature::Feature::originatingEthnicity ( ) const
Returns
The ethnicity of the person who named the feature.

Definition at line 665 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ referenceString()

QString Isis::FeatureNomenclature::Feature::referenceString ( ) const
Returns
The feature's reference (bibliography) information

Definition at line 697 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ referenceUrl()

QUrl Isis::FeatureNomenclature::Feature::referenceUrl ( ) const

◆ referenceUrlString()

QString Isis::FeatureNomenclature::Feature::referenceUrlString ( ) const
Returns
The feature's online URL as a HTML string (it is hyperlinked).

Definition at line 729 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ southernLatitude()

Latitude Isis::FeatureNomenclature::Feature::southernLatitude ( ) const
Returns
The feature's southernmost (min) latitude.

Definition at line 579 of file FeatureNomenclature.cpp.

References Isis::Angle::Degrees, and Isis::toDouble().

◆ southernLatitudeString()

QString Isis::FeatureNomenclature::Feature::southernLatitudeString ( ) const
Returns
The feature's southernmost (min) latitude as a human readable string.

Definition at line 596 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ status()

FeatureNomenclature::IAUStatus Isis::FeatureNomenclature::Feature::status ( ) const

◆ swap()

void Isis::FeatureNomenclature::Feature::swap ( Feature & other)

Swap the member data of this feature with another feature.

Parameters
otherThe feature to swap with.

Definition at line 749 of file FeatureNomenclature.cpp.

◆ system()

QString Isis::FeatureNomenclature::Feature::system ( ) const
Returns
The target's system (i.e. Target: Moon, System: Earth)

Definition at line 472 of file FeatureNomenclature.cpp.

Referenced by toWidget().

◆ target()

QString Isis::FeatureNomenclature::Feature::target ( ) const
Returns
The target name

Definition at line 464 of file FeatureNomenclature.cpp.

Referenced by Isis::FeatureNomenclatureTool::featuresForViewportFound(), and toWidget().

◆ toWidget()

QWidget * Isis::FeatureNomenclature::Feature::toWidget ( ) const

This converts the data in this feature to a widget.

All of the information returned by the server is encapsulated in this widget. There are no controls, this is a display only.

Returns
A widget that displays all of the feature information

Definition at line 258 of file FeatureNomenclature.cpp.

References approvalDate(), approvalStatus(), centerLatitudeString(), centerLongitudeString(), controlNet(), diameterString(), displayName(), easternLongitudeString(), featureType(), id(), lastUpdated(), northernLatitudeString(), origin(), originatingContinent(), originatingEthnicity(), referenceString(), referenceUrlString(), southernLatitudeString(), system(), target(), and westernLongitudeString().

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

◆ westernLongitude()

Longitude Isis::FeatureNomenclature::Feature::westernLongitude ( ) const
Returns
The feature's westernmost (min) longitude.

Definition at line 630 of file FeatureNomenclature.cpp.

References Isis::Angle::Degrees, and Isis::toDouble().

◆ westernLongitudeString()

QString Isis::FeatureNomenclature::Feature::westernLongitudeString ( ) const
Returns
The feature's westernmost (min) longitude as a human readable string.

Definition at line 648 of file FeatureNomenclature.cpp.

Referenced by toWidget().

Member Data Documentation

◆ m_approvalStatus

IAUStatus Isis::FeatureNomenclature::Feature::m_approvalStatus
private

The approval status of the feature.

Definition at line 172 of file FeatureNomenclature.h.

Referenced by Feature().

◆ m_xmlRepresenation

QDomElement* Isis::FeatureNomenclature::Feature::m_xmlRepresenation
private

This is the XML returned by the nomenclature DB.

The accessors in this class all parse the XML to get their data on demand.

Definition at line 170 of file FeatureNomenclature.h.

Referenced by Feature().


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