QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
This class should be subclassed for every configurable editor widget type. More...
#include <qgseditorconfigwidget.h>
Signals | |
void | changed () |
Emitted when the configuration of the widget is changed. | |
Public Member Functions | |
QgsEditorConfigWidget (QgsVectorLayer *vl, int fieldIdx, QWidget *parent) | |
Create a new configuration widget. | |
virtual QVariantMap | config ()=0 |
Create a configuration from the current GUI state. | |
QgsExpressionContext | createExpressionContext () const override |
This method needs to be reimplemented in all classes which implement this interface and return an expression context. | |
int | field () |
Returns the field for which this configuration widget applies. | |
QgsVectorLayer * | layer () |
Returns the layer for which this configuration widget applies. | |
virtual void | setConfig (const QVariantMap &config)=0 |
Update the configuration widget to represent the given configuration. | |
Public Member Functions inherited from QgsExpressionContextGenerator | |
virtual | ~QgsExpressionContextGenerator ()=default |
Protected Member Functions | |
void | initializeDataDefinedButton (QgsPropertyOverrideButton *button, QgsWidgetWrapper::Property key) |
Registers a property override button, setting up its initial value, connections and description. | |
void | updateDataDefinedButton (QgsPropertyOverrideButton *button) |
Updates a specific property override button to reflect the widgets's current properties. | |
void | updateDataDefinedButtons () |
Updates all property override buttons to reflect the widgets's current properties. | |
Protected Attributes | |
QgsPropertyCollection | mPropertyCollection |
Temporary property collection for config widgets. | |
This class should be subclassed for every configurable editor widget type.
It implements the GUI configuration widget and transforms this to/from a configuration.
It will only be instantiated by {
Definition at line 38 of file qgseditorconfigwidget.h.
|
explicit |
Create a new configuration widget.
vl | The layer for which the configuration dialog will be created |
fieldIdx | The index of the field on the layer for which this dialog will be created |
parent | A parent widget |
Definition at line 21 of file qgseditorconfigwidget.cpp.
|
signal |
Emitted when the configuration of the widget is changed.
|
pure virtual |
Create a configuration from the current GUI state.
Implemented in QgsCheckBoxConfigDlg, QgsDateTimeEditConfig, QgsDummyConfigDlg, QgsExternalResourceConfigDlg, QgsJsonEditConfigDlg, QgsListConfigDlg, QgsRangeConfigDlg, QgsRelationReferenceConfigDlg, QgsTextEditConfigDlg, QgsUniqueValuesConfigDlg, QgsValueMapConfigDlg, and QgsValueRelationConfigDlg.
|
overridevirtual |
This method needs to be reimplemented in all classes which implement this interface and return an expression context.
Implements QgsExpressionContextGenerator.
Reimplemented in QgsExternalResourceConfigDlg.
Definition at line 39 of file qgseditorconfigwidget.cpp.
int QgsEditorConfigWidget::field | ( | ) |
Returns the field for which this configuration widget applies.
Definition at line 29 of file qgseditorconfigwidget.cpp.
|
protected |
Registers a property override button, setting up its initial value, connections and description.
button | button to register |
key | corresponding data defined property key |
Definition at line 44 of file qgseditorconfigwidget.cpp.
QgsVectorLayer * QgsEditorConfigWidget::layer | ( | ) |
Returns the layer for which this configuration widget applies.
Definition at line 34 of file qgseditorconfigwidget.cpp.
|
pure virtual |
Update the configuration widget to represent the given configuration.
config | The configuration which should be represented by this widget |
Implemented in QgsCheckBoxConfigDlg, QgsDateTimeEditConfig, QgsDummyConfigDlg, QgsExternalResourceConfigDlg, QgsJsonEditConfigDlg, QgsListConfigDlg, QgsRangeConfigDlg, QgsRelationReferenceConfigDlg, QgsTextEditConfigDlg, QgsUniqueValuesConfigDlg, QgsValueMapConfigDlg, and QgsValueRelationConfigDlg.
|
protected |
Updates a specific property override button to reflect the widgets's current properties.
Definition at line 62 of file qgseditorconfigwidget.cpp.
|
protected |
Updates all property override buttons to reflect the widgets's current properties.
Definition at line 53 of file qgseditorconfigwidget.cpp.
|
protected |
Temporary property collection for config widgets.
Definition at line 109 of file qgseditorconfigwidget.h.