Class: QgsLabelingEngineRulesDialog

A dialog which allows configuration of a list of labeling engine rules.

This dialog allows users to add, remove, and edit the properties of a list of QgsAbstractLabelingEngineRule objects.

Added in version 3.40.

QgsLabelingEngineRulesDialog

QgsLabelingEngineRulesDialog

Class Hierarchy

Inheritance diagram of qgis.gui.QgsLabelingEngineRulesDialog

Base classes

QDialog

QWidget

QObject

QPaintDevice

class qgis.gui.QgsLabelingEngineRulesDialog[source]

Bases: QDialog

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

Constructor for QgsLabelingEngineRulesDialog.

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

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

rules(self) List[QgsAbstractLabelingEngineRule]

Returns the rules shown in the dialog.

The caller takes ownership of all returned rules.

Return type:

List[QgsAbstractLabelingEngineRule]

setRules(self, rules: Iterable[QgsAbstractLabelingEngineRule])[source]

Sets the rules to show in the dialog.

Ownership is not transferred, an internal copy will be made.

Parameters:

rules (Iterable[QgsAbstractLabelingEngineRule])