QGIS API Documentation  3.21.0-Master (5b68dc587e)
Public Member Functions | List of all members
QgsProcessingAlgorithmConfigurationWidget Class Referenceabstract

A configuration widget for processing algorithms allows providing additional configuration options directly on algorithm level, in addition to parameters. More...

#include <qgsprocessingalgorithmconfigurationwidget.h>

Inheritance diagram for QgsProcessingAlgorithmConfigurationWidget:
Inheritance graph
[legend]

Public Member Functions

 QgsProcessingAlgorithmConfigurationWidget (QWidget *parent=nullptr)
 Creates a new QgsProcessingAlgorithmConfigurationWidget. More...
 
 ~QgsProcessingAlgorithmConfigurationWidget () override=default
 
const QgsProcessingAlgorithmalgorithm () const
 Returns the algorithm instance associated with this widget. More...
 
virtual QVariantMap configuration () const =0
 Read the current configuration from this widget. More...
 
QgsExpressionContext createExpressionContext () const override
 This method needs to be reimplemented in all classes which implement this interface and return an expression context. More...
 
void registerProcessingContextGenerator (QgsProcessingContextGenerator *generator)
 Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required. More...
 
void setAlgorithm (const QgsProcessingAlgorithm *algorithm)
 Sets the algorithm instance associated with the widget. More...
 
virtual void setConfiguration (const QVariantMap &configuration)=0
 Set the configuration which this widget should represent. More...
 
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. More...
 
const QgsProcessingParameterWidgetContextwidgetContext () 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. More...
 
- Public Member Functions inherited from QgsExpressionContextGenerator
virtual ~QgsExpressionContextGenerator ()=default
 

Detailed Description

A configuration widget for processing algorithms allows providing additional configuration options directly on algorithm level, in addition to parameters.

Since
QGIS 3.2

Definition at line 40 of file qgsprocessingalgorithmconfigurationwidget.h.

Constructor & Destructor Documentation

◆ QgsProcessingAlgorithmConfigurationWidget()

QgsProcessingAlgorithmConfigurationWidget::QgsProcessingAlgorithmConfigurationWidget ( QWidget *  parent = nullptr)

◆ ~QgsProcessingAlgorithmConfigurationWidget()

QgsProcessingAlgorithmConfigurationWidget::~QgsProcessingAlgorithmConfigurationWidget ( )
overridedefault

Member Function Documentation

◆ algorithm()

const QgsProcessingAlgorithm* QgsProcessingAlgorithmConfigurationWidget::algorithm ( ) const
inline

Returns the algorithm instance associated with this widget.

See also
setAlgorithm()
Since
QGIS 3.6

Definition at line 98 of file qgsprocessingalgorithmconfigurationwidget.h.

◆ configuration()

virtual QVariantMap QgsProcessingAlgorithmConfigurationWidget::configuration ( ) const
pure virtual

Read the current configuration from this widget.

◆ createExpressionContext()

QgsExpressionContext QgsProcessingAlgorithmConfigurationWidget::createExpressionContext ( ) const
overridevirtual

This method needs to be reimplemented in all classes which implement this interface and return an expression context.

Since
QGIS 3.0

Implements QgsExpressionContextGenerator.

Definition at line 45 of file qgsprocessingalgorithmconfigurationwidget.cpp.

◆ registerProcessingContextGenerator()

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.

Since
QGIS 3.6

Definition at line 40 of file qgsprocessingalgorithmconfigurationwidget.cpp.

◆ setAlgorithm()

void QgsProcessingAlgorithmConfigurationWidget::setAlgorithm ( const QgsProcessingAlgorithm algorithm)

Sets the algorithm instance associated with the widget.

See also
algorithm()
Since
QGIS 3.6

Definition at line 35 of file qgsprocessingalgorithmconfigurationwidget.cpp.

◆ setConfiguration()

virtual void QgsProcessingAlgorithmConfigurationWidget::setConfiguration ( const QVariantMap &  configuration)
pure virtual

Set the configuration which this widget should represent.

◆ setWidgetContext()

void QgsProcessingAlgorithmConfigurationWidget::setWidgetContext ( const QgsProcessingParameterWidgetContext context)
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.

See also
widgetContext()
Since
QGIS 3.6

Definition at line 25 of file qgsprocessingalgorithmconfigurationwidget.cpp.

◆ widgetContext()

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.

See also
setWidgetContext()
Since
QGIS 3.6

Definition at line 30 of file qgsprocessingalgorithmconfigurationwidget.cpp.


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