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 <QGeoPositionInfoSource>
31 * @brief GPSPosition class use GPS to receive location information.
33 * @class GPSPosition engine.h "gps/gpsposition.h"
35 class GPSPosition : public QObject
43 GPSPosition(QObject *parent = 0);
46 /******************************************************************************
47 * MEMBER FUNCTIONS AND SLOTS
48 ******************************************************************************/
51 * @brief Checks if GPS is running.
53 * @return true if GPS running, false otherwise
68 * @brief Request GPS update.
75 * @brief Slot for received position update.
77 * @param positionInfo Geo position info.
79 void positionUpdated(QGeoPositionInfo positionInfo);
82 * @brief Slot for update timeout.
84 * Called when request timeout occurs.
88 /******************************************************************************
90 ******************************************************************************/
93 * @brief Signal for position information.
95 * @param latLonCoordinate latitude and longitude values
97 void position(QPointF latLonCoordinate);
100 * @brief Signal for timeout.
105 * @brief Signal for error.
107 * @param message error message
109 void error(const QString &message);
112 QGeoPositionInfoSource *m_gpsSource; ///< GPS position info source
113 bool m_running; ///< GPS is running
114 int m_updateInterval; ///< GPS update interval
117 const int DEFAULT_UPDATE_INTERVAL = 5000; ///< Default update interval
119 #endif // GPSPOSITION_H