Class: QgsProjectGpsSettings¶
- class qgis.core.QgsProjectGpsSettings¶
Bases:
PyQt5.QtCore.QObject
Contains settings and properties relating to how a
QgsProject
should interact with a GPS device.New in version 3.30.
QgsProjectGpsSettings(parent: QObject = None) Constructor for
QgsProjectGpsSettings
with the specifiedparent
object.Methods
Returns
True
if track vertices should be automatically created whenever new locations are received from the GPS device.Returns
True
if features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer).Returns
True
if the destination layer for storing features digitized from GPS should follow the current active layer automatically.Returns the destination layer to be used for storing features digitized from GPS.
Returns the destination time stamp field name for the current
destinationLayer()
, or an empty string if time stamps should not be automatically saved.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
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- automaticallyAddTrackVertices(self) bool ¶
Returns
True
if track vertices should be automatically created whenever new locations are received from the GPS device.See also
- Return type:
bool
- automaticallyAddTrackVerticesChanged¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- automaticallyCommitFeatures(self) bool ¶
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
- automaticallyCommitFeaturesChanged¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- destinationFollowsActiveLayer(self) bool ¶
Returns
True
if the destination layer for storing features digitized from GPS should follow the current active layer automatically.See also
- Return type:
bool
- destinationFollowsActiveLayerChanged¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- destinationLayer(self) QgsVectorLayer ¶
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:
- destinationLayerChanged¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- destinationTimeStampField(self) str ¶
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
- destinationTimeStampFieldChanged¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- 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]
- disconnectNotify(self, QMetaMethod)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool ¶
Reads the settings’s state from a DOM element.
See also
- Parameters:
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type:
bool
- receivers(self, PYQT_SIGNAL) int ¶
- reset(self)¶
Resets the settings to a default state.
- resolveReferences(self, project: QgsProject)¶
Resolves reference to layers from stored layer ID (if it has not been resolved already)
- Parameters:
project (QgsProject) –
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setAutomaticallyAddTrackVertices(self, enabled: bool)¶
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)¶
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)¶
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)¶
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 (QgsVectorLayer) –
- setDestinationTimeStampField(self, layer: QgsVectorLayer, field: str)¶
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 (QgsVectorLayer) –
field (str) –
- timerEvent(self, QTimerEvent)¶
- writeXml(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
Returns a DOM element representing the settings.
See also
- Parameters:
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
QDomElement