Class: QgsGpsToolsInterface

Abstract interface class for the QGIS GPS tools.

Added in version 3.44.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: createFeatureFromGpsTrack(), setGpsPanelConnection(), setGpsTrackLineSymbol()

Abstract Methods

createFeatureFromGpsTrack

Creates a feature from the current GPS track.

setGpsPanelConnection

Sets a GPS connection to use within the GPS Panel widget.

setGpsTrackLineSymbol

Sets the line symbol of the GPS track and changes the QgsAppGpsDigitizing.settingTrackLineSymbol setting.

class qgis.gui.QgsGpsToolsInterface[source]

Bases: object

abstract createFeatureFromGpsTrack(self)[source]

Creates a feature from the current GPS track.

The geometry type of the feature is determined by the layer set via QgsProjectGpsSettings.destinationLayer().

The created geometry will be automatically committed depending on the status of QgsProjectGpsSettings.automaticallyCommitFeatures().

abstract setGpsPanelConnection(self, connection: QgsGpsConnection | None)[source]

Sets a GPS connection to use within the GPS Panel widget.

Any existing GPS connection used by the widget will be disconnected and replaced with this connection. The connection is automatically registered within the QgsApplication.gpsConnectionRegistry().

Parameters:

connection (Optional[QgsGpsConnection])

abstract setGpsTrackLineSymbol(self, symbol: QgsLineSymbol | None)[source]

Sets the line symbol of the GPS track and changes the QgsAppGpsDigitizing.settingTrackLineSymbol setting.

If there is a current GPS track, its appearance is updated according to the symbol.

Parameters:

symbol (Optional[QgsLineSymbol])