StelLocation.hpp   StelLocation.hpp 
skipping to change at line 28 skipping to change at line 28
#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
{ {
friend class StelLocationMgr;
public: public:
StelLocation() : longitude(0.), latitude(0.), altitude(0), bortleSca leIndex(2.), isUserLocation(true) {;} StelLocation() : longitude(0.f), latitude(0.f), altitude(0), bortleS caleIndex(2.f), 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; 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)
QString state; QString state;
//! English planet name //! English planet name
QString planetName; QString planetName;
//! Longitude in degree //! Longitude in degree
double longitude; float longitude;
//! Latitude in degree //! Latitude in degree
double 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 =lander, I=spacecraft impact, A=spacecraft crash //! C/B=Capital, R=Regional capital, N=Normal city, O=Observatory, L =lander, I=spacecraft impact, A=spacecraft crash
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);
private:
//! Used privately by the StelLocationMgr //! Used privately by the StelLocationMgr
bool isUserLocation; bool isUserLocation;
}; };
//! Serialize the passed StelLocation into a binary blob.
QDataStream& operator<<(QDataStream& out, const StelLocation& loc);
//! Load the StelLocation from a binary blob.
QDataStream& operator>>(QDataStream& in, StelLocation& loc);
#endif // _STELLOCATION_HPP_ #endif // _STELLOCATION_HPP_
 End of changes. 6 change blocks. 
6 lines changed or deleted 8 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/