Class: QgsGpsConnection¶
- class qgis.core.QgsGpsConnection(dev: QIODevice)¶
Bases:
PyQt5.QtCore.QObject
Constructor
- Parameters
dev – input device for the connection (e.g. serial device). The class takes ownership of the object
Abstract base class for connection to a GPS device
Methods
Closes connection to device
Opens connection to device
Returns the current gps information (lat, lon, etc.)
Parse available data source content
Sets the GPS source.
Returns the status.
Signals
nmeaSentenceReceived(self, substring: str) [signal]
stateChanged(self, info:
QgsGpsInformation
) [signal]Attributes
- Connected = 1¶
- DataReceived = 2¶
- GPSDataReceived = 3¶
- NotConnected = 0¶
- class Status¶
Bases:
int
- childEvent(self, QChildEvent)¶
- close(self) → bool¶
Closes connection to device
- Return type
bool
- connect(self) → bool¶
Opens connection to device
- Return type
bool
- connectNotify(self, QMetaMethod)¶
- currentGPSInformation(self) → QgsGpsInformation¶
Returns the current gps information (lat, lon, etc.)
- Return type
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- isSignalConnected(self, QMetaMethod) → bool¶
- nmeaSentenceReceived¶
nmeaSentenceReceived(self, substring: str) [signal]
- Parameters
substring (str) –
- parseData(self)¶
Parse available data source content
- receivers(self, PYQT_SIGNAL) → int¶
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- setSource(self, source: QIODevice)¶
Sets the GPS source. The class takes ownership of the device class
- Parameters
source (QIODevice) –
- stateChanged¶
stateChanged(self, info:
QgsGpsInformation
) [signal]- Parameters
info (QgsGpsInformation) –
- status(self) → QgsGpsConnection.Status¶
Returns the status. Possible state are not connected, connected, data received
- Return type
- timerEvent(self, QTimerEvent)¶