QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsprocessingguiregistry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprocessingguiregistry.h
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 
18 #ifndef QGSPROCESSINGGUIREGISTRY_H
19 #define QGSPROCESSINGGUIREGISTRY_H
20 
21 #include "qgis_gui.h"
22 #include "qgis_sip.h"
23 #include "qgsprocessinggui.h"
25 #include <QList>
26 #include <QMap>
27 
33 
44 class GUI_EXPORT QgsProcessingGuiRegistry
45 {
46  public:
47 
54 
61  void addAlgorithmConfigurationWidgetFactory( QgsProcessingAlgorithmConfigurationWidgetFactory *factory SIP_TRANSFER );
62 
69  void removeAlgorithmConfigurationWidgetFactory( QgsProcessingAlgorithmConfigurationWidgetFactory *factory );
70 
78  QgsProcessingAlgorithmConfigurationWidget *algorithmConfigurationWidget( const QgsProcessingAlgorithm *algorithm ) const;
79 
96  bool addParameterWidgetFactory( QgsProcessingParameterWidgetFactoryInterface *factory SIP_TRANSFER );
97 
105  void removeParameterWidgetFactory( QgsProcessingParameterWidgetFactoryInterface *factory );
106 
120 
138  QgsProcessingModelerParameterWidget *createModelerParameterWidget( QgsProcessingModelAlgorithm *model,
139  const QString &childId,
141 
163  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget( const QString &type,
164  QgsProcessingContext &context,
165  const QgsProcessingParameterWidgetContext &widgetContext,
166  const QgsProcessingParameterDefinition *definition = nullptr,
167  const QgsProcessingAlgorithm *algorithm = nullptr ) SIP_FACTORY;
168 
169  private:
170 
171  QList <QgsProcessingAlgorithmConfigurationWidgetFactory *> mAlgorithmConfigurationWidgetFactories;
172  QMap< QString, QgsProcessingParameterWidgetFactoryInterface *> mParameterWidgetFactories;
173 };
174 
175 #endif // QGSPROCESSINGGUIREGISTRY_H
QgsProcessingParameterWidgetContext
Contains settings which reflect the context in which a Processing parameter widget is shown,...
Definition: qgsprocessingwidgetwrapper.h:100
algorithm
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
QgsProcessingParameterDefinition
Base class for the definition of processing parameters.
Definition: qgsprocessingparameters.h:331
QgsAbstractProcessingParameterWidgetWrapper
A widget wrapper for Processing parameter value widgets.
Definition: qgsprocessingwidgetwrapper.h:267
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsProcessingAlgorithmConfigurationWidgetFactory
Interface base class for factories for algorithm configuration widgets.
Definition: qgsprocessingalgorithmconfigurationwidget.h:125
QgsProcessingContext
Contains information about the context in which a processing algorithm is executed.
Definition: qgsprocessingcontext.h:44
qgsprocessinggui.h
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
qgsprocessingwidgetwrapper.h
QgsProcessingModelerParameterWidget
A widget for customising the value of Processing algorithm parameter inside a Processing model.
Definition: qgsprocessingmodelerparameterwidget.h:62
QgsProcessingAbstractParameterDefinitionWidget
Abstract base class for widgets which allow users to specify the properties of a Processing parameter...
Definition: qgsprocessingparameterdefinitionwidget.h:44
QgsProcessingGui::WidgetType
WidgetType
Types of dialogs which Processing widgets can be created for.
Definition: qgsprocessinggui.h:39
QgsProcessingParameterWidgetFactoryInterface
An interface for Processing widget wrapper factories.
Definition: qgsprocessingwidgetwrapper.h:515
QgsProcessingAlgorithm
Abstract base class for processing algorithms.
Definition: qgsprocessingalgorithm.h:52
QgsProcessingGuiRegistry
The QgsProcessingGuiRegistry is a home for widgets for processing configuration widgets.
Definition: qgsprocessingguiregistry.h:45
QgsProcessingAlgorithmConfigurationWidget
A configuration widget for processing algorithms allows providing additional configuration options di...
Definition: qgsprocessingalgorithmconfigurationwidget.h:41