15#ifndef QGSPROJECTGPSSETTINGS_H
16#define QGSPROJECTGPSSETTINGS_H
238 bool mAutoAddTrackVertices = false;
239 bool mAutoCommitFeatures = false;
241 bool mDestinationFollowsActiveLayer = true;
244 QMap<QString, QString> mDestinationTimestampFields;
void setAutomaticallyCommitFeatures(bool enabled)
Sets whether features created from GPS locations should be immediately committed to their target laye...
bool automaticallyCommitFeatures
void destinationFollowsActiveLayerChanged(bool follows)
Emitted whenever the destinationFollowsActiveLayer() setting is changed.
bool automaticallyAddTrackVertices
void destinationLayerChanged(QgsVectorLayer *layer)
Emitted whenever the destination layer for features digitized from GPS is changed.
void setDestinationFollowsActiveLayer(bool follow)
Sets whether the destination layer for storing features digitized from GPS should follow the current ...
QMap< QString, QString > destinationTimeStampFields() const
Returns the map of destination layer ID to target time stamp field name.
bool readXml(const QDomElement &element, const QgsReadWriteContext &context)
Reads the settings's state from a DOM element.
QgsProjectGpsSettings(QObject *parent=nullptr)
Constructor for QgsProjectGpsSettings with the specified parent object.
void reset()
Resets the settings to a default state.
QgsVectorLayer * destinationLayer
void setDestinationLayer(QgsVectorLayer *layer)
Sets the destination layer to be used for storing features digitized from GPS.
void setAutomaticallyAddTrackVertices(bool enabled)
Sets whether track vertices should be automatically created whenever new locations are received from ...
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Returns a DOM element representing the settings.
void resolveReferences(const QgsProject *project)
Resolves reference to layers from stored layer ID (if it has not been resolved already).
void setDestinationTimeStampField(QgsVectorLayer *layer, const QString &field)
Sets the destination field name for automatically storing timestamps in the specified destination lay...
bool destinationFollowsActiveLayer() const
Returns true if the destination layer for storing features digitized from GPS should follow the curre...
void destinationTimeStampFieldChanged(const QString &field)
Emitted whenever the destination field for automatic time stamps is changed.
void automaticallyCommitFeaturesChanged(bool enabled)
Emitted whenever the automaticallyCommitFeatures() setting is changed.
void automaticallyAddTrackVerticesChanged(bool enabled)
Emitted whenever the automaticallyAddTrackVertices() setting is changed.
QString destinationTimeStampField() const
Returns the destination time stamp field name for the current destinationLayer(), or an empty string ...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
A container for the context for various read/write operations on objects.
Represents a vector layer which manages a vector based dataset.
_LayerRef< QgsVectorLayer > QgsVectorLayerRef