Class: QgsNumericFormatSelectorWidget¶
A widget which allows choice of numeric formats and the properties of them.
Added in version 3.12.
QgsNumericFormatSelectorWidget¶
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as an inline panel. |
|
- class qgis.gui.QgsNumericFormatSelectorWidget[source]¶
Bases:
QgsPanelWidget- __init__(parent: QWidget | None = None)
Constructor for QgsNumericFormatSelectorWidget with the specified
parentwidget.- Parameters:
parent (Optional[QWidget] = None)
- 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.
- format(self) QgsNumericFormat | None[source]¶
Returns a new format object representing the settings currently configured in the widget.
The caller takes ownership of the returned object.
- Return type:
Optional[QgsNumericFormat]
- registerExpressionContextGenerator(self, generator: QgsExpressionContextGenerator | None)[source]¶
Register an expression context
generatorclass that will be used to retrieve an expression context for the widget when required.Ownership is not transferred, and the
generatormust exist for the lifetime of this widget.Added in version 3.40.
- Parameters:
generator (Optional[QgsExpressionContextGenerator])
- setFormat(self, format: QgsNumericFormat | None)[source]¶
Sets the format to show in the widget.
- Parameters:
format (Optional[QgsNumericFormat])