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 a inline panel

QWidget

QObject

QPaintDevice

Methods

currentStyle

Returns the current style defined by the widget.

loadStyle

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

setLayer

Sets the vector layer associated with the widget.

setPresets

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

setRule

Sets the current expression rule to show in the widget.

Signals

canceled

Emitted when a user has opted to cancel the rule modification.

ruleDeleted

Emitted when a user has opted to deleted the current rule.

ruleSaved

Emitted when a user has opted to save the current rule.

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]

Emitted when a user has opted to cancel the rule modification.

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]

Emitted when a user has opted to deleted the current rule.

signal ruleSaved[source]

Emitted when a user has opted to save the current rule.

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])