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¶
Base classes¶
Subclasses¶
Creates a new configuration widget for the relation editor widget. |
Abstract Methods
Create a configuration from the current GUI state |
|
Update the configuration widget to represent the given configuration. |
Methods
Returns the layer for which this configuration widget applies |
|
Returns the relation for which this configuration widget applies |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsAbstractRelationEditorConfigWidget. See the FAQ for more details.
Returns the nm relation for which this configuration widget applies |
|
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
- 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:
- Returns:
The nm relation
- relation(self) QgsRelation [source]¶
Returns the relation for which this configuration widget applies
- Return type:
- 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