Class: QgsAttributeEditorRelation¶
-
class
qgis.core.
QgsAttributeEditorRelation
(name: str, relationId: str, parent: QgsAttributeEditorElement)¶ Bases:
qgis._core.QgsAttributeEditorElement
Deprecated since version since: QGIS 3.0.2. The name parameter is not used for anything and overwritten by the relationId internally.
QgsAttributeEditorRelation(name: str, relation: QgsRelation, parent: QgsAttributeEditorElement)
Deprecated since version since: QGIS 3.0.2. The name parameter is not used for anything and overwritten by the relationId internally.
QgsAttributeEditorRelation(relationId: str, parent: QgsAttributeEditorElement) Creates a new element which embeds a relation.
- Parameters
relationId – The id of the relation to embed
parent – The parent (used as container)
QgsAttributeEditorRelation(relation: QgsRelation, parent: QgsAttributeEditorElement) Creates a new element which embeds a relation.
- Parameters
relation – The relation to embed
parent – The parent (used as container)
QgsAttributeEditorRelation(QgsAttributeEditorRelation)
This element will load a relation editor onto the form.
Enums
Methods
Initializes the relation from the id
Gets the id of the relation which shall be embedded
Determines if the “link feature” button should be shown
Determines if the “unlink feature” button should be shown
Determines if the “link feature” button should be shown
Determines if the “unlink feature” button should be shown
Signals
Attributes
-
clone
(self, parent: QgsAttributeEditorElement) → QgsAttributeEditorElement¶
-
init
(self, relManager: QgsRelationManager) → bool¶ Initializes the relation from the id
- Parameters
relManager – The relation manager to use for the initialization
- Returns
True
if the relation was found in the relationmanager
-
relation
(self) → QgsRelation¶ Gets the id of the relation which shall be embedded
- Returns
the id
-
setShowLinkButton
(self, showLinkButton: bool)¶ Determines if the “link feature” button should be shown
New in version 2.18.
-
setShowUnlinkButton
(self, showUnlinkButton: bool)¶ Determines if the “unlink feature” button should be shown
New in version 2.18.
-
showLinkButton
(self) → bool¶ Determines if the “link feature” button should be shown
New in version 2.18.
-
showUnlinkButton
(self) → bool¶ Determines if the “unlink feature” button should be shown
New in version 2.18.