QGIS/python/core/auto_generated/gps/qgsgpslogger.sip.in
Nyall Dawson d5c05e3b17 Refactor out GPS logging classes, so that they share a common base class
Moves GPS track logging logic out of app and into core so that it
can be resused in a generic way.
2022-11-14 18:00:29 +10:00

167 lines
4.3 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/gps/qgsgpslogger.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
typedef struct _nmeaPOS nmeaPOS;
typedef struct _nmeaTIME nmeaTIME;
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
QVector<QgsPoint> currentTrack() const;
%Docstring
Returns the recorded points in the current track.
These points will always be in WGS84 coordinate reference system.
%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
double lastElevation() const;
%Docstring
Returns the last recorded elevation the device.
%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
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
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.pl again *
************************************************************************/