QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
A configuration widget for processing algorithms allows providing additional configuration options directly on algorithm level, in addition to parameters. More...
#include <qgsprocessingalgorithmconfigurationwidget.h>
Public Member Functions | |
QgsProcessingAlgorithmConfigurationWidget (QWidget *parent=nullptr) | |
Creates a new QgsProcessingAlgorithmConfigurationWidget. | |
~QgsProcessingAlgorithmConfigurationWidget () override=default | |
const QgsProcessingAlgorithm * | algorithm () const |
Returns the algorithm instance associated with this widget. | |
virtual QVariantMap | configuration () const =0 |
Read the current configuration from this widget. | |
QgsExpressionContext | createExpressionContext () const override |
This method needs to be reimplemented in all classes which implement this interface and return an expression context. | |
void | registerProcessingContextGenerator (QgsProcessingContextGenerator *generator) |
Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required. | |
void | setAlgorithm (const QgsProcessingAlgorithm *algorithm) |
Sets the algorithm instance associated with the widget. | |
virtual void | setConfiguration (const QVariantMap &configuration)=0 |
Set the configuration which this widget should represent. | |
virtual void | setWidgetContext (const QgsProcessingParameterWidgetContext &context) |
Sets the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior. | |
const QgsProcessingParameterWidgetContext & | widgetContext () const |
Returns the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior. | |
Public Member Functions inherited from QgsExpressionContextGenerator | |
virtual | ~QgsExpressionContextGenerator ()=default |
A configuration widget for processing algorithms allows providing additional configuration options directly on algorithm level, in addition to parameters.
Definition at line 40 of file qgsprocessingalgorithmconfigurationwidget.h.
QgsProcessingAlgorithmConfigurationWidget::QgsProcessingAlgorithmConfigurationWidget | ( | QWidget * | parent = nullptr | ) |
Creates a new QgsProcessingAlgorithmConfigurationWidget.
Definition at line 21 of file qgsprocessingalgorithmconfigurationwidget.cpp.
|
overridedefault |
|
inline |
Returns the algorithm instance associated with this widget.
Definition at line 98 of file qgsprocessingalgorithmconfigurationwidget.h.
|
pure virtual |
Read the current configuration from this widget.
|
overridevirtual |
This method needs to be reimplemented in all classes which implement this interface and return an expression context.
Implements QgsExpressionContextGenerator.
Definition at line 46 of file qgsprocessingalgorithmconfigurationwidget.cpp.
void QgsProcessingAlgorithmConfigurationWidget::registerProcessingContextGenerator | ( | QgsProcessingContextGenerator * | generator | ) |
Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required.
Definition at line 41 of file qgsprocessingalgorithmconfigurationwidget.cpp.
void QgsProcessingAlgorithmConfigurationWidget::setAlgorithm | ( | const QgsProcessingAlgorithm * | algorithm | ) |
Sets the algorithm instance associated with the widget.
Definition at line 36 of file qgsprocessingalgorithmconfigurationwidget.cpp.
|
pure virtual |
Set the configuration which this widget should represent.
|
virtual |
Sets the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior.
Subclasses should take care to call the base class method when reimplementing this method.
Definition at line 26 of file qgsprocessingalgorithmconfigurationwidget.cpp.
const QgsProcessingParameterWidgetContext & QgsProcessingAlgorithmConfigurationWidget::widgetContext | ( | ) | const |
Returns the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior.
Definition at line 31 of file qgsprocessingalgorithmconfigurationwidget.cpp.