StelLocation.hpp   StelLocation.hpp 
skipping to change at line 22 skipping to change at line 22
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* 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 "config.h"
#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), 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;
{
if (country.isEmpty()) bool isValid() const {return role!='!';}
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 (useful if 2 locations of the same country hav e the same name)
QString state; QString state;
//! English planet name //! English planet name
QString planetName; QString planetName;
//! Longitude in degree //! Longitude in degree
float longitude; float longitude;
//! 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
skipping to change at line 73 skipping to change at line 71
//! Location role code. //! Location role code.
//! Possible values: //! Possible values:
//! - \p C or \p B is a capital city //! - \p C or \p B is a capital city
//! - \p R is a regional capital //! - \p R is a regional capital
//! - \p N is a normal city (any other type of settlement) //! - \p N is a normal city (any other type of settlement)
//! - \p O is an observatory //! - \p O is an observatory
//! - \p L is a spacecraft lander //! - \p L is a spacecraft lander
//! - \p I is a spacecraft impact //! - \p I is a spacecraft impact
//! - \p A is a spacecraft crash //! - \p A is a spacecraft crash
//! - \p X is an unknown or user-defined location (the default value ). //! - \p X is an unknown or user-defined location (the default value ).
//! - \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);
//! Used privately by the StelLocationMgr //! Used privately by the StelLocationMgr
bool isUserLocation; bool isUserLocation;
static const int DEFAULT_BORTLE_SCALE_INDEX;
}; };
//! 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. 6 change blocks. 
9 lines changed or deleted 10 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/