Class: QgsAbstractRelationEditorConfigWidget

This class should be subclassed for every configurable relation widget type.

It implements the GUI configuration widget and transforms this to/from a configuration.

It will only be instantiated by {QgsAbstractRelationEditorWidgetFactory}

Added in version 3.18.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsAbstractRelationEditorConfigWidget

Base classes

QWidget

QObject

QPaintDevice

Subclasses

QgsRelationEditorConfigWidget

Creates a new configuration widget for the relation editor widget

Methods

config

Create a configuration from the current GUI state

layer

Returns the layer for which this configuration widget applies

nmRelation

Returns the nm relation for which this configuration widget applies

relation

Returns the relation for which this configuration widget applies

setConfig

Update the configuration widget to represent the given configuration.

setNmRelation

Set the nm relation for this widget.

class qgis.gui.QgsAbstractRelationEditorConfigWidget[source]

Bases: QWidget

__init__(relation: QgsRelation, parent: QWidget | None)

Create a new configuration widget

Parameters:
  • relation (QgsRelation) – The relation for which the configuration dialog will be created

  • parent (Optional[QWidget]) – A parent widget

config(self) Dict[str, Any][source]

Create a configuration from the current GUI state

Return type:

Dict[str, Any]

Returns:

A widget configuration

layer(self) QgsVectorLayer | None[source]

Returns the layer for which this configuration widget applies

Return type:

Optional[QgsVectorLayer]

Returns:

The layer

nmRelation(self) QgsRelation[source]

Returns the nm relation for which this configuration widget applies

Return type:

QgsRelation

Returns:

The nm relation

relation(self) QgsRelation[source]

Returns the relation for which this configuration widget applies

Return type:

QgsRelation

Returns:

The relation

setConfig(self, config: Dict[str, Any])[source]

Update the configuration widget to represent the given configuration.

Parameters:

config (Dict[str, Any]) – The configuration which should be represented by this widget

setNmRelation(self, nmRelation: QgsRelation)[source]

Set the nm relation for this widget.

Parameters:

nmRelation (QgsRelation) – The nm relation