Stellarium 0.15.2
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
StelLocation Class Reference

Store the informations for a location on a planet. More...

#include <StelLocation.hpp>

Public Member Functions

QString getID () const
 Return a short string which can be used in a list view. More...
 
bool isValid () const
 
QString serializeToLine () const
 Output the location as a string ready to be stored in the user_location file. More...
 

Static Public Member Functions

static StelLocation createFromLine (const QString &line)
 Parse a location from a line serialization. More...
 
static float distanceDegrees (const float long1, const float lat1, const float long2, const float lat2)
 Compute great-circle distance between two locations. More...
 

Public Attributes

QString name
 Location/city name. More...
 
QString country
 English country name or empty string. More...
 
QString state
 State/region name (useful if 2 locations of the same country have the same name) More...
 
QString planetName
 English planet name. More...
 
float longitude
 Longitude in degree. More...
 
float latitude
 Latitude in degree. More...
 
int altitude
 Altitude in meter. More...
 
float bortleScaleIndex
 Light pollution index following Bortle scale. More...
 
QString landscapeKey
 A hint for associating a landscape to the location. More...
 
int population
 Population in number of inhabitants. More...
 
QChar role
 Location role code. More...
 
QString ianaTimeZone
 IANA identificator of time zone. More...
 
bool isUserLocation
 Used privately by the StelLocationMgr. More...
 

Static Public Attributes

static const int DEFAULT_BORTLE_SCALE_INDEX
 

Detailed Description

Store the informations for a location on a planet.

Definition at line 27 of file StelLocation.hpp.

Member Function Documentation

static StelLocation StelLocation::createFromLine ( const QString &  line)
static

Parse a location from a line serialization.

static float StelLocation::distanceDegrees ( const float  long1,
const float  lat1,
const float  long2,
const float  lat2 
)
static

Compute great-circle distance between two locations.

QString StelLocation::getID ( ) const

Return a short string which can be used in a list view.

QString StelLocation::serializeToLine ( ) const

Output the location as a string ready to be stored in the user_location file.

Member Data Documentation

int StelLocation::altitude

Altitude in meter.

Definition at line 53 of file StelLocation.hpp.

float StelLocation::bortleScaleIndex

Light pollution index following Bortle scale.

Definition at line 55 of file StelLocation.hpp.

QString StelLocation::country

English country name or empty string.

Definition at line 43 of file StelLocation.hpp.

QString StelLocation::ianaTimeZone

IANA identificator of time zone.

Note that timezone names under various OSes may be different than those used in Stellarium's location database (e.g. Stellarium&IANA:Asia/Kolkata=Windows:Asia/Calcutta), which requires some translation effort during the loading process.

Definition at line 78 of file StelLocation.hpp.

bool StelLocation::isUserLocation

Used privately by the StelLocationMgr.

Definition at line 87 of file StelLocation.hpp.

QString StelLocation::landscapeKey

A hint for associating a landscape to the location.

Definition at line 57 of file StelLocation.hpp.

float StelLocation::latitude

Latitude in degree.

Definition at line 51 of file StelLocation.hpp.

float StelLocation::longitude

Longitude in degree.

Definition at line 49 of file StelLocation.hpp.

QString StelLocation::name

Location/city name.

Definition at line 41 of file StelLocation.hpp.

QString StelLocation::planetName

English planet name.

Definition at line 47 of file StelLocation.hpp.

int StelLocation::population

Population in number of inhabitants.

Definition at line 59 of file StelLocation.hpp.

QChar StelLocation::role

Location role code.

Possible values:

  • C or B is a capital city
  • R is a regional capital
  • N is a normal city (any other type of settlement)
  • O is an observatory
  • L is a spacecraft lander
  • I is a spacecraft impact
  • A is a spacecraft crash
  • X is an unknown or user-defined location (the default value).
  • ! is an invalid location.

Definition at line 71 of file StelLocation.hpp.

QString StelLocation::state

State/region name (useful if 2 locations of the same country have the same name)

Definition at line 45 of file StelLocation.hpp.


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