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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgsgpslogger.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsGpsLogger : QObject
{
%Docstring(signature="appended")
Base class for objects which log incoming GPS data.
This class handles generic logic regarding logging GPS data, such as
creation of tracks from incoming GPS location points.
.. versionadded:: 3.30
%End
%TypeHeaderCode
#include "qgsgpslogger.h"
%End
public:
QgsGpsLogger( QgsGpsConnection *connection, QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsGpsLogger with the specified ``parent`` object.
The logger will automatically record GPS information from the specified
``connection``.
%End
~QgsGpsLogger();
QgsGpsConnection *connection();
%Docstring
Returns the associated GPS connection.
.. seealso:: :py:func:`setConnection`
%End
void setConnection( QgsGpsConnection *connection );
%Docstring
Sets the associated GPS connection.
.. seealso:: :py:func:`connection`
%End
void setEllipsoid( const QString &ellipsoid );
%Docstring
Sets the ``ellipsoid`` which will be used for calculating distances in
the log.
%End
virtual void setTransformContext( const QgsCoordinateTransformContext &context );
%Docstring
Sets the coordinate transform ``context`` to be used when transforming
GPS coordinates.
.. seealso:: :py:func:`transformContext`
%End
QgsCoordinateTransformContext transformContext() const;
%Docstring
Returns the coordinate transform context to be used when transforming
GPS coordinates.
.. seealso:: :py:func:`setTransformContext`
%End
const QgsDistanceArea &distanceArea() const;
%Docstring
Returns the distance area calculator which should be used for
calculating distances associated with the GPS log.
%End
QVector<QgsPoint> currentTrack() const;
%Docstring
Returns the recorded points in the current track.
These points will always be in WGS84 coordinate reference system.
%End
QgsGeometry currentGeometry( Qgis::WkbType type, QString &error /Out/ ) const;
%Docstring
Returns the current logged GPS positions as a geometry of the specified
``type``.
The returned geometries will always be in the WGS84 (EPSG:4326)
coordinate reference system.
:param type: desired geometry type
:return: - logged GPS positions as a geometry.
- error: Will be set to a user-friendly error if the logged
positions could not be converted to an appropriate geometry
%End
QgsPointXY lastPosition() const;
%Docstring
Returns the last recorded position of the device.
The returned point will always be in WGS84 coordinate reference system.
%End
QDateTime lastTimestamp() const;
%Docstring
Returns the last recorded timestamp from the device.
The returned time value will respect all user settings regarding GPS
time zone handling.
%End
QDateTime trackStartTime() const;
%Docstring
Returns the timestamp at which the current track was started.
The returned time value will respect all user settings regarding GPS
time zone handling.
%End
double lastElevation() const;
%Docstring
Returns the last recorded elevation the device.
%End
double lastMValue() const;
%Docstring
Returns the last recorded value corresponding to the
QgsGpsLogger.settingsGpsMValueComponent setting.
%End
void resetTrack();
%Docstring
Resets the current track, discarding all recorded points.
%End
bool automaticallyAddTrackVertices() const;
%Docstring
Returns ``True`` if track vertices will be automatically added whenever
the GPS position is changed.
.. seealso:: :py:func:`setAutomaticallyAddTrackVertices`
%End
void setAutomaticallyAddTrackVertices( bool enabled );
%Docstring
Sets whether track vertices will be automatically added whenever the GPS
position is changed.
.. seealso:: :py:func:`automaticallyAddTrackVertices`
%End
void updateGpsSettings();
%Docstring
Should be called whenever the QGIS GPS settings are changed.
%End
double totalTrackLength() const;
%Docstring
Returns the total length of the current digitized track (in meters).
The returned length is calculated using ellipsoidal calculations.
%End
double trackDistanceFromStart() const;
%Docstring
Returns the direct length from the first vertex in the track to the last
(in meters).
The returned length is calculated using ellipsoidal calculations.
%End
QVariant componentValue( Qgis::GpsInformationComponent component ) const;
%Docstring
Returns the value of the corresponding GPS information ``component``.
%End
signals:
void trackIsEmptyChanged( bool isEmpty );
%Docstring
Emitted whenever the current track changes from being empty to non-empty
or vice versa.
%End
void trackReset();
%Docstring
Emitted whenever the current track is reset.
%End
void trackVertexAdded( const QgsPoint &vertex );
%Docstring
Emitted whenever a new vertex is added to the track.
The ``vertex`` point will be in WGS84 coordinate reference system.
%End
void stateChanged( const QgsGpsInformation &info );
%Docstring
Emitted whenever the associated GPS device state is changed.
%End
void distanceAreaChanged();
%Docstring
Emitted whenever the distance area used to calculate track distances is
changed.
%End
protected:
void addTrackVertex();
%Docstring
Adds a track vertex at the current GPS location.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgsgpslogger.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|