QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
Contains settings and properties relating to how a QgsProject should interact with a GPS device. More...
#include <qgsprojectgpssettings.h>
Public Slots | |
void | setAutomaticallyAddTrackVertices (bool enabled) |
Sets whether track vertices should be automatically created whenever new locations are received from the GPS device. | |
void | setAutomaticallyCommitFeatures (bool enabled) |
Sets whether features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer). | |
void | setDestinationFollowsActiveLayer (bool follow) |
Sets whether the destination layer for storing features digitized from GPS should follow the current active layer automatically. | |
void | setDestinationLayer (QgsVectorLayer *layer) |
Sets the destination layer to be used for storing features digitized from GPS. | |
void | setDestinationTimeStampField (QgsVectorLayer *layer, const QString &field) |
Sets the destination field name for automatically storing timestamps in the specified destination layer. | |
Signals | |
void | automaticallyAddTrackVerticesChanged (bool enabled) |
Emitted whenever the automaticallyAddTrackVertices() setting is changed. | |
void | automaticallyCommitFeaturesChanged (bool enabled) |
Emitted whenever the automaticallyCommitFeatures() setting is changed. | |
void | destinationFollowsActiveLayerChanged (bool follows) |
Emitted whenever the destinationFollowsActiveLayer() setting is changed. | |
void | destinationLayerChanged (QgsVectorLayer *layer) |
Emitted whenever the destination layer for features digitized from GPS is changed. | |
void | destinationTimeStampFieldChanged (const QString &field) |
Emitted whenever the destination field for automatic time stamps is changed. | |
Public Member Functions | |
QgsProjectGpsSettings (QObject *parent=nullptr) | |
Constructor for QgsProjectGpsSettings with the specified parent object. | |
~QgsProjectGpsSettings () override | |
bool | automaticallyAddTrackVertices () const |
Returns true if track vertices should be automatically created whenever new locations are received from the GPS device. | |
bool | automaticallyCommitFeatures () const |
Returns true if features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer). | |
bool | destinationFollowsActiveLayer () const |
Returns true if the destination layer for storing features digitized from GPS should follow the current active layer automatically. | |
QgsVectorLayer * | destinationLayer () const |
Returns the destination layer to be used for storing features digitized from GPS. | |
QString | destinationTimeStampField () const |
Returns the destination time stamp field name for the current destinationLayer(), or an empty string if time stamps should not be automatically saved. | |
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. | |
void | reset () |
Resets the settings to a default state. | |
void | resolveReferences (const QgsProject *project) |
Resolves reference to layers from stored layer ID (if it has not been resolved already) | |
QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const |
Returns a DOM element representing the settings. | |
Properties | |
bool | automaticallyAddTrackVertices |
bool | automaticallyCommitFeatures |
QgsVectorLayer * | destinationLayer |
Contains settings and properties relating to how a QgsProject should interact with a GPS device.
Definition at line 36 of file qgsprojectgpssettings.h.
QgsProjectGpsSettings::QgsProjectGpsSettings | ( | QObject * | parent = nullptr | ) |
Constructor for QgsProjectGpsSettings with the specified parent object.
Definition at line 20 of file qgsprojectgpssettings.cpp.
|
overridedefault |
bool QgsProjectGpsSettings::automaticallyAddTrackVertices | ( | ) | const |
Returns true
if track vertices should be automatically created whenever new locations are received from the GPS device.
Definition at line 133 of file qgsprojectgpssettings.cpp.
|
signal |
Emitted whenever the automaticallyAddTrackVertices() setting is changed.
bool QgsProjectGpsSettings::automaticallyCommitFeatures | ( | ) | const |
Returns true
if features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer).
Definition at line 138 of file qgsprojectgpssettings.cpp.
|
signal |
Emitted whenever the automaticallyCommitFeatures() setting is changed.
bool QgsProjectGpsSettings::destinationFollowsActiveLayer | ( | ) | const |
Returns true
if the destination layer for storing features digitized from GPS should follow the current active layer automatically.
Definition at line 143 of file qgsprojectgpssettings.cpp.
|
signal |
Emitted whenever the destinationFollowsActiveLayer() setting is changed.
QgsVectorLayer * QgsProjectGpsSettings::destinationLayer | ( | ) | const |
Returns the destination layer to be used for storing features digitized from GPS.
true
then this layer will be changed whenever the user changes the active layer in the QGIS interface.Definition at line 148 of file qgsprojectgpssettings.cpp.
|
signal |
Emitted whenever the destination layer for features digitized from GPS is changed.
QString QgsProjectGpsSettings::destinationTimeStampField | ( | ) | const |
Returns the destination time stamp field name for the current destinationLayer(), or an empty string if time stamps should not be automatically saved.
Definition at line 158 of file qgsprojectgpssettings.cpp.
|
signal |
Emitted whenever the destination field for automatic time stamps is changed.
The field argument will be an empty string if time stamps should not be automatically saved.
QMap< QString, QString > QgsProjectGpsSettings::destinationTimeStampFields | ( | ) | const |
Returns the map of destination layer ID to target time stamp field name.
Definition at line 153 of file qgsprojectgpssettings.cpp.
bool QgsProjectGpsSettings::readXml | ( | const QDomElement & | element, |
const QgsReadWriteContext & | context | ||
) |
Reads the settings's state from a DOM element.
Definition at line 56 of file qgsprojectgpssettings.cpp.
void QgsProjectGpsSettings::reset | ( | ) |
Resets the settings to a default state.
Definition at line 40 of file qgsprojectgpssettings.cpp.
void QgsProjectGpsSettings::resolveReferences | ( | const QgsProject * | project | ) |
Resolves reference to layers from stored layer ID (if it has not been resolved already)
Definition at line 26 of file qgsprojectgpssettings.cpp.
|
slot |
Sets whether track vertices should be automatically created whenever new locations are received from the GPS device.
Definition at line 167 of file qgsprojectgpssettings.cpp.
|
slot |
Sets whether features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer).
Definition at line 176 of file qgsprojectgpssettings.cpp.
|
slot |
Sets whether the destination layer for storing features digitized from GPS should follow the current active layer automatically.
Definition at line 185 of file qgsprojectgpssettings.cpp.
|
slot |
Sets the destination layer to be used for storing features digitized from GPS.
true
then this layer will be changed whenever the user changes the active layer in the QGIS interface.Definition at line 194 of file qgsprojectgpssettings.cpp.
|
slot |
Sets the destination field name for automatically storing timestamps in the specified destination layer.
Set field argument to an empty string if time stamps should not be automatically saved.
Definition at line 214 of file qgsprojectgpssettings.cpp.
QDomElement QgsProjectGpsSettings::writeXml | ( | QDomDocument & | doc, |
const QgsReadWriteContext & | context | ||
) | const |
Returns a DOM element representing the settings.
Definition at line 90 of file qgsprojectgpssettings.cpp.
|
readwrite |
Definition at line 42 of file qgsprojectgpssettings.h.
|
readwrite |
Definition at line 43 of file qgsprojectgpssettings.h.
|
readwrite |
Definition at line 44 of file qgsprojectgpssettings.h.