2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Sami Rämö - sami.ramo@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 #ifndef GEOCOORDINATE_H
24 #define GEOCOORDINATE_H
29 class SceneCoordinate;
32 * @brief Geographic coordinate
34 * @author Sami Rämö - sami.ramo@ixonos.com
40 * @brief Constructs a null coordinate
45 * @brief Constructs a coordinate with given latitude and longitude values
47 * @param latitude Latitude value
48 * @param longitude Longitude value
50 GeoCoordinate(double latitude, double longitude);
53 * @brief Constructs a coordinate with values converted from the given SceneCoordinate
55 * @param coordinate Scene coordinate
57 GeoCoordinate(SceneCoordinate &coordinate);
59 /*******************************************************************************
60 * MEMBER FUNCTIONS AND SLOTS
61 ******************************************************************************/
64 * @brief Check if coordinate is (0.0, 0.0)
66 * @returns True if both latitude and longitude are 0.0, otherwise false
71 * @brief Returns the latitude value
75 double latitude() const;
78 * @brief Returns the longitude value
82 double longitude() const;
85 * @brief Sets the latitude
87 * @param latitude Latitude value
89 void setLatitude(double latitude);
92 * @brief Sets the longitude
94 * @param longitude Longitude value
96 void setLongitude(double longitude);
100 * @brief Convert values from SceneCoordinate
102 * @param coordinate Scene coordinate
104 void convertFrom(const SceneCoordinate &coordinate);
106 /*******************************************************************************
108 ******************************************************************************/
110 double m_latitude; ///< Latitude value
111 double m_longitude; ///< Longitude value
114 QDebug operator<<(QDebug dbg, const GeoCoordinate &c);
116 Q_DECLARE_METATYPE(GeoCoordinate)
118 #endif // GEOCOORDINATE_H