Class: QgsLayoutConfigObject

An object for property widgets for layout items. All layout config type widgets should contain this object.

If you are creating a new QgsLayoutItem configuration widget, you should instead inherit from QgsLayoutItemBaseWidget (rather then directly working with QgsLayoutConfigObject).

Class Hierarchy

Inheritance diagram of qgis.gui.QgsLayoutConfigObject

Base classes

QObject

Methods

coverageLayer

Returns the current layout context coverage layer (if set).

initializeDataDefinedButton

Registers a data defined button, setting up its initial value, connections and description.

layoutAtlas

Returns the atlas for the layout, if available

updateDataDefinedButton

Updates a data defined button to reflect the item's current properties.

class qgis.gui.QgsLayoutConfigObject[source]

Bases: QObject

__init__(parent: QWidget | None, layoutObject: QgsLayoutObject | None)

Constructor for QgsLayoutConfigObject, linked with the specified layoutObject.

Parameters:
coverageLayer(self) QgsVectorLayer | None[source]

Returns the current layout context coverage layer (if set).

Return type:

Optional[QgsVectorLayer]

initializeDataDefinedButton(self, button: QgsPropertyOverrideButton | None, key: QgsLayoutObject.DataDefinedProperty)[source]

Registers a data defined button, setting up its initial value, connections and description. The corresponding property key must be specified.

Parameters:
layoutAtlas(self) QgsLayoutAtlas | None[source]

Returns the atlas for the layout, if available

Return type:

Optional[QgsLayoutAtlas]

updateDataDefinedButton(self, button: QgsPropertyOverrideButton | None)[source]

Updates a data defined button to reflect the item’s current properties.

Parameters:

button (Optional[QgsPropertyOverrideButton])