1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgsgpsconnection.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
%ModuleHeaderCode
#include "qgsgpsconnection.h"
%End
class QgsGpsConnection : QObject
{
%Docstring(signature="appended")
Abstract base class for connection to a GPS device
%End
%TypeHeaderCode
#include "qgsgpsconnection.h"
#include "qgsgpsdconnection.h"
#include "qgsnmeaconnection.h"
%End
%ConvertToSubClassCode
if ( sipCpp->inherits( "QgsGpsdConnection" ) )
sipType = sipType_QgsGpsdConnection;
else if ( sipCpp->inherits( "QgsNmeaConnection" ) )
sipType = sipType_QgsNmeaConnection;
else
sipType = NULL;
%End
public:
enum Status /BaseType=IntEnum/
{
NotConnected,
Connected,
DataReceived,
GPSDataReceived
};
QgsGpsConnection( QIODevice *dev /Transfer/ );
%Docstring
Constructor
:param dev: input device for the connection (e.g. serial device). The
class takes ownership of the object
%End
~QgsGpsConnection();
bool connect();
%Docstring
Opens connection to device
%End
bool close();
%Docstring
Closes connection to device
%End
void setSource( QIODevice *source /Transfer/ );
%Docstring
Sets the GPS source. The class takes ownership of the device class
%End
Status status() const;
%Docstring
Returns the status. Possible state are not connected, connected, data
received
%End
QgsGpsInformation currentGPSInformation() const;
%Docstring
Returns the current gps information (lat, lon, etc.)
%End
QgsPoint lastValidLocation() const;
%Docstring
Returns the last valid location obtained by the device.
.. versionadded:: 3.30
%End
signals:
void stateChanged( const QgsGpsInformation &info );
%Docstring
Emitted whenever the GPS state is changed.
%End
void nmeaSentenceReceived( const QString &substring );
%Docstring
Emitted whenever the GPS device receives a raw NMEA sentence.
%End
void fixStatusChanged( Qgis::GpsFixStatus status );
%Docstring
Emitted when the GPS device fix status is changed.
.. versionadded:: 3.30
%End
void positionChanged( const QgsPoint &point );
%Docstring
Emitted when the GPS position changes.
This signal is only emitted when the new GPS location is considered
valid (see :py:func:`QgsGpsInformation.isValid()`).
.. versionadded:: 3.30
%End
protected:
protected slots:
virtual void parseData() = 0;
%Docstring
Parse available data source content
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgsgpsconnection.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|