2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Jussi Laitinen - jussi.laitinen@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,
22 #ifndef GEOPOSITIONINFO_H
23 #define GEOPOSITIONINFO_H
28 #include "coordinates/geocoordinate.h"
31 * @brief GeoPositionInfo class stores geo position info.
41 /******************************************************************************
42 * MEMBER FUNCTIONS AND SLOTS
43 ******************************************************************************/
46 * @brief Returns accuracy.
48 * Returns -1 if accuracy is not accurate.
52 qreal accuracy() const;
55 * @brief Returns geo coordinates.
57 * @return GeoCoordinate
59 GeoCoordinate coordinate() const;
62 * @brief Checks if the accuracy is accurate.
64 * @return true if accurate, false otherwise
66 bool isAccurate() const;
69 * @brief Checks the validity of the GeoPositionInfo.
71 * Checks coordinate validity.
73 * @return true if valid, false otherwise
78 * @brief Sets accuracy.
80 * @param accurate true if accuracy is accurate (satellite positioning)
81 * @param accuracy accuracy value
83 void setAccuracy(bool accurate, qreal accuracy);
86 * @brief Sets geo coordinates.
88 * @param coordinate GeoCoordinate
90 void setCoordinate(const GeoCoordinate &coordinate);
94 * @brief Sets timestamp.
96 * @param time timestamp in seconds
98 void setTimestamp(qreal time);
101 * @brief Returns timestamp.
105 QDateTime timestamp() const;
107 /******************************************************************************
109 ******************************************************************************/
111 QDateTime m_timestamp; ///< Timestamp
112 GeoCoordinate m_coordinate; ///< GeoCoordinate
113 qreal m_horizontalAccuracy; ///< Horizontal accuracy
114 bool m_isAccurate; ///< Is accurate
117 #endif // GEOPOSITIONINFO_H