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
. IfTrue
is returned,sensor
was an acceptable type and the widget has been updated to match thesensor
’s properties.If
False
is 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
sensor
to match the settings defined in the widget. IfTrue
is returned, thesensor
was successfully updated.If
False
is returned, then the widget could not successfully update thesensor
.- Parameters:
sensor (Optional[QgsAbstractSensor])
- Return type:
bool