QGIS API Documentation  3.8.0-Zanzibar (11aff65)
qgsprocessingalgorithmconfigurationwidget.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprocessingalgorithmconfig.cpp
3  --------------------------
4  begin : April 2018
5  copyright : (C) 2018 by Matthias Kuhn
6  email : [email protected]
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
19 
21  : QWidget( parent )
22 {
23 }
24 
26 {
27  mWidgetContext = context;
28 }
29 
31 {
32  return mWidgetContext;
33 }
34 
36 {
37  mAlgorithm = algorithm;
38 }
39 
41 {
42  mContextGenerator = generator;
43 }
44 
46 {
47  return QgsProcessingGuiUtils::createExpressionContext( mContextGenerator, mWidgetContext, mAlgorithm, nullptr );
48 }
QgsExpressionContext createExpressionContext() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Abstract base class for processing algorithms.
void registerProcessingContextGenerator(QgsProcessingContextGenerator *generator)
Registers a Processing context generator class that will be used to retrieve a Processing context for...
An interface for objects which can create Processing contexts.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsProcessingAlgorithmConfigurationWidget(QWidget *parent=nullptr)
Creates a new QgsProcessingAlgorithmConfigurationWidget.
const QgsProcessingAlgorithm * algorithm() const
Returns the algorithm instance associated with this widget.
virtual void setWidgetContext(const QgsProcessingParameterWidgetContext &context)
Sets the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm...
void setAlgorithm(const QgsProcessingAlgorithm *algorithm)
Sets the algorithm instance associated with the widget.
Contains settings which reflect the context in which a Processing parameter widget is shown...
const QgsProcessingParameterWidgetContext & widgetContext() const
Returns the context in which the Processing algorithm widget is shown, e.g., the parent model algorit...