QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsExpressionContextGenerator Class Referenceabstract

Abstract interface for generating an expression context. More...

#include <qgsexpressioncontextgenerator.h>

Inheritance diagram for QgsExpressionContextGenerator:
Inheritance graph
[legend]

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~QgsExpressionContextGenerator()

virtual QgsExpressionContextGenerator::~QgsExpressionContextGenerator ( )
virtualdefault

Member Function Documentation

◆ createExpressionContext()

virtual QgsExpressionContext QgsExpressionContextGenerator::createExpressionContext ( ) const
pure virtual

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