17#include "moc_qgsprocessingparameterswidget.cpp"
27 Q_ASSERT( mAlgorithm );
32 scrollAreaWidgetContents->setContentsMargins( 4, 4, 4, 4 );
40void QgsProcessingParametersWidget::initWidgets()
57 mAdvancedGroupLayout->addWidget( widget, stretch );
59 mScrollAreaLayout->insertWidget( mScrollAreaLayout->count() - 2, widget, stretch );
65 mAdvancedGroupLayout->addWidget( label );
67 mScrollAreaLayout->insertWidget( mScrollAreaLayout->count() - 2, label );
70void QgsProcessingParametersWidget::addOutputLabel( QWidget *label )
72 mScrollAreaLayout->insertWidget( mScrollAreaLayout->count() - 1, label );
75void QgsProcessingParametersWidget::addOutputWidget( QWidget *widget,
int stretch )
77 mScrollAreaLayout->insertWidget( mScrollAreaLayout->count() - 1, widget, stretch );
80void QgsProcessingParametersWidget::addExtraWidget( QWidget *widget )
82 mScrollAreaLayout->addWidget( widget );
@ Advanced
Parameter is an advanced parameter which should be hidden from users by default.
Abstract base class for processing algorithms.
QgsProcessingParameterDefinitions parameterDefinitions() const
Returns an ordered list of parameter definitions utilized by the algorithm.
Base class for the definition of processing parameters.
Qgis::ProcessingParameterFlags flags() const
Returns any flags associated with the parameter.
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
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.