16#ifndef QGSPROCESSINGAGGREGATEWIDGETWRAPPER_H
17#define QGSPROCESSINGAGGREGATEWIDGETWRAPPER_H
21#include "ui_qgsprocessingaggregatemappingpanelbase.h"
31class GUI_EXPORT QgsProcessingAggregatePanelWidget :
public QgsPanelWidget,
private Ui::QgsProcessingAggregateMapPanelBase
36 QgsProcessingAggregatePanelWidget( QWidget *parent =
nullptr );
40 QVariant value()
const;
41 void setValue(
const QVariant &value );
54 void loadFieldsFromLayer();
56 void loadLayerFields();
62 bool mBlockChangedSignal =
false;
64 bool mSkipConfirmDialog =
false;
65 friend class TestProcessingGui;
73 QgsProcessingAggregateParameterDefinitionWidget( QgsProcessingContext &context,
const QgsProcessingParameterWidgetContext &widgetContext,
const QgsProcessingParameterDefinition *definition =
nullptr,
const QgsProcessingAlgorithm *
algorithm =
nullptr, QWidget *parent
SIP_TRANSFERTHIS =
nullptr );
74 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description,
Qgis::ProcessingParameterFlags flags )
const override;
77 QComboBox *mParentLayerComboBox =
nullptr;
89 QString parameterType()
const override;
90 QgsAbstractProcessingParameterWidgetWrapper *createWidgetWrapper(
const QgsProcessingParameterDefinition *parameter,
Qgis::ProcessingMode type )
override SIP_FACTORY;
94 QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
95 QgsProcessingContext &context,
96 const QgsProcessingParameterWidgetContext &widgetContext,
97 const QgsProcessingParameterDefinition *definition =
nullptr,
98 const QgsProcessingAlgorithm *
algorithm =
nullptr
101 void postInitialize( const QList<QgsAbstractProcessingParameterWidgetWrapper *> &wrappers ) override;
102 int stretch() const override;
105 void setParentLayerWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
108 void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
109 QVariant widgetValue() const override;
111 QString modelerExpressionFormatString() const override;
112 const QgsVectorLayer *linkedVectorLayer() const override;
115 QgsProcessingAggregatePanelWidget *mPanel =
nullptr;
116 std::unique_ptr<QgsVectorLayer> mParentLayer;
118 friend class TestProcessingGui;
ProcessingMode
Types of modes which Processing widgets can be created for.
@ Standard
Standard (single-run) algorithm mode.
QFlags< ProcessingParameterFlag > ProcessingParameterFlags
Flags which dictate the behavior of Processing parameters.
Holds mapping information for defining sets of aggregates of fields from a QgsFields object.
Abstract interface for generating an expression context.
Represents a vector layer which manages a vector based dataset.
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