19#ifndef QGSPROCESSINGMODELCHILDALGORITHMNWIDGETS_H
20#define QGSPROCESSINGMODELCHILDALGORITHMNWIDGETS_H
34class QgsProcessingModelAlgorithm;
36class QgsProcessingModelChildAlgorithm;
37class QgsProcessingModelOutput;
42class QgsModelChildDependenciesWidget;
48class QDialogButtonBox;
69 QgsProcessingModelAlgorithm *model,
71 const QString &childId = QString(),
72 const QVariantMap &configuration = QVariantMap(),
73 QWidget *parent =
nullptr,
74 QWidget *dialog =
nullptr
105 void emitChangedSignal();
107 std::unique_ptr< QgsProcessingAlgorithm > mAlgorithm;
108 QgsProcessingModelAlgorithm *mModel =
nullptr;
110 QVariantMap mConfiguration;
112 QWidget *mDialog =
nullptr;
114 QMap< QString, QgsProcessingModelOutput > mPreviousOutputDefinitions;
115 int mBlockChangesSignal = 0;
117 QLineEdit *mDescriptionBox =
nullptr;
120 QMap< QString, QgsProcessingModelerParameterWidget * > mWrappers;
121 QgsModelChildDependenciesWidget *mDependenciesPanel =
nullptr;
144 QgsProcessingModelAlgorithm *model,
146 const QString &childId = QString(),
147 const QVariantMap &configuration = QVariantMap(),
148 QWidget *parent =
nullptr,
149 QWidget *dialog =
nullptr
212 QTabWidget *mTabWidget =
nullptr;
215 QTextEdit *mCommentEdit =
nullptr;
237 QgsProcessingModelAlgorithm *model,
239 const QString &childId = QString(),
240 const QVariantMap &configuration = QVariantMap(),
241 QWidget *parent =
nullptr
307 QDialogButtonBox *mButtonBox =
nullptr;
A bar for displaying non-blocking messages to the user.
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...
Contains information about the context in which a processing algorithm is executed.
~QgsProcessingModelerParametersDialog() override
void setCommentColor(const QColor &color)
Sets the algorithm's comment color.
QgsProcessingModelerParametersDialog(const QgsProcessingAlgorithm *childAlgorithm, QgsProcessingModelAlgorithm *model, QgsProcessingContext &context, const QString &childId=QString(), const QVariantMap &configuration=QVariantMap(), QWidget *parent=nullptr)
Constructor for QgsProcessingModelerParametersDialog.
QString comments() const
Returns the algorithm's comments.
std::unique_ptr< QgsProcessingModelChildAlgorithm > createAlgorithm()
Creates the child algorithm instance, populated with the current dialog parameter values and comments...
void setStateFromChildAlgorithm()
Sets widget state from the existing child algorithm definition in the model.
void setWidgetContext(const QgsProcessingParameterWidgetContext &context)
Sets the context in which the dialog is shown, e.g., the parent model algorithm, a linked map canvas,...
void setComments(const QString &comments)
Sets the algorithm's comments.
void switchToCommentTab()
Focuses the dialog on the comment editing tab.
QColor commentColor() const
Returns the algorithm's comment color.
Contains settings which reflect the context in which a Processing parameter widget is shown.
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