Class: QgsNumericFormatSelectorDialog

A simple dialog for customizing a numeric format.

Added in version 3.40.

QgsNumericFormatSelectorDialog

QgsNumericFormatSelectorDialog

Class Hierarchy

Inheritance diagram of qgis.gui.QgsNumericFormatSelectorDialog

Base classes

QDialog

QWidget

QObject

QPaintDevice

Methods

format

Returns a new format object representing the settings currently configured in the dialog.

registerExpressionContextGenerator

Register an expression context generator class that will be used to retrieve an expression context for the dialog when required.

setFormat

Sets the format to show in the dialog.

class qgis.gui.QgsNumericFormatSelectorDialog[source]

Bases: QDialog

__init__(parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = QgsGuiUtils.ModalDialogFlags)

Constructor for QgsNumericFormatSelectorDialog.

Parameters:
  • parent (Optional[QWidget] = None) – parent widget

  • flags (Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags) – window flags for dialog

format(self) QgsNumericFormat | None[source]

Returns a new format object representing the settings currently configured in the dialog.

The caller takes ownership of the returned object.

Return type:

Optional[QgsNumericFormat]

registerExpressionContextGenerator(self, generator: QgsExpressionContextGenerator | None)[source]

Register an expression context generator class that will be used to retrieve an expression context for the dialog when required.

Ownership is not transferred, and the generator must exist for the lifetime of this dialog.

Parameters:

generator (Optional[QgsExpressionContextGenerator])

setFormat(self, format: QgsNumericFormat | None)[source]

Sets the format to show in the dialog.

Parameters:

format (Optional[QgsNumericFormat])