QgsEditorWidgetAutoConfPlugin class

Base class for plugins allowing to pick automatically a widget type for editing fields.

Contents

Derived classes

class FromDbTablePlugin
Widget auto conf plugin that reads the widget setup to use from what the data provider says.
class FromFactoriesPlugin
Widget auto conf plugin that guesses what widget type to use in function of what the widgets support.

Public functions

auto editorWidgetSetup(const QgsVectorLayer* vl, const QString& fieldName, int& score) const -> QgsEditorWidgetSetup pure virtual
Typical scores are:

Function documentation

QgsEditorWidgetSetup QgsEditorWidgetAutoConfPlugin::editorWidgetSetup(const QgsVectorLayer* vl, const QString& fieldName, int& score) const pure virtual

Typical scores are:

Parameters
vl The vector layer for which this widget will be created
fieldName The field name on the specified layer for which this widget will be created
score Where the score is returned (default to 0)
Returns and integer value rating how good is the setup provided by this plugin.
  • 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)