GPSPosition class is an interface for GPS. More...
#include <gpsposition.h>

Public Types | |
| enum | Mode { Default, Simulation } |
GPS position mode. | |
Signals | |
| void | error (const int context, const int error) |
| Signals error. | |
| void | position (GeoCoordinate coordinate, qreal accuracy) |
| Signal for position information. | |
| void | timeout () |
| Signal for timeout. | |
Public Member Functions | |
| GPSPosition (QObject *parent=0) | |
| Constructor. | |
| void | enablePowerSave (bool enabled) |
| Enables power save mode. | |
| bool | isInitialized () const |
| Returns is GPS initialized. | |
| bool | isRunning () const |
| Checks if GPS is running. | |
| GeoCoordinate | lastPosition () const |
| Return last known position. | |
| void | requestLastPosition () |
| Informs gps to emit last known position. | |
| void | requestUpdate () |
| Requests update from GPS. | |
| void | setMode (Mode mode, const QString &filePath=0) |
| Set GPS mode. | |
| void | setUpdateInterval (int interval) |
| Set GPS update interval. | |
| void | start () |
| Start GPS. | |
| void | stop () |
| Stop GPS. | |
Private Attributes | |
| GPSPositionPrivate * | m_gpsPositionPrivate |
| GPSPositionPrivate object. | |
Friends | |
| class | GPSPositionPrivate |
| Friend class for GPSPosition. | |
GPSPosition class is an interface for GPS.
| GPSPosition::GPSPosition | ( | QObject * | parent = 0 |
) |
Constructor.
| parent | QObject |
| void GPSPosition::enablePowerSave | ( | bool | enabled | ) |
Enables power save mode.
Starts GPS for position update and then stops it.
| void GPSPosition::error | ( | const int | context, | |
| const int | error | |||
| ) | [signal] |
Signals error.
| context | error context | |
| error | error code |
| bool GPSPosition::isInitialized | ( | ) | const |
Returns is GPS initialized.
| bool GPSPosition::isRunning | ( | ) | const |
Checks if GPS is running.
| void GPSPosition::position | ( | GeoCoordinate | coordinate, | |
| qreal | accuracy | |||
| ) | [signal] |
Signal for position information.
| coordinate | latitude and longitude values | |
| accuracy | accuracy in metres |
| void GPSPosition::requestUpdate | ( | ) |
Requests update from GPS.
Enables GPS if it is disabled
| void GPSPosition::setMode | ( | Mode | mode, | |
| const QString & | filePath = 0 | |||
| ) |
Set GPS mode.
Modes: default and simulation.
| mode | GPS mode | |
| filePath | file path to NMEA file if simulation mode is used |
| void GPSPosition::setUpdateInterval | ( | int | interval | ) |
Set GPS update interval.
1.6.1