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
Returns the distance area object used for area/length calculations. formFeature
Returns current feature from the currently edited form or table row formMode
Returns the form mode. mapCanvas
Returns the associated map canvas (e.g. parentContext
relation
Returns the attribute relation. relationMode
Returns the attribute relation mode. setAllowCustomUi
Sets whether the attribute editor should permit use of custom UI forms. setDistanceArea
Sets distance area object, distanceArea
, for area/length calculationssetFormFeature
Set current feature
for the currently edited form or table rowsetFormMode
Sets the form mode. setMapCanvas
Sets the associated map canvas, mapCanvas
, (e.g.setRelation
Set attribute relation and mode setVectorLayerTools
Sets the associated vector layer tools. vectorLayerTools
Returns the associated vector layer tools. 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¶ Returns the distance area object used for area/length calculations.
See also
New in version 2.2.
-
formFeature
(self) → QgsFeature¶ Returns current feature from the currently edited form or table row
See also
New in version 3.2.
-
formMode
(self) → QgsAttributeEditorContext.FormMode¶ Returns the form mode.
See also
-
mapCanvas
(self) → QgsMapCanvas¶ Returns the associated map canvas (e.g. to zoom to related features).
See also
New in version 3.2.
-
parentContext
(self) → QgsAttributeEditorContext¶
-
relation
(self) → QgsRelation¶ Returns the attribute relation.
See also
See also
New in version 2.6.
-
relationMode
(self) → QgsAttributeEditorContext.RelationMode¶ Returns the attribute relation mode.
See also
See also
New in version 2.6.
-
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)¶ Sets distance area object,
distanceArea
, for area/length calculationsSee also
New in version 2.2.
-
setFormFeature
(self, feature: QgsFeature)¶ Set current
feature
for the currently edited form or table rowSee also
New in version 3.2.
-
setFormMode
(self, mode: QgsAttributeEditorContext.FormMode)¶ Sets the form mode.
Parameters: mode – form mode See also
New in version 2.16.
-
setMapCanvas
(self, mapCanvas: QgsMapCanvas)¶ Sets the associated map canvas,
mapCanvas
, (e.g. to zoom to related features).See also
New in version 3.2.
-
setRelation
(self, relation: QgsRelation, mode: QgsAttributeEditorContext.RelationMode)¶ Set attribute relation and mode
Parameters: - relation – relation
- mode – relation mode
See also
See also
New in version 2.6.
-
setVectorLayerTools
(self, vlTools: QgsVectorLayerTools)¶ Sets the associated vector layer tools.
Parameters: vlTools – vector layer tools See also
New in version 2.2.
-
vectorLayerTools
(self) → QgsVectorLayerTools¶ Returns the associated vector layer tools.
See also
New in version 2.2.
-