Class: QgsAbstractRelationEditorConfigWidget

Abstract base class for configurable relation widget types.

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.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: config(), setConfig()

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.

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

abstract 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

virtual 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

abstract 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

virtual setNmRelation(self, nmRelation: QgsRelation)[source]

Set the nm relation for this widget.

Parameters:

nmRelation (QgsRelation) – The nm relation