Class: QgsAbstractSensorWidget¶
Base class for widgets which allow control over the properties of sensors.
Added in version 3.32.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: createSensor(), setSensor(), updateSensor()
Class Hierarchy¶
Base classes¶
- 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]¶
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.
- abstract createSensor(self) QgsAbstractSensor | None[source]¶
Creates a new sensor matching the settings defined in the widget.
- Return type:
Optional[QgsAbstractSensor]
- abstract 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
- abstract 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