QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsEditorWidgetAutoConfPlugin Class Referenceabstract

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

#include <qgseditorwidgetautoconf.h>

Inheritance diagram for QgsEditorWidgetAutoConfPlugin:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsEditorWidgetAutoConfPlugin ()=default
 
virtual QgsEditorWidgetSetup editorWidgetSetup (const QgsVectorLayer *vl, const QString &fieldName, int &score) const =0
 Typical scores are:
 

Detailed Description

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

Definition at line 31 of file qgseditorwidgetautoconf.h.

Constructor & Destructor Documentation

◆ ~QgsEditorWidgetAutoConfPlugin()

virtual QgsEditorWidgetAutoConfPlugin::~QgsEditorWidgetAutoConfPlugin ( )
virtualdefault

Member Function Documentation

◆ editorWidgetSetup()

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

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

Implemented in FromFactoriesPlugin, and FromDbTablePlugin.


The documentation for this class was generated from the following file: