16#ifndef QGSPROCESSINGPARAMETERSWIDGET_H
17#define QGSPROCESSINGPARAMETERSWIDGET_H
19#include "ui_qgsprocessingparameterswidgetbase.h"
48 QgsProcessingParametersWidget(
const QgsProcessingAlgorithm *
algorithm,
bool inPlace, QgsMapLayer *activeLayer, QgsMessageBar *messageBar, QWidget *parent
SIP_TRANSFERTHIS =
nullptr );
49 ~QgsProcessingParametersWidget()
override;
56 const QgsProcessingAlgorithm *
algorithm()
const;
66 void registerProcessingContextGenerator( QgsProcessingContextGenerator *generator );
73 QList< QgsProcessingParametersGenerator::ParameterValidationResult > validate()
const;
92 void setParameters(
const QVariantMap ¶meters );
99 QgsAbstractProcessingParameterWidgetWrapper *wrapper(
const QString &name )
const;
106 QList< QgsAbstractProcessingParameterWidgetWrapper * > wrappers()
const;
109 void addParameterWidget(
const QgsProcessingParameterDefinition *parameter, QWidget *widget
SIP_TRANSFER,
int stretch = 0 );
110 void addParameterLabel(
const QgsProcessingParameterDefinition *parameter, QWidget *label
SIP_TRANSFER );
113 void addOutputWidget( QWidget *widget
SIP_TRANSFER,
int stretch = 0 );
119 void parameterChanged();
122 QgsProcessingContextGenerator *mContextGenerator =
nullptr;
124 const QgsProcessingAlgorithm *mAlgorithm =
nullptr;
125 bool mInPlace =
false;
126 QPointer< QgsMapLayer > mActiveLayer;
127 QgsMessageBar *mMessageBar =
nullptr;
129 QVariantMap mExtraParameters;
131 QMap< QString, QgsAbstractProcessingParameterWidgetWrapper * > mWrappers;
133 friend class TestProcessingGui;
Abstract base class for processing algorithms.
An interface for objects which can create Processing contexts.
virtual QgsProcessingContext * processingContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return a Proc...
Base class for the definition of processing parameters.
An interface for objects which can create sets of parameter values for processing algorithms.
virtual QVariantMap createProcessingParameters(QgsProcessingParametersGenerator::Flags flags=QgsProcessingParametersGenerator::Flags())=0
This method needs to be reimplemented in all classes which implement this interface and return a algo...
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call