19#include "moc_qgsgpsconnection.cpp"
76 const bool connected =
mSource->open( QIODevice::ReadWrite | QIODevice::Unbuffered );
102void QgsGpsConnection::cleanupSource()
123 clearLastGPSInformation();
130 const QgsPoint oldPosition = mLastLocation;
132 if ( mLastLocation != oldPosition )
140 if ( bestFix != mLastFixStatus )
142 mLastFixStatus = bestFix;
147void QgsGpsConnection::clearLastGPSInformation()
GnssConstellation
GNSS constellation.
@ Unknown
Unknown/other system.
GpsFixStatus
GPS fix status.
@ NoData
No fix data available.
@ Automatic
Automatically detected GPS device connection.
Abstract base class for connection to a GPS device.
QgsGpsInformation mLastGPSInformation
Last state of the gps related variables (e.g. position, time, ...)
virtual void parseData()=0
Parse available data source content.
void setSource(QIODevice *source)
Sets the GPS source. The class takes ownership of the device class.
~QgsGpsConnection() override
static const QgsSettingsEntryEnumFlag< Qgis::GpsConnectionType > * settingsGpsConnectionType
Settings entry GPS connection type.
bool connect()
Opens connection to device.
bool close()
Closes connection to device.
void positionChanged(const QgsPoint &point)
Emitted when the GPS position changes.
std::unique_ptr< QIODevice > mSource
Data source (e.g. serial device, socket, file,...)
void fixStatusChanged(Qgis::GpsFixStatus status)
Emitted when the GPS device fix status is changed.
Status mStatus
Connection status.
void stateChanged(const QgsGpsInformation &info)
Emitted whenever the GPS state is changed.
Point geometry type, with support for z-dimension and m-values.
A boolean settings entry.
A template class for enum and flag settings entry.
An integer settings entry.
QgsSettingsTree holds the tree structure for the settings in QGIS core.
static QgsSettingsTreeNode * sTreeGps