Class: QgsEditorWidgetAutoConfPlugin¶
Base class for plugins allowing to pick automatically a widget type for editing fields.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: editorWidgetSetup()
Abstract Methods
Typical scores are: |
- class qgis.gui.QgsEditorWidgetAutoConfPlugin[source]¶
Bases:
object
- abstract editorWidgetSetup(self, vl: QgsVectorLayer | None, fieldName: str | None)[source]¶
Typical scores are:
0: no matching type found.
10: a widget has been guessed from the type of field.
20: a widget has been determined from an external configuration (for example a database table)
- Parameters:
vl (Optional[QgsVectorLayer]) – The vector layer for which this widget will be created
fieldName (Optional[str]) -> (QgsEditorWidgetSetup) – The field name on the specified layer for which this widget will be created
- Returns:
and integer value rating how good is the setup provided by this plugin.
score: Where the score is returned (default to 0)