StelLocation.hpp   StelLocation.hpp 
skipping to change at line 23 skipping to change at line 23
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STELLOCATION_HPP_ #ifndef _STELLOCATION_HPP_
#define _STELLOCATION_HPP_ #define _STELLOCATION_HPP_
#include <QString> #include <QString>
#include <QMetaType>
//! @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), population(0.f), role('X'), isUserLocation(true) {;} StelLocation() : longitude(0.f), latitude(0.f), altitude(0), bortleS caleIndex(2.f), population(0.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;
skipping to change at line 61 skipping to change at line 62
//! 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.
//! Possible values: //! Possible values:
//! - \p C or \p B is a capital city //! @li @p C or @p B is a capital city
//! - \p R is a regional capital //! @li @p R is a regional capital
//! - \p N is a normal city (any other type of settlement) //! @li @p N is a normal city (any other type of settlement)
//! - \p O is an observatory //! @li @p O is an observatory
//! - \p L is a spacecraft lander //! @li @p L is a spacecraft lander
//! - \p I is a spacecraft impact //! @li @p I is a spacecraft impact
//! - \p A is a spacecraft crash //! @li @p A is a spacecraft crash
//! - \p X is an unknown or user-defined location (the default value //! @li @p X is an unknown or user-defined location (the default val
). ue).
//! - \p ! is an invalid location. //! @li @p ! is an invalid location.
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);
//! Compute great-circle distance between two locations //! Compute great-circle distance between two locations
static float distanceDegrees(const float long1, const float lat1, co nst float long2, const float lat2); static float distanceDegrees(const float long1, const float lat1, co nst float long2, const float lat2);
//! Used privately by the StelLocationMgr //! Used privately by the StelLocationMgr
bool isUserLocation; bool isUserLocation;
static const int DEFAULT_BORTLE_SCALE_INDEX; static const int DEFAULT_BORTLE_SCALE_INDEX;
private:
//Register with Qt
static int metaTypeId;
static int initMetaType();
}; };
Q_DECLARE_METATYPE(StelLocation)
//! Serialize the passed StelLocation into a binary blob. //! Serialize the passed StelLocation into a binary blob.
QDataStream& operator<<(QDataStream& out, const StelLocation& loc); QDataStream& operator<<(QDataStream& out, const StelLocation& loc);
//! Load the StelLocation from a binary blob. //! Load the StelLocation from a binary blob.
QDataStream& operator>>(QDataStream& in, StelLocation& loc); QDataStream& operator>>(QDataStream& in, StelLocation& loc);
#endif // _STELLOCATION_HPP_ #endif // _STELLOCATION_HPP_
 End of changes. 4 change blocks. 
10 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/