StelLocation.hpp   StelLocation.hpp 
skipping to change at line 29 skipping to change at line 29
#ifndef _STELLOCATION_HPP_ #ifndef _STELLOCATION_HPP_
#define _STELLOCATION_HPP_ #define _STELLOCATION_HPP_
#include <QString> #include <QString>
//! @class StelLocation //! @class StelLocation
//! Store the informations for a location on a planet //! Store the informations for a location on a planet
class StelLocation class StelLocation
{ {
public: public:
StelLocation() : longitude(0.f), latitude(0.f), altitude(0), bortleS caleIndex(2.f), isUserLocation(true) {;} StelLocation() : longitude(0.f), latitude(0.f), altitude(0), bortleS caleIndex(2.f), role('X'), isUserLocation(true) {;}
//! Return a short string which can be used in a list view //! Return a short string which can be used in a list view.
QString getID() const QString getID() const
{ {
return name + ", " +country; if (country.isEmpty())
return name;
else
return name + ", " +country;
} }
//! Output the location as a string ready to be stored in the user_l ocation file //! Output the location as a string ready to be stored in the user_l ocation file
QString serializeToLine() const; QString serializeToLine() const;
//! Location/city name //! Location/city name
QString name; QString name;
//! English country name or empty string //! English country name or empty string
QString country; QString country;
//! State/region name (usefull if 2 locations of the same country ha ve the same name) //! State/region name (usefull if 2 locations of the same country ha ve the same name)
skipping to change at line 60 skipping to change at line 63
//! Latitude in degree //! Latitude in degree
float latitude; float latitude;
//! Altitude in meter //! Altitude in meter
int altitude; int altitude;
//! Light pollution index following Bortle scale //! Light pollution index following Bortle scale
float bortleScaleIndex; float bortleScaleIndex;
//! A hint for associating a landscape to the location //! A hint for associating a landscape to the location
QString landscapeKey; QString landscapeKey;
//! Population in number of inhabitants //! Population in number of inhabitants
int population; int population;
//! Location role code //! Location role code.
//! C/B=Capital, R=Regional capital, N=Normal city, O=Observatory, L //! Possible values:
=lander, I=spacecraft impact, A=spacecraft crash //! - \p C or \p B is a capital city
//! - \p R is a regional capital
//! - \p N is a normal city (any other type of settlement)
//! - \p O is an observatory
//! - \p L is a spacecraft lander
//! - \p I is a spacecraft impact
//! - \p A is a spacecraft crash
//! - \p X is an unknown or user-defined location (the default value
).
QChar role; QChar role;
//! Parse a location from a line serialization //! Parse a location from a line serialization
static StelLocation createFromLine(const QString& line); static StelLocation createFromLine(const QString& line);
//! Used privately by the StelLocationMgr //! Used privately by the StelLocationMgr
bool isUserLocation; bool isUserLocation;
}; };
//! Serialize the passed StelLocation into a binary blob. //! Serialize the passed StelLocation into a binary blob.
 End of changes. 4 change blocks. 
6 lines changed or deleted 17 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/