QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Properties | List of all members
QgsProjectGpsSettings Class Reference

Contains settings and properties relating to how a QgsProject should interact with a GPS device. More...

#include <qgsprojectgpssettings.h>

Inheritance diagram for QgsProjectGpsSettings:
Inheritance graph
[legend]

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.
 
QgsVectorLayerdestinationLayer () 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
 
QgsVectorLayerdestinationLayer
 

Detailed Description

Contains settings and properties relating to how a QgsProject should interact with a GPS device.

Since
QGIS 3.30

Definition at line 36 of file qgsprojectgpssettings.h.

Constructor & Destructor Documentation

◆ QgsProjectGpsSettings()

QgsProjectGpsSettings::QgsProjectGpsSettings ( QObject *  parent = nullptr)

Constructor for QgsProjectGpsSettings with the specified parent object.

Definition at line 20 of file qgsprojectgpssettings.cpp.

◆ ~QgsProjectGpsSettings()

QgsProjectGpsSettings::~QgsProjectGpsSettings ( )
overridedefault

Member Function Documentation

◆ automaticallyAddTrackVertices()

bool QgsProjectGpsSettings::automaticallyAddTrackVertices ( ) const

Returns true if track vertices should be automatically created whenever new locations are received from the GPS device.

See also
setAutomaticallyAddTrackVertices()
automaticallyAddTrackVerticesChanged()

Definition at line 133 of file qgsprojectgpssettings.cpp.

◆ automaticallyAddTrackVerticesChanged

void QgsProjectGpsSettings::automaticallyAddTrackVerticesChanged ( bool  enabled)
signal

◆ automaticallyCommitFeatures()

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).

See also
setAutomaticallyCommitFeatures()
automaticallyCommitFeaturesChanged()

Definition at line 138 of file qgsprojectgpssettings.cpp.

◆ automaticallyCommitFeaturesChanged

void QgsProjectGpsSettings::automaticallyCommitFeaturesChanged ( bool  enabled)
signal

◆ destinationFollowsActiveLayer()

bool QgsProjectGpsSettings::destinationFollowsActiveLayer ( ) const

Returns true if the destination layer for storing features digitized from GPS should follow the current active layer automatically.

See also
setDestinationFollowsActiveLayer()
destinationFollowsActiveLayerChanged()

Definition at line 143 of file qgsprojectgpssettings.cpp.

◆ destinationFollowsActiveLayerChanged

void QgsProjectGpsSettings::destinationFollowsActiveLayerChanged ( bool  follows)
signal

◆ destinationLayer()

QgsVectorLayer * QgsProjectGpsSettings::destinationLayer ( ) const

Returns the destination layer to be used for storing features digitized from GPS.

Note
If destinationFollowsActiveLayer() is true then this layer will be changed whenever the user changes the active layer in the QGIS interface.
See also
setDestinationLayer()
destinationLayerChanged()

Definition at line 148 of file qgsprojectgpssettings.cpp.

◆ destinationLayerChanged

void QgsProjectGpsSettings::destinationLayerChanged ( QgsVectorLayer layer)
signal

Emitted whenever the destination layer for features digitized from GPS is changed.

See also
destinationLayer()
setDestinationLayer()

◆ destinationTimeStampField()

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.

See also
destinationTimeStampFields()
setDestinationTimeStampField()

Definition at line 158 of file qgsprojectgpssettings.cpp.

◆ destinationTimeStampFieldChanged

void QgsProjectGpsSettings::destinationTimeStampFieldChanged ( const QString &  field)
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.

See also
destinationTimeStampFields()
destinationTimeStampField()
setDestinationTimeStampField()

◆ destinationTimeStampFields()

QMap< QString, QString > QgsProjectGpsSettings::destinationTimeStampFields ( ) const

Returns the map of destination layer ID to target time stamp field name.

See also
destinationTimeStampField()
setDestinationTimeStampField()
setDestinationTimeStampField()

Definition at line 153 of file qgsprojectgpssettings.cpp.

◆ readXml()

bool QgsProjectGpsSettings::readXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)

Reads the settings's state from a DOM element.

See also
writeXml()

Definition at line 56 of file qgsprojectgpssettings.cpp.

◆ reset()

void QgsProjectGpsSettings::reset ( )

Resets the settings to a default state.

Definition at line 40 of file qgsprojectgpssettings.cpp.

◆ resolveReferences()

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.

◆ setAutomaticallyAddTrackVertices

void QgsProjectGpsSettings::setAutomaticallyAddTrackVertices ( bool  enabled)
slot

Sets whether track vertices should be automatically created whenever new locations are received from the GPS device.

See also
automaticallyAddTrackVertices()
automaticallyAddTrackVerticesChanged()

Definition at line 167 of file qgsprojectgpssettings.cpp.

◆ setAutomaticallyCommitFeatures

void QgsProjectGpsSettings::setAutomaticallyCommitFeatures ( bool  enabled)
slot

Sets whether features created from GPS locations should be immediately committed to their target layers (skipping the usual layer edit buffer).

See also
automaticallyCommitFeatures()
automaticallyCommitFeaturesChanged()

Definition at line 176 of file qgsprojectgpssettings.cpp.

◆ setDestinationFollowsActiveLayer

void QgsProjectGpsSettings::setDestinationFollowsActiveLayer ( bool  follow)
slot

Sets whether the destination layer for storing features digitized from GPS should follow the current active layer automatically.

See also
destinationFollowsActiveLayer()
destinationFollowsActiveLayerChanged()

Definition at line 185 of file qgsprojectgpssettings.cpp.

◆ setDestinationLayer

void QgsProjectGpsSettings::setDestinationLayer ( QgsVectorLayer layer)
slot

Sets the destination layer to be used for storing features digitized from GPS.

Note
If destinationFollowsActiveLayer() is true then this layer will be changed whenever the user changes the active layer in the QGIS interface.
See also
destinationLayer()
destinationLayerChanged()

Definition at line 194 of file qgsprojectgpssettings.cpp.

◆ setDestinationTimeStampField

void QgsProjectGpsSettings::setDestinationTimeStampField ( QgsVectorLayer layer,
const QString &  field 
)
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.

See also
destinationTimeStampFields()
destinationTimeStampField()

Definition at line 214 of file qgsprojectgpssettings.cpp.

◆ writeXml()

QDomElement QgsProjectGpsSettings::writeXml ( QDomDocument &  doc,
const QgsReadWriteContext context 
) const

Returns a DOM element representing the settings.

See also
readXml()

Definition at line 90 of file qgsprojectgpssettings.cpp.

Property Documentation

◆ automaticallyAddTrackVertices

bool QgsProjectGpsSettings::automaticallyAddTrackVertices
readwrite

Definition at line 42 of file qgsprojectgpssettings.h.

◆ automaticallyCommitFeatures

bool QgsProjectGpsSettings::automaticallyCommitFeatures
readwrite

Definition at line 43 of file qgsprojectgpssettings.h.

◆ destinationLayer

QgsVectorLayer * QgsProjectGpsSettings::destinationLayer
readwrite

Definition at line 44 of file qgsprojectgpssettings.h.


The documentation for this class was generated from the following files: