Class: QgsAbstractSensorWidget¶
Base class for widgets which allow control over the properties of sensors.
Added in version 3.32.
Class Hierarchy¶
Base classes¶
Methods
Creates a new sensor matching the settings defined in the widget. |
|
Sets the widget settings to match a given sensor. |
|
Updates an existing sensor to match the settings defined in the widget. |
Signals
Emitted whenever configuration changes happened on this sensor configuration. |
- class qgis.gui.QgsAbstractSensorWidget[source]¶
Bases:
QWidget- __init__(parent: QWidget | None = None)
Constructor for QgsAbstractSensorWidget.
- Parameters:
parent (Optional[QWidget] = None) – parent widget
- signal changed[source]¶
Emitted whenever configuration changes happened on this sensor configuration.
- createSensor(self) QgsAbstractSensor | None[source]¶
Creates a new sensor matching the settings defined in the widget.
- Return type:
Optional[QgsAbstractSensor]
- setSensor(self, sensor: QgsAbstractSensor | None) bool[source]¶
Sets the widget settings to match a given
sensor. IfTrueis returned,sensorwas an acceptable type and the widget has been updated to match thesensor’s properties.If
Falseis returned, then the widget could not be successfully updated to show the properties ofsensor.- Parameters:
sensor (Optional[QgsAbstractSensor])
- Return type:
bool
- updateSensor(self, sensor: QgsAbstractSensor | None) bool[source]¶
Updates an existing
sensorto match the settings defined in the widget. IfTrueis returned, thesensorwas successfully updated.If
Falseis returned, then the widget could not successfully update thesensor.- Parameters:
sensor (Optional[QgsAbstractSensor])
- Return type:
bool