QgsExpressionContextGenerator and QgsProcessingContextGenerator

Issue #984 closed
Benjamin Jakimow created an issue

QgsExpressionContext and QgsProcessingContext are widely used by many widgets and routines in the QGIS API.

The EnMAP-Box could use these, e.g. to provide a context + scope variables that consider the current state of the EnMAP-Box GUI, for example the current map canvas, current layer and other variables.

I recommend that the EnMAP-Box implements the QgsExpressionContextGenerator and QgsProcessingContextGenerator interfaces to provide these context objects.

Comments (1)

  1. Benjamin Jakimow reporter

    Impemented

    EnMAPBox().createExpressionContext()
    EnMAPBox().processingContext()
    

    unit test added to tests/src/test_enmapbox.py::test_context_interfaces(self)

  2. Log in to comment