Class: QgsSensorGuiRegistry

class qgis.gui.QgsSensorGuiRegistry

Bases: PyQt5.QtCore.QObject

Registry of available sensor GUI behavior.

QgsSensorGuiRegistry is not usually directly created, but rather accessed through QgsGui.sensorGuiRegistry().

This acts as a companion to QgsSensorRegistry, handling only the components related to the GUI behavior of sensors.

Added in version 3.32.

QgsSensorGuiRegistry(parent: QObject = None) Creates a new empty sensor GUI registry.

QgsSensorGuiRegistry is not usually directly created, but rather accessed through QgsGui.sensorGuiRegistry().

Methods

addSensorGuiMetadata

Registers the GUI metadata for a new sensor type.

childEvent

connectNotify

createSensor

Creates a new instance of a sensor given the type.

createSensorWidget

Creates a new instance of a sensor configuration widget for the specified sensor.

customEvent

disconnectNotify

isSignalConnected

populate

Populates the registry with standard sensor types.

receivers

sender

senderSignalIndex

sensorMetadata

Returns the metadata for the specified sensor type.

sensorTypes

Returns a list of sensor types handled by the registry.

timerEvent

Signals

sensorAdded

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

addSensorGuiMetadata(self, metadata: QgsSensorAbstractGuiMetadata) bool

Registers the GUI metadata for a new sensor type. Takes ownership of the metadata instance.

Parameters:

metadata (QgsSensorAbstractGuiMetadata)

Return type:

bool

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
createSensor(self, type: str, parent: QObject = None) QgsAbstractSensor

Creates a new instance of a sensor given the type.

Parameters:
  • type (str)

  • parent (QObject = None)

Return type:

QgsAbstractSensor

createSensorWidget(self, sensor: QgsAbstractSensor) QgsAbstractSensorWidget

Creates a new instance of a sensor configuration widget for the specified sensor. The sensor doesn’t need to live for the duration of the widget, it is only used when creating the configuration widget to match a sensor type and initiate the widget to match the sensor settings.

Parameters:

sensor (QgsAbstractSensor)

Return type:

QgsAbstractSensorWidget

customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) bool
populate(self) bool

Populates the registry with standard sensor types. If called on a non-empty registry then this will have no effect and will return False.

Return type:

bool

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
sensorAdded

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

sensorMetadata(self, type: str) QgsSensorAbstractGuiMetadata

Returns the metadata for the specified sensor type. Returns None if a corresponding sensor type was not found in the registry.

Parameters:

type (str)

Return type:

QgsSensorAbstractGuiMetadata

sensorTypes(self) Dict[str, str]

Returns a list of sensor types handled by the registry.

Return type:

Dict[str, str]

timerEvent(self, QTimerEvent)