Class: QgsRelationWidgetRegistry¶
- class qgis.gui.QgsRelationWidgetRegistry¶
Bases:
sip.wrapper
Constructor
QgsRelationWidgetRegistry(
QgsRelationWidgetRegistry
)Keeps track of the registered relations widgets. New widgets can be registered, old ones deleted. The default {
QgsRelationEditorWidget
} is protected from removing.Methods
Adds a new registered relation
widgetFactory
Create a relation widget of a given type for a given field.
Creates a configuration widget
Gets access to all registered factories
Returns a list of names of registered relation widgets
Removes a registered relation widget with given
widgetType
- addRelationWidget(self, widgetFactory: QgsAbstractRelationEditorWidgetFactory)¶
Adds a new registered relation
widgetFactory
- Parameters
widgetFactory (QgsAbstractRelationEditorWidgetFactory) –
- create(self, widgetType: str, config: Dict[str, Any], parent: QWidget = None) → QgsAbstractRelationEditorWidget¶
Create a relation widget of a given type for a given field.
- Parameters
widgetType (str) – The widget type to create a relation editor for
config (Dict[str) – The configuration of the widget
parent (QWidget = None) –
- Return type
- createConfigWidget(self, widgetType: str, relation: QgsRelation, parent: QWidget = None) → QgsAbstractRelationEditorConfigWidget¶
Creates a configuration widget
- Parameters
widgetType (str) – The widget type to create a configuration widget for
relation (QgsRelation) – The relation for which this widget will be created
parent (QWidget = None) – The parent widget for the created widget
- Return type
- factories(self) → object¶
Gets access to all registered factories
- Return type
object
- relationWidgetNames(self) → List[str]¶
Returns a list of names of registered relation widgets
- Return type
List[str]
- removeRelationWidget(self, widgetType: str)¶
Removes a registered relation widget with given
widgetType
- Parameters
widgetType (str) –