Class: QgsGpsConnection¶
- class qgis.core.QgsGpsConnection¶
Bases:
PyQt5.QtCore.QObject
Abstract base class for connection to a GPS device
QgsGpsConnection(dev: QIODevice) Constructor
- Parameters:
dev –
input device for the connection (e.g. serial device). The class takes ownership of the object
Methods
Closes connection to device
Opens connection to device
Returns the current gps information (lat, lon, etc.)
Returns the last valid location obtained by the device.
Parse available data source content
Sets the GPS source.
Returns the status.
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_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)¶
- fixStatusChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- isSignalConnected(self, QMetaMethod) bool ¶
- lastValidLocation(self) QgsPoint ¶
Returns the last valid location obtained by the device.
New in version 3.30.
- Return type:
- nmeaSentenceReceived¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- parseData(self)¶
Parse available data source content
- positionChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- 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¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- status(self) QgsGpsConnection.Status ¶
Returns the status. Possible state are not connected, connected, data received
- Return type:
- timerEvent(self, QTimerEvent)¶