19 #ifndef QGSPROCESSINGWIDGETWRAPPERIMPL_H 20 #define QGSPROCESSINGWIDGETWRAPPERIMPL_H 27 #include <QAbstractButton> 39 class QgsProcessingMatrixParameterPanel;
67 QCheckBox *mDefaultCheckBox =
nullptr;
91 QLabel *createLabel() override SIP_FACTORY;
96 QVariant widgetValue() const override;
98 QStringList compatibleParameterTypes() const override;
100 QStringList compatibleOutputTypes() const override;
102 QList<
int > compatibleDataTypes() const override;
106 QCheckBox *mCheckBox =
nullptr;
107 QComboBox *mComboBox =
nullptr;
109 friend class TestProcessingGui;
131 QVariant widgetValue() const override;
133 QStringList compatibleParameterTypes() const override;
134 QStringList compatibleOutputTypes() const override;
135 QList<
int > compatibleDataTypes() const override;
136 QString modelerExpressionFormatString() const override;
141 QCheckBox *mUseProjectCrsCheckBox =
nullptr;
143 friend class TestProcessingGui;
157 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
161 QLineEdit *mDefaultLineEdit =
nullptr;
162 QCheckBox *mMultiLineCheckBox =
nullptr;
166 class GUI_EXPORT QgsProcessingStringWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
190 QVariant widgetValue() const override;
192 QStringList compatibleParameterTypes() const override;
194 QStringList compatibleOutputTypes() const override;
196 QList<
int > compatibleDataTypes() const override;
200 QLineEdit *mLineEdit =
nullptr;
201 QPlainTextEdit *mPlainTextEdit =
nullptr;
203 friend class TestProcessingGui;
207 class GUI_EXPORT QgsProcessingAuthConfigWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
226 QVariant widgetValue() const override;
228 QStringList compatibleParameterTypes() const override;
230 QStringList compatibleOutputTypes() const override;
232 QList<
int > compatibleDataTypes() const override;
236 QgsAuthConfigSelect *mAuthConfigSelect =
nullptr;
238 friend class TestProcessingGui;
242 class GUI_EXPORT QgsProcessingNumericWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
261 QVariant widgetValue() const override;
263 QStringList compatibleParameterTypes() const override;
265 QStringList compatibleOutputTypes() const override;
267 QList<
int > compatibleDataTypes() const override;
276 static
double calculateStep(
double minimum,
double maximum );
278 bool mAllowingNull = false;
280 friend class TestProcessingGui;
284 class GUI_EXPORT QgsProcessingDistanceWidgetWrapper : public QgsProcessingNumericWidgetWrapper
299 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
302 void setUnitParameterValue( const QVariant &value );
307 QVariant widgetValue() const override;
312 QLabel *mLabel =
nullptr;
313 QWidget *mWarningLabel =
nullptr;
314 QComboBox *mUnitsCombo =
nullptr;
316 friend class TestProcessingGui;
320 class GUI_EXPORT QgsProcessingScaleWidgetWrapper : public QgsProcessingNumericWidgetWrapper
338 QVariant widgetValue() const override;
345 friend class TestProcessingGui;
348 class GUI_EXPORT QgsProcessingRangeWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
367 QVariant widgetValue() const override;
368 QStringList compatibleParameterTypes() const override;
369 QStringList compatibleOutputTypes() const override;
370 QList<
int > compatibleDataTypes() const override;
371 QString modelerExpressionFormatString() const override;
380 int mBlockChangedSignal = 0;
382 friend class TestProcessingGui;
386 class GUI_EXPORT QgsProcessingMatrixWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
405 QVariant widgetValue() const override;
407 QStringList compatibleParameterTypes() const override;
408 QStringList compatibleOutputTypes() const override;
409 QList<
int > compatibleDataTypes() const override;
410 QString modelerExpressionFormatString() const override;
414 QgsProcessingMatrixParameterPanel *mMatrixWidget =
nullptr;
416 friend class TestProcessingGui;
428 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
432 QComboBox *mTypeComboBox =
nullptr;
433 QComboBox *mFilterComboBox =
nullptr;
438 class GUI_EXPORT QgsProcessingFileWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
462 QVariant widgetValue() const override;
464 QStringList compatibleParameterTypes() const override;
466 QStringList compatibleOutputTypes() const override;
468 QList<
int > compatibleDataTypes() const override;
469 QString modelerExpressionFormatString() const override;
475 friend class TestProcessingGui;
478 class GUI_EXPORT QgsProcessingExpressionWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
493 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
495 void setParentLayerWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
499 QVariant widgetValue() const override;
501 QStringList compatibleParameterTypes() const override;
503 QStringList compatibleOutputTypes() const override;
505 QList<
int > compatibleDataTypes() const override;
506 QString modelerExpressionFormatString() const override;
514 friend class TestProcessingGui;
518 class GUI_EXPORT QgsProcessingEnumCheckboxPanelWidget : public QWidget
524 QgsProcessingEnumCheckboxPanelWidget( QWidget *parent =
nullptr,
const QgsProcessingParameterEnum *param =
nullptr,
int columns = 2 );
525 QVariant value()
const;
526 void setValue(
const QVariant &value );
534 void showPopupMenu();
541 QMap< QVariant, QAbstractButton * > mButtons;
542 QButtonGroup *mButtonGroup =
nullptr;
544 bool mBlockChangedSignal =
false;
546 friend class TestProcessingGui;
549 class GUI_EXPORT QgsProcessingEnumPanelWidget :
public QWidget
556 QVariant value()
const {
return mValue; }
557 void setValue(
const QVariant &value );
569 void updateSummaryText();
572 QLineEdit *mLineEdit =
nullptr;
573 QToolButton *mToolButton =
nullptr;
577 friend class TestProcessingGui;
581 class GUI_EXPORT QgsProcessingEnumWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
600 QVariant widgetValue() const override;
602 QStringList compatibleParameterTypes() const override;
604 QStringList compatibleOutputTypes() const override;
606 QList<
int > compatibleDataTypes() const override;
607 QString modelerExpressionFormatString() const override;
610 QComboBox *mComboBox =
nullptr;
611 QgsProcessingEnumPanelWidget *mPanel =
nullptr;
612 QgsProcessingEnumCheckboxPanelWidget *mCheckboxPanel =
nullptr;
614 friend class TestProcessingGui;
619 class GUI_EXPORT QgsProcessingLayoutWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
638 QVariant widgetValue() const override;
640 QStringList compatibleParameterTypes() const override;
642 QStringList compatibleOutputTypes() const override;
644 QList<
int > compatibleDataTypes() const override;
645 QString modelerExpressionFormatString() const override;
649 QLineEdit *mLineEdit =
nullptr;
651 friend class TestProcessingGui;
665 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
669 QComboBox *mParentLayoutComboBox =
nullptr;
673 class GUI_EXPORT QgsProcessingLayoutItemWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
693 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
697 void setLayoutParameterValue( const QVariant &value );
703 QVariant widgetValue() const override;
705 QStringList compatibleParameterTypes() const override;
707 QStringList compatibleOutputTypes() const override;
709 QList<
int > compatibleDataTypes() const override;
710 QString modelerExpressionFormatString() const override;
714 QLineEdit *mLineEdit =
nullptr;
716 friend class TestProcessingGui;
719 class GUI_EXPORT QgsProcessingPointMapTool : public
QgsMapTool 724 ~QgsProcessingPointMapTool()
override;
725 void deactivate()
override;
728 void keyPressEvent( QKeyEvent *e )
override;
737 std::unique_ptr<QgsSnapIndicator> mSnapIndicator;
738 friend class TestProcessingGui;
741 class GUI_EXPORT QgsProcessingPointPanel :
public QWidget
747 QgsProcessingPointPanel( QWidget *parent );
749 void setAllowNull(
bool allowNull );
751 QVariant value()
const;
757 void toggleDialogVisibility(
bool visible );
762 void selectOnCanvas();
769 QToolButton *mButton =
nullptr;
772 QPointer< QgsMapTool > mPrevTool;
773 std::unique_ptr< QgsProcessingPointMapTool > mTool;
774 friend class TestProcessingGui;
778 class GUI_EXPORT QgsProcessingPointWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
794 void setDialog( QDialog *dialog ) override;
799 QVariant widgetValue() const override;
801 QStringList compatibleParameterTypes() const override;
803 QStringList compatibleOutputTypes() const override;
805 QList<
int > compatibleDataTypes() const override;
806 QString modelerExpressionFormatString() const override;
809 QgsProcessingPointPanel *mPanel =
nullptr;
810 QLineEdit *mLineEdit =
nullptr;
811 QDialog *mDialog =
nullptr;
813 friend class TestProcessingGui;
826 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
831 QCheckBox *mAllowOpacity =
nullptr;
835 class GUI_EXPORT QgsProcessingColorWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
859 QVariant widgetValue() const override;
861 QStringList compatibleParameterTypes() const override;
863 QStringList compatibleOutputTypes() const override;
865 QList<
int > compatibleDataTypes() const override;
866 QString modelerExpressionFormatString() const override;
870 friend class TestProcessingGui;
876 #endif // QGSPROCESSINGWIDGETWRAPPERIMPL_H The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value...
WidgetType
Types of dialogs which Processing widgets can be created for.
A class to represent a 2D point.
Helper functions for various unit types.
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value...
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
QgsAuthConfigSelect(QWidget *parent=nullptr, const QString &dataprovider=QString())
Create a dialog for setting an associated authentication config, either from existing configs...
const QgsCoordinateReferenceSystem & crs
Abstract base class for processing algorithms.
Map canvas is a class for displaying all GIS data types on a canvas.
The QgsLayoutItemComboBox class is a combo box which displays items of a matching type from a layout...
An enum based parameter for processing algorithms, allowing for selection from predefined values...
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
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
Contains settings which reflect the context in which a Processing parameter widget is shown...
The QgsExpressionLineEdit widget includes a line edit for entering expressions together with a button...
This class represents a coordinate reference system (CRS).
Base class for the definition of processing parameters.
Class that shows snapping marker on map canvas for the current snapping match.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Represents a vector layer which manages a vector based data sets.
Contains information about the context in which a processing algorithm is executed.
The QgsLayoutComboBox class is a combo box which displays available layouts from a QgsLayoutManager...
Standard algorithm dialog.