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,
28 class GPSPositionPrivate;
31 * @brief GPSPosition class is an interface for GPS.
33 class GPSPosition : public QObject
39 * @brief Friend class for GPSPosition.
41 friend class GPSPositionPrivate;
46 * @param parent QObject
48 GPSPosition(QObject *parent = 0);
51 * @brief GPS position mode.
53 enum Mode {Default, Simulation};
55 /******************************************************************************
56 * MEMBER FUNCTIONS AND SLOTS
57 ******************************************************************************/
60 * @brief Returns is GPS initialized.
62 * @return true if initialized, false otherwise
67 * @brief Checks if GPS is running.
69 * @return true if GPS running, false otherwise
74 * @brief Return last known position.
76 QPointF lastPosition();
79 * @brief Informs gps to emit last known position.
81 void requestLastPosition();
84 * @brief Set GPS mode.
86 * Modes: default and simulation.
87 * @param mode GPS mode
88 * @param filePath file path to NMEA file if simulation mode is used
90 void setMode(Mode mode, const QString &filePath = 0);
93 * @brief Set GPS update interval
95 * @return interval interval in milliseconds
97 void setUpdateInterval(int interval);
109 /******************************************************************************
111 ******************************************************************************/
114 * @brief Signal for error.
116 * @param error error code
118 void error(const int error);
121 * @brief Signal for position information.
123 * @param latLonCoordinate latitude and longitude values
124 * @param accuracy accuracy in metres
126 void position(QPointF latLonCoordinate, qreal accuracy);
129 * @brief Signal for timeout.
133 /*******************************************************************************
135 *******************************************************************************/
137 GPSPositionPrivate *m_gpsPositionPrivate; ///< GPSPositionPrivate object
140 #endif // GPSPOSITIONINTERFACE_H