Class: QgsProjectGpsSettings¶
Contains settings and properties relating to how a
QgsProject
should interact with a GPS device.
Added in version 3.30.
Class Hierarchy¶
Base classes¶
Methods
Returns |
|
Returns |
|
Returns |
|
Returns the destination layer to be used for storing features digitized from GPS. |
|
Returns the destination time stamp field name for the current |
|
Returns the map of destination layer ID to target time stamp field name. |
|
Reads the settings's state from a DOM element. |
|
Resets the settings to a default state. |
|
Resolves reference to layers from stored layer ID (if it has not been resolved already) |
|
Sets whether track vertices should be automatically created whenever new locations are received from the GPS device. |
|
Sets whether features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer). |
|
Sets whether the destination layer for storing features digitized from GPS should follow the current active layer automatically. |
|
Sets the destination layer to be used for storing features digitized from GPS. |
|
Sets the destination field name for automatically storing timestamps in the specified destination layer. |
|
Returns a DOM element representing the settings. |
Signals
Emitted whenever the |
|
Emitted whenever the |
|
Emitted whenever the |
|
Emitted whenever the destination layer for features digitized from GPS is changed. |
|
Emitted whenever the destination field for automatic time stamps is changed. |
- class qgis.core.QgsProjectGpsSettings[source]¶
Bases:
QObject
- __init__(parent: QObject | None = None)
Constructor for QgsProjectGpsSettings with the specified
parent
object.- Parameters:
parent (Optional[QObject] = None)
- automaticallyAddTrackVertices(self) bool [source]¶
Returns
True
if track vertices should be automatically created whenever new locations are received from the GPS device.See also
- Return type:
bool
- signal automaticallyAddTrackVerticesChanged(enabled: bool)[source]¶
Emitted whenever the
automaticallyAddTrackVertices()
setting is changed.See also
See also
- Parameters:
enabled (bool)
- automaticallyCommitFeatures(self) bool [source]¶
Returns
True
if features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer).See also
See also
- Return type:
bool
- signal automaticallyCommitFeaturesChanged(enabled: bool)[source]¶
Emitted whenever the
automaticallyCommitFeatures()
setting is changed.See also
See also
- Parameters:
enabled (bool)
- destinationFollowsActiveLayer(self) bool [source]¶
Returns
True
if the destination layer for storing features digitized from GPS should follow the current active layer automatically.See also
- Return type:
bool
- signal destinationFollowsActiveLayerChanged(follows: bool)[source]¶
Emitted whenever the
destinationFollowsActiveLayer()
setting is changed.See also
See also
- Parameters:
follows (bool)
- destinationLayer(self) QgsVectorLayer | None [source]¶
Returns the destination layer to be used for storing features digitized from GPS.
Note
If
destinationFollowsActiveLayer()
isTrue
then this layer will be changed whenever the user changes the active layer in the QGIS interface.See also
See also
- Return type:
Optional[QgsVectorLayer]
- signal destinationLayerChanged(layer: QgsVectorLayer)[source]¶
Emitted whenever the destination layer for features digitized from GPS is changed.
See also
See also
- Parameters:
layer (QgsVectorLayer)
- destinationTimeStampField(self) str [source]¶
Returns the destination time stamp field name for the current
destinationLayer()
, or an empty string if time stamps should not be automatically saved.See also
See also
- Return type:
str
- signal destinationTimeStampFieldChanged(field: str)[source]¶
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.See also
See also
See also
- Parameters:
field (str)
- destinationTimeStampFields(self) Dict[str, str] ¶
Returns the map of destination layer ID to target time stamp field name.
See also
See also
See also
- Return type:
Dict[str, str]
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool [source]¶
Reads the settings’s state from a DOM element.
See also
- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
bool
- resolveReferences(self, project: QgsProject | None)[source]¶
Resolves reference to layers from stored layer ID (if it has not been resolved already)
- Parameters:
project (Optional[QgsProject])
- setAutomaticallyAddTrackVertices(self, enabled: bool)[source]¶
Sets whether track vertices should be automatically created whenever new locations are received from the GPS device.
See also
- Parameters:
enabled (bool)
- setAutomaticallyCommitFeatures(self, enabled: bool)[source]¶
Sets whether features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer).
See also
See also
- Parameters:
enabled (bool)
- setDestinationFollowsActiveLayer(self, follow: bool)[source]¶
Sets whether the destination layer for storing features digitized from GPS should follow the current active layer automatically.
See also
- Parameters:
follow (bool)
- setDestinationLayer(self, layer: QgsVectorLayer | None)[source]¶
Sets the destination
layer
to be used for storing features digitized from GPS.Note
If
destinationFollowsActiveLayer()
isTrue
then this layer will be changed whenever the user changes the active layer in the QGIS interface.See also
See also
- Parameters:
layer (Optional[QgsVectorLayer])
- setDestinationTimeStampField(self, layer: QgsVectorLayer | None, field: str | None)[source]¶
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.See also
See also
- Parameters:
layer (Optional[QgsVectorLayer])
field (Optional[str])
- writeXml(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement [source]¶
Returns a DOM element representing the settings.
See also
- Parameters:
doc (QDomDocument)
context (QgsReadWriteContext)
- Return type:
QDomElement