Isis 3.0 Programmer Reference
Back | Home
FeatureNomenclature.h
1 #ifndef FeatureNomenclature_h
2 #define FeatureNomenclature_h
3 
4 #include <QObject>
5 
6 // This is needed for the QVariant macro
7 #include <QMetaType>
8 
9 class QDomDocument;
10 class QDomElement;
11 class QNetworkAccessManager;
12 class QNetworkReply;
13 class QNetworkRequest;
14 class QString;
15 class QUrl;
16 class QWidget;
17 
18 template <typename T> class QList;
19 
20 namespace Isis {
21  class Distance;
22  class iTime;
23  class Latitude;
24  class Longitude;
25 
48  class FeatureNomenclature : public QObject {
49  Q_OBJECT
50 
51  public:
52 
54  enum IAUStatus {
77 
81 
82  void queryFeatures(QString target,
83  Latitude startLat, Longitude startLon,
84  Latitude endLat, Longitude endLon);
85 
86  class Feature;
87  QList<Feature> features() const;
88  bool hasResult() const;
89 
90  void swap(FeatureNomenclature &other);
92 
93  static bool featureDiameterGreaterThan(
95  const FeatureNomenclature::Feature &rhs);
96 
114  class Feature {
115  public:
116  Feature();
117  Feature(QDomElement searchResultFeature, IAUStatus status);
118  Feature(const Feature &other);
119  ~Feature();
120 
121  QWidget *toWidget() const;
122 
123  QString id() const;
124  QString name() const;
125  QString cleanName() const;
126  QString controlNet() const;
127  QString displayName() const;
128  QString target() const;
129  QString system() const;
130  Distance diameter() const;
131  QString diameterString() const;
132  Latitude centerLatitude() const;
133  QString centerLatitudeString() const;
134  Longitude centerLongitude() const;
135  QString centerLongitudeString() const;
136  Latitude northernLatitude() const;
137  QString northernLatitudeString() const;
138  Latitude southernLatitude() const;
139  QString southernLatitudeString() const;
140  Longitude easternLongitude() const;
141  QString easternLongitudeString() const;
142  Longitude westernLongitude() const;
143  QString westernLongitudeString() const;
144  QString originatingContinent() const;
145  QString originatingEthnicity() const;
146  QString approvalStatus() const;
147  QString approvalDate() const;
148  QString featureType() const;
149  QString referenceString() const;
150  QString origin() const;
151  QString lastUpdated() const;
152  QUrl referenceUrl() const;
153  QString referenceUrlString() const;
154  IAUStatus status() const;
155 
156  void swap(Feature &other);
157  Feature &operator=(const Feature &rhs);
158 
159  private:
160  QString getTagText(QString tagName) const;
161 
162  private:
167  QDomElement * m_xmlRepresenation;
170  };
171 
172  signals:
178 
179  private slots:
180  void requestFinished(QNetworkReply *);
181 
182  private:
183  void readSearchResults(QDomElement);
184  void runQuery(QString target,
185  Latitude startLat, Longitude startLon,
186  Latitude endLat, Longitude endLon);
187 
188  private:
189  QNetworkAccessManager *m_networkMgr;
190  QNetworkRequest *m_request;
191 
198  };
199 
200 };
201 
204 
205 #endif
When this status is assigned to a feature, there will be no status displayed and the feature will not...
void queryFeatures(QString target, Latitude startLat, Longitude startLon, Latitude endLat, Longitude endLon)
Makes sure the longitudinal ranges are correct.
QNetworkRequest * m_request
Network request sent.
void readSearchResults(QDomElement)
This is a helper method for requestFinished.
When this status is assigned to a feature, the displayed status will be &quot;Dropped, disallowed&quot; and the...
IAUStatus m_statusApproval
The approval status of the feature from the database.
FeatureNomenclature()
Instantiate a feature nomenclature.
Feature nomenclature database querier.
IAUStatus m_approvalStatus
The approval status of the feature.
QWidget * toWidget() const
This converts the data in this feature to a widget.
When this status is assigned to a feature, the displayed status will be &quot;Adopted by the IAU&quot; and the ...
void swap(Feature &other)
Swap the member data of this feature with another feature.
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:59
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *&#39;s to be stored in a QVariant.
~FeatureNomenclature()
Frees allocated memory.
Feature & operator=(const Feature &rhs)
Assign the values of this feature from the values of rhs.
Feature()
Construct a feature with no data.
Distance measurement, usually in meters.
Definition: Distance.h:47
QList< Feature > * m_features
These are the features identified by the nomenclature database.
QString getTagText(QString tagName) const
Get the string value of an element of the XML.
QNetworkAccessManager * m_networkMgr
Network manager does request.
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
bool m_lastQuery
True if all queries have finished.
When this status is assigned to a feature, the displayed status will be &quot;Never approved by the IAU&quot; a...
void runQuery(QString target, Latitude startLat, Longitude startLon, Latitude endLat, Longitude endLon)
Query the nomenclature database for features inside the given range on the target.
QList< Feature > features() const
This gives you the features found in all of the queries so far.
void swap(FeatureNomenclature &other)
Swap the instances *this and other.
QDomElement * m_xmlRepresenation
This is the XML returned by the nomenclature DB.
~Feature()
Clean up allocated memory by this feature.
void requestFinished(QNetworkReply *)
This is called when a query is done.
static bool featureDiameterGreaterThan(const FeatureNomenclature::Feature &lhs, const FeatureNomenclature::Feature &rhs)
Compare the diameter of two features.
void featuresIdentified(FeatureNomenclature *)
This is emitted when a query is completed.
bool hasResult() const
Test if any understandable results have been received from the nomenclature database.
FeatureNomenclature & operator=(const FeatureNomenclature &other)
This takes on the data from rhs.
A named feature on a target.
IAUStatus
Enumeration of approval statuses.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:18:02