19 #ifndef _STELLOCATION_HPP_ 20 #define _STELLOCATION_HPP_ 33 QString
getID()
const;
35 bool isValid()
const {
return role!=
'!';}
84 static float distanceDegrees(
const float long1,
const float lat1,
const float long2,
const float lat2);
89 static const int DEFAULT_BORTLE_SCALE_INDEX;
92 static int metaTypeId;
93 static int initMetaType();
98 QDataStream& operator<<(QDataStream& out, const
StelLocation& loc);
101 QDataStream& operator>>(QDataStream& in,
StelLocation& loc);
103 #endif // _STELLOCATION_HPP_ Store the informations for a location on a planet.
QString landscapeKey
A hint for associating a landscape to the location.
bool isUserLocation
Used privately by the StelLocationMgr.
float longitude
Longitude in degree.
QString country
English country name or empty string.
QString state
State/region name (useful if 2 locations of the same country have the same name)
QString planetName
English planet name.
int altitude
Altitude in meter.
QString serializeToLine() const
Output the location as a string ready to be stored in the user_location file.
QChar role
Location role code.
static StelLocation createFromLine(const QString &line)
Parse a location from a line serialization.
static float distanceDegrees(const float long1, const float lat1, const float long2, const float lat2)
Compute great-circle distance between two locations.
float bortleScaleIndex
Light pollution index following Bortle scale.
QString getID() const
Return a short string which can be used in a list view.
int population
Population in number of inhabitants.
QString ianaTimeZone
IANA identificator of time zone.
float latitude
Latitude in degree.
QString name
Location/city name.