QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
|
Abstract interface for generating an expression context. More...
#include <qgsexpressioncontextgenerator.h>
Public Member Functions | |
virtual | ~QgsExpressionContextGenerator ()=default |
virtual QgsExpressionContext | createExpressionContext () const =0 |
This method needs to be reimplemented in all classes which implement this interface and return an expression context. | |
Abstract interface for generating an expression context.
You need to implement this interface in a class and register this class with QgsFieldExpressionWidget::registerExpressionGenerator().
This is used for example in QgsPropertyOverrideButton or QgsFieldExpressionWidget classes which will ask for a new QgsExpressionContext every time the expression editor is opened. This way they are able to provide an up-to-date expression editor even when the environment changes.
Definition at line 35 of file qgsexpressioncontextgenerator.h.
|
virtualdefault |
|
pure virtual |
This method needs to be reimplemented in all classes which implement this interface and return an expression context.
Implemented in QgsVectorLayer, QgsLayout, QgsLayoutAtlas, QgsLayoutFrame, QgsLayoutItem, QgsLayoutItemAttributeTable, QgsLayoutItemLegend, QgsLayoutItemMap, QgsLayoutItemMapGrid, QgsLayoutItemMapItem, QgsLayoutMultiFrame, QgsLayoutObject, QgsPrintLayout, QgsProject, QgsCalloutWidget, QgsEditorConfigWidget, QgsExternalResourceConfigDlg, QgsLabelSettingsWidgetBase, QgsLayoutAttributeTableWidget, QgsLayoutElevationProfileWidget, QgsLayoutLabelWidget, QgsLayoutManualTableWidget, QgsLayoutScaleBarWidget, QgsProcessingAlgorithmConfigurationWidget, QgsProcessingModelerParameterWidget, QgsProcessingAbstractParameterDefinitionWidget, QgsAbstractProcessingParameterWidgetWrapper, QgsMapCanvas, QgsTextFormatWidget, QgsVectorLayerTemporalPropertiesWidget, QgsRasterLayerProperties, QgsRasterTransparencyWidget, QgsEmbeddedSymbolRendererWidget, QgsLayerPropertiesWidget, QgsPointClusterRendererWidget, QgsPointDisplacementRendererWidget, QgsSymbolLayerWidget, QgsTableEditorFormattingWidget, QgsAttributeActionPropertiesDialog, QgsAttributesFormProperties, and QgsAttributesDnDTree.