Subgroup: Attribute
Class: QgsAttributeEditorContext¶
-
class
qgis.gui.
QgsAttributeEditorContext
¶ Bases:
sip.wrapper
Constructor for QgsAttributeEditorContext
QgsAttributeEditorContext(parentContext: QgsAttributeEditorContext, formMode: QgsAttributeEditorContext.FormMode)
QgsAttributeEditorContext(parentContext: QgsAttributeEditorContext, relation: QgsRelation, relationMode: QgsAttributeEditorContext.RelationMode, widgetMode: QgsAttributeEditorContext.FormMode)
QgsAttributeEditorContext(QgsAttributeEditorContext)
This class contains context information for attribute editor widgets. It will be passed to embedded widgets whenever this occurs (e.g. when showing an embedded form due to relations)
Methods
allowCustomUi
Returns true if the attribute editor should permit use of custom UI forms. distanceArea
formMode
Returns the form mode. parentContext
relation
relationMode
setAllowCustomUi
Sets whether the attribute editor should permit use of custom UI forms. setDistanceArea
setFormMode
Sets the form mode. setRelation
setVectorLayerTools
vectorLayerTools
Signals
Attributes
Embed
Multiple
Popup
Single
StandaloneDialog
Undefined
-
Embed
= 0¶
-
class
FormMode
¶ Bases:
int
-
Multiple
= 1¶
-
Popup
= 2¶
-
class
RelationMode
¶ Bases:
int
-
Single
= 2¶
-
StandaloneDialog
= 1¶
-
Undefined
= 0¶
-
allowCustomUi
(self) → bool¶ Returns true if the attribute editor should permit use of custom UI forms.
See also
New in version 2.16.
-
distanceArea
(self) → QgsDistanceArea¶
-
formMode
(self) → QgsAttributeEditorContext.FormMode¶ Returns the form mode.
See also
-
parentContext
(self) → QgsAttributeEditorContext¶
-
relation
(self) → QgsRelation¶
-
relationMode
(self) → QgsAttributeEditorContext.RelationMode¶
-
setAllowCustomUi
(self, allow: bool)¶ Sets whether the attribute editor should permit use of custom UI forms.
Parameters: allow – set to true to allow custom UI forms, or false to disable them and use default generated QGIS forms
See also
New in version 2.16.
-
setDistanceArea
(self, distanceArea: QgsDistanceArea)¶
-
setFormMode
(self, mode: QgsAttributeEditorContext.FormMode)¶ Sets the form mode.
Parameters: mode – form mode See also
New in version 2.16.
-
setRelation
(self, relation: QgsRelation, mode: QgsAttributeEditorContext.RelationMode)¶
-
setVectorLayerTools
(self, vlTools: QgsVectorLayerTools)¶
-
vectorLayerTools
(self) → QgsVectorLayerTools¶
-