| 
    QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
    
   | 
 
A GPS connection subclass based on the Qt Location libraries. More...
#include <qgsqtlocationconnection.h>

Public Member Functions | |
| QgsQtLocationConnection () | |
  Public Member Functions inherited from QgsGpsConnection | |
| QgsGpsConnection (QIODevice *dev) | |
| Constructor.  More... | |
| ~QgsGpsConnection () override | |
| bool | close () | 
| Closes connection to device.  More... | |
| bool | connect () | 
| Opens connection to device.  More... | |
| QgsGpsInformation | currentGPSInformation () const | 
| Returns the current gps information (lat, lon, etc.)  More... | |
| QgsPoint | lastValidLocation () const | 
| Returns the last valid location obtained by the device.  More... | |
| void | setSource (QIODevice *source) | 
| Sets the GPS source. The class takes ownership of the device class.  More... | |
| Status | status () const | 
| Returns the status. Possible state are not connected, connected, data received.  More... | |
Protected Slots | |
| void | broadcastConnectionAvailable () | 
| Needed to make QtLocation detected.  More... | |
| void | parseData () override | 
| Parse available data source content.  More... | |
| void | positionUpdated (const QGeoPositionInfo &info) | 
| Called when the position updated.  More... | |
| void | satellitesInUseUpdated (const QList< QGeoSatelliteInfo > &satellites) | 
| Called when the number of satellites in use is updated.  More... | |
| void | satellitesInViewUpdated (const QList< QGeoSatelliteInfo > &satellites) | 
| Called when the number of satellites in view is updated.  More... | |
  Protected Slots inherited from QgsGpsConnection | |
| virtual void | parseData ()=0 | 
| Parse available data source content.  More... | |
Additional Inherited Members | |
  Public Types inherited from QgsGpsConnection | |
| enum | Status { NotConnected , Connected , DataReceived , GPSDataReceived } | 
  Signals inherited from QgsGpsConnection | |
| void | fixStatusChanged (Qgis::GpsFixStatus status) | 
| Emitted when the GPS device fix status is changed.  More... | |
| void | nmeaSentenceReceived (const QString &substring) | 
| Emitted whenever the GPS device receives a raw NMEA sentence.  More... | |
| void | positionChanged (const QgsPoint &point) | 
| Emitted when the GPS position changes.  More... | |
| void | stateChanged (const QgsGpsInformation &info) | 
| Emitted whenever the GPS state is changed.  More... | |
  Static Public Attributes inherited from QgsGpsConnection | |
| static const QgsSettingsEntryInteger * | settingGpsAcquisitionInterval = new QgsSettingsEntryInteger( QStringLiteral( "acquisition-interval" ), QgsSettingsTree::sTreeGps, 0, QStringLiteral( "GPS track point acquisition interval" ) ) | 
| Settings entry GPS track point acquisition interval.  More... | |
| static const QgsSettingsEntryBool * | settingGpsApplyLeapSecondsCorrection = new QgsSettingsEntryBool( QStringLiteral( "apply-leap-seconds-correction" ), QgsSettingsTree::sTreeGps, true, QStringLiteral( "Whether leap seconds corrections should be applied to GPS timestamps" ) ) | 
| Settings entry GPS apply leap seconds correction.  More... | |
| static const QgsSettingsEntryBool * | settingGpsBearingFromTravelDirection = new QgsSettingsEntryBool( QStringLiteral( "calculate-bearing-from-travel" ), QgsSettingsTree::sTreeGps, false, QStringLiteral( "Calculate GPS bearing from travel direction" ) ) | 
| Settings entry GPS calculate bearing from travel direction.  More... | |
| static const QgsSettingsEntryDouble * | settingGpsDistanceThreshold = new QgsSettingsEntryDouble( QStringLiteral( "distance-threshold" ), QgsSettingsTree::sTreeGps, 0, QStringLiteral( "GPS track point distance threshold" ) ) | 
| Settings entry GPS track point distance threshold.  More... | |
| static const QgsSettingsEntryInteger * | settingGpsLeapSeconds = new QgsSettingsEntryInteger( QStringLiteral( "leap-seconds" ), QgsSettingsTree::sTreeGps, 18, QStringLiteral( "Leap seconds correction amount (in seconds)" ) ) | 
| Settings entry GPS leap seconds correction amount (in seconds)  More... | |
| static const QgsSettingsEntryEnumFlag< Qgis::GpsConnectionType > * | settingsGpsConnectionType = new QgsSettingsEntryEnumFlag<Qgis::GpsConnectionType>( QStringLiteral( "gps-connection-type" ), QgsSettingsTree::sTreeGps, Qgis::GpsConnectionType::Automatic, QStringLiteral( "GPS connection type" ) ) | 
| Settings entry GPS connection type.  More... | |
| static const QgsSettingsEntryString * | settingsGpsdDeviceName = new QgsSettingsEntryString( QStringLiteral( "gpsd-device-name" ), QgsSettingsTree::sTreeGps, QString(), QStringLiteral( "GPSD connection device name" ) ) | 
| Settings entry GPSD device name.  More... | |
| static const QgsSettingsEntryString * | settingsGpsdHostName = new QgsSettingsEntryString( QStringLiteral( "gpsd-host-name" ), QgsSettingsTree::sTreeGps, QString(), QStringLiteral( "GPSD connection host name" ) ) | 
| Settings entry GPSD host name.  More... | |
| static const QgsSettingsEntryInteger * | settingsGpsdPortNumber = new QgsSettingsEntryInteger( QStringLiteral( "gpsd-port" ), QgsSettingsTree::sTreeGps, 2947, QStringLiteral( "GPSD port number" ) ) | 
| Settings entry GPSD port number.  More... | |
| static const QgsSettingsEntryString * | settingsGpsSerialDevice = new QgsSettingsEntryString( QStringLiteral( "gpsd-serial-device" ), QgsSettingsTree::sTreeGps, QString(), QStringLiteral( "GPS serial device name" ) ) | 
| Settings entry GPS serial device name.  More... | |
| static const QgsSettingsEntryInteger * | settingsGpsTimeStampOffsetFromUtc = new QgsSettingsEntryInteger( QStringLiteral( "timestamp-offset-from-utc" ), QgsSettingsTree::sTreeGps, 0, QStringLiteral( "GPS time stamp offset from UTC (in seconds)" ) ) | 
| Settings entry GPS time offset from UTC in seconds.  More... | |
| static const QgsSettingsEntryEnumFlag< Qt::TimeSpec > * | settingsGpsTimeStampSpecification = new QgsSettingsEntryEnumFlag<Qt::TimeSpec>( QStringLiteral( "timestamp-time-spec" ), QgsSettingsTree::sTreeGps, Qt::TimeSpec::LocalTime, QStringLiteral( "GPS time stamp specification" ) ) | 
| Settings entry time specification for GPS time stamps.  More... | |
| static const QgsSettingsEntryString * | settingsGpsTimeStampTimeZone = new QgsSettingsEntryString( QStringLiteral( "timestamp-time-zone" ), QgsSettingsTree::sTreeGps, QString(), QStringLiteral( "GPS time stamp time zone" ) ) | 
| Settings entry GPS time stamp time zone.  More... | |
  Protected Attributes inherited from QgsGpsConnection | |
| QgsGpsInformation | mLastGPSInformation | 
| Last state of the gps related variables (e.g. position, time, ...)  More... | |
| std::unique_ptr< QIODevice > | mSource | 
| Data source (e.g. serial device, socket, file,...)  More... | |
| Status | mStatus = NotConnected | 
| Connection status.  More... | |
A GPS connection subclass based on the Qt Location libraries.
Definition at line 37 of file qgsqtlocationconnection.h.
| QgsQtLocationConnection::QgsQtLocationConnection | ( | ) | 
Definition at line 25 of file qgsqtlocationconnection.cpp.
      
  | 
  protectedslot | 
Needed to make QtLocation detected.
Definition at line 41 of file qgsqtlocationconnection.cpp.
      
  | 
  overrideprotectedslot | 
Parse available data source content.
Definition at line 57 of file qgsqtlocationconnection.cpp.
      
  | 
  protectedslot | 
Called when the position updated.
Definition at line 51 of file qgsqtlocationconnection.cpp.
      
  | 
  protectedslot | 
Called when the number of satellites in use is updated.
Definition at line 130 of file qgsqtlocationconnection.cpp.
      
  | 
  protectedslot | 
Called when the number of satellites in view is updated.
Definition at line 110 of file qgsqtlocationconnection.cpp.