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¶
- class qgis.core.QgsProjectGpsSettings[source]¶
Bases:
QObject- __init__(parent: QObject | None = None)
Constructor for QgsProjectGpsSettings with the specified
parentobject.- Parameters:
parent (Optional[QObject] = None)
- automaticallyAddTrackVertices(self) bool[source]¶
Returns
Trueif track vertices should be automatically created whenever new locations are received from the GPS device.See also
- Return type:
bool
- signal automaticallyAddTrackVerticesChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- automaticallyCommitFeatures(self) bool[source]¶
Returns
Trueif 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[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- destinationFollowsActiveLayer(self) bool[source]¶
Returns
Trueif the destination layer for storing features digitized from GPS should follow the current active layer automatically.See also
- Return type:
bool
- signal destinationFollowsActiveLayerChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- destinationLayer(self) QgsVectorLayer | None[source]¶
Returns the destination layer to be used for storing features digitized from GPS.
Note
If
destinationFollowsActiveLayer()isTruethen 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[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- 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[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- 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
layerto be used for storing features digitized from GPS.Note
If
destinationFollowsActiveLayer()isTruethen 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
fieldargument 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