Class: QgsEditConditionalFormatRuleWidget

A widget for customizing an individual conditional formatting rule.

Added in version 3.10.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsEditConditionalFormatRuleWidget

Base classes

QgsPanelWidget

Base class for any widget that can be shown as an inline panel.

QWidget

QObject

QPaintDevice

class qgis.gui.QgsEditConditionalFormatRuleWidget[source]

Bases: QgsPanelWidget

__init__(parent: QWidget | None = None)

Constructor for QgsFieldConditionalFormatWidget, with the specified parent widget.

Parameters:

parent (Optional[QWidget] = None)

signal canceled[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.

currentStyle(self) QgsConditionalStyle[source]

Returns the current style defined by the widget.

See also

loadStyle()

Return type:

QgsConditionalStyle

loadStyle(self, style: QgsConditionalStyle)[source]

Sets the widget to match the settings from the specified style.

See also

currentStyle()

Parameters:

style (QgsConditionalStyle)

signal ruleDeleted[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.

signal ruleSaved[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.

setLayer(self, layer: QgsVectorLayer | None)[source]

Sets the vector layer associated with the widget.

Parameters:

layer (Optional[QgsVectorLayer])

setPresets(self, styles: Iterable[QgsConditionalStyle])[source]

Sets the preset styles that can be used for quick pick.

Parameters:

styles (Iterable[QgsConditionalStyle])

setRule(self, rule: str | None)[source]

Sets the current expression rule to show in the widget.

Parameters:

rule (Optional[str])