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,
25 #include "geopositioninfo.h"
26 #include "gpscommon.h"
27 #include "geocoordinate.h"
29 GeoPositionInfo::GeoPositionInfo()
30 : m_timestamp(QDateTime()),
31 m_coordinate(GeoCoordinate()),
32 m_horizontalAccuracy(GPS_ACCURACY_UNDEFINED),
35 qDebug() << __PRETTY_FUNCTION__;
38 QDateTime GeoPositionInfo::timestamp() const
40 qDebug() << __PRETTY_FUNCTION__;
45 void GeoPositionInfo::setTimestamp(qreal time)
47 qDebug() << __PRETTY_FUNCTION__;
49 m_timestamp = QDateTime::fromTime_t(time);
52 void GeoPositionInfo::setCoordinate(const GeoCoordinate &coordinate)
54 qDebug() << __PRETTY_FUNCTION__;
56 m_coordinate = coordinate;
59 GeoCoordinate GeoPositionInfo::coordinate() const
61 qDebug() << __PRETTY_FUNCTION__;
66 bool GeoPositionInfo::isValid()
68 qDebug() << __PRETTY_FUNCTION__;
70 return m_coordinate.isValid();
73 void GeoPositionInfo::setAccuracy(bool accurate, qreal accuracy)
75 qDebug() << __PRETTY_FUNCTION__;
78 m_horizontalAccuracy = GPS_ACCURACY_UNDEFINED;
80 m_horizontalAccuracy = accuracy;
82 m_isAccurate = accurate;
85 qreal GeoPositionInfo::accuracy() const
87 qDebug() << __PRETTY_FUNCTION__;
89 return m_horizontalAccuracy;
92 bool GeoPositionInfo::isAccurate() const
94 qDebug() << __PRETTY_FUNCTION__;