00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Jussi Laitinen - jussi.laitinen@ixonos.com 00006 00007 Situare is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 version 2 as published by the Free Software Foundation. 00010 00011 Situare is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Situare; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 USA. 00020 */ 00021 00022 #ifndef GEOPOSITIONINFO_H 00023 #define GEOPOSITIONINFO_H 00024 00025 #include <QObject> 00026 #include <QDateTime> 00027 00028 #include "coordinates/geocoordinate.h" 00029 00033 class GeoPositionInfo 00034 { 00035 public: 00039 GeoPositionInfo(); 00040 00041 /****************************************************************************** 00042 * MEMBER FUNCTIONS AND SLOTS 00043 ******************************************************************************/ 00044 public: 00052 qreal accuracy() const; 00053 00059 GeoCoordinate coordinate() const; 00060 00066 bool isAccurate() const; 00067 00075 bool isValid(); 00076 00083 void setAccuracy(bool accurate, qreal accuracy); 00084 00090 void setCoordinate(const GeoCoordinate &coordinate); 00091 00092 00098 void setTimestamp(qreal time); 00099 00105 QDateTime timestamp() const; 00106 00107 /****************************************************************************** 00108 * DATA MEMBERS 00109 ******************************************************************************/ 00110 private: 00111 QDateTime m_timestamp; 00112 GeoCoordinate m_coordinate; 00113 qreal m_horizontalAccuracy; 00114 bool m_isAccurate; 00115 }; 00116 00117 #endif // GEOPOSITIONINFO_H