GPSPositionPrivate class use GPS to receive location information. More...
#include <gpspositionprivate.h>
Public Member Functions | |
GPSPositionPrivate (QObject *parent) | |
Constructor creates GPS source. | |
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 (GPSPosition::Mode mode, const QString &filePath=0) |
Set GPS mode. | |
void | setPowerSave (bool enabled) |
Sets power save mode. | |
void | setUpdateInterval (int interval) |
Set GPS update interval. | |
void | start () |
Start GPS. | |
void | stop () |
Stop GPS. | |
GPSPositionPrivate (QObject *parent) | |
Constructor creates GPS source. | |
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 (GPSPosition::Mode mode, const QString &filePath=0) |
Set GPS mode. | |
void | setPowerSave (bool enabled) |
Sets power save mode. | |
void | setUpdateInterval (int interval) |
Set GPS update interval. | |
void | start () |
Start GPS. | |
void | stop () |
Stop GPS. | |
GPSPositionPrivate (QObject *parent) | |
Constructor. | |
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 | setPowerSave (bool enabled) |
Enables power save mode. | |
void | setUpdateInterval (int interval) |
Set GPS update interval. | |
void | setMode (GPSPosition::Mode mode, const QString &filePath=0) |
Set GPS mode. | |
void | start () |
Start GPS. | |
void | stop () |
Stop GPS. | |
Private Slots | |
void | positionUpdated (const QGeoPositionInfo &positionInfo) |
Slot for received position update. | |
void | updateTimeout () |
Slot for update timeout. | |
void | delayedPowerSaveStart () |
Start power save. | |
void | positionUpdated (const GeoPositionInfo &positionInfo) |
Slot for received position update. | |
void | locationError (const QString &errorMessage) |
Slot for location error. | |
Private Member Functions | |
qreal | accuracy (const QGeoPositionInfo &positionInfo) |
Return horizontal accuracy. | |
qreal | accuracy (const GeoPositionInfo &positionInfo) |
Returns horizontal accuracy. | |
Private Attributes | |
QGeoPositionInfoSource * | m_gpsSource |
GPS position info source. | |
GPSPosition * | m_parent |
Parent object. | |
bool | m_initialized |
GPS is initialized. | |
bool | m_running |
GPS is running. | |
int | m_updateInterval |
GPS update interval. | |
LiblocationWrapper * | m_liblocationWrapper |
Liblocation wrapper object. | |
bool | m_powerSave |
Power save flag. | |
QTimer * | m_delayedPowerSaveTimer |
Delayed power save timer. |
GPSPositionPrivate class use GPS to receive location information.
GPSPositionPrivate class does nothing.
Class is used when compiling in desktop.
GPSPositionPrivate::GPSPositionPrivate | ( | QObject * | parent | ) |
Constructor creates GPS source.
parent | QObject |
GPSPositionPrivate::GPSPositionPrivate | ( | QObject * | parent | ) |
Constructor creates GPS source.
parent | QObject |
GPSPositionPrivate::GPSPositionPrivate | ( | QObject * | parent | ) |
Constructor.
parent | QObject |
qreal GPSPositionPrivate::accuracy | ( | const GeoPositionInfo & | positionInfo | ) | [private] |
Returns horizontal accuracy.
positionInfo | geo position info |
qreal GPSPositionPrivate::accuracy | ( | const QGeoPositionInfo & | positionInfo | ) | [private] |
Return horizontal accuracy.
positionInfo | geo position info |
bool GPSPositionPrivate::isInitialized | ( | ) | const |
Returns is GPS initialized.
RETURNS FALSE
bool GPSPositionPrivate::isInitialized | ( | ) | const |
Returns is GPS initialized.
bool GPSPositionPrivate::isInitialized | ( | ) | const |
Returns is GPS initialized.
bool GPSPositionPrivate::isRunning | ( | ) | const |
Checks if GPS is running.
RETURNS FALSE.
bool GPSPositionPrivate::isRunning | ( | ) | const |
Checks if GPS is running.
bool GPSPositionPrivate::isRunning | ( | ) | const |
Checks if GPS is running.
void GPSPositionPrivate::locationError | ( | const QString & | errorMessage | ) | [private, slot] |
Slot for location error.
Called when there is error in GPS.
void GPSPositionPrivate::positionUpdated | ( | const GeoPositionInfo & | positionInfo | ) | [private, slot] |
Slot for received position update.
positionInfo | Geo position info. |
void GPSPositionPrivate::positionUpdated | ( | const QGeoPositionInfo & | positionInfo | ) | [private, slot] |
Slot for received position update.
positionInfo | Geo position info. |
void GPSPositionPrivate::requestUpdate | ( | ) |
Requests update from GPS.
Enables GPS if it is disabled
void GPSPositionPrivate::requestUpdate | ( | ) |
Requests update from GPS.
Enables GPS if it is disabled
void GPSPositionPrivate::requestUpdate | ( | ) |
Requests update from GPS.
Enables GPS if it is disabled
void GPSPositionPrivate::setMode | ( | GPSPosition::Mode | mode, | |
const QString & | filePath = 0 | |||
) |
Set GPS mode.
DOES NOTHING
mode | GPS mode | |
filePath | file path to NMEA file if simulation mode is used |
void GPSPositionPrivate::setMode | ( | GPSPosition::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 GPSPositionPrivate::setMode | ( | GPSPosition::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 GPSPositionPrivate::setPowerSave | ( | bool | enabled | ) |
Enables power save mode.
Starts GPS for position update and then stops it.
void GPSPositionPrivate::setPowerSave | ( | bool | enabled | ) |
Sets power save mode.
Starts GPS for position update and then stops it.
void GPSPositionPrivate::setPowerSave | ( | bool | enabled | ) |
Sets power save mode.
Starts GPS for position update and then stops it.
void GPSPositionPrivate::setUpdateInterval | ( | int | interval | ) |
Set GPS update interval.
DOES NOTHING.
void GPSPositionPrivate::setUpdateInterval | ( | int | interval | ) |
Set GPS update interval.
void GPSPositionPrivate::setUpdateInterval | ( | int | interval | ) |
Set GPS update interval.
void GPSPositionPrivate::start | ( | ) |
Start GPS.
Emits GPS initalization error.
void GPSPositionPrivate::stop | ( | ) |
Stop GPS.
DOES NOTHING.
void GPSPositionPrivate::updateTimeout | ( | ) | [private, slot] |
Slot for update timeout.
Called when request timeout occurs.