19 #ifndef QGSPROCESSINGWIDGETWRAPPERIMPL_H 20 #define QGSPROCESSINGWIDGETWRAPPERIMPL_H 28 #include <QAbstractButton> 40 class QgsProcessingMatrixParameterPanel;
70 QCheckBox *mDefaultCheckBox =
nullptr;
94 QLabel *createLabel() override SIP_FACTORY;
99 QVariant widgetValue() const override;
101 QStringList compatibleParameterTypes() const override;
103 QStringList compatibleOutputTypes() const override;
105 QList<
int > compatibleDataTypes() const override;
109 QCheckBox *mCheckBox =
nullptr;
110 QComboBox *mComboBox =
nullptr;
112 friend class TestProcessingGui;
134 QVariant widgetValue() const override;
136 QStringList compatibleParameterTypes() const override;
137 QStringList compatibleOutputTypes() const override;
138 QList<
int > compatibleDataTypes() const override;
139 QString modelerExpressionFormatString() const override;
144 QCheckBox *mUseProjectCrsCheckBox =
nullptr;
146 friend class TestProcessingGui;
160 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
164 QLineEdit *mDefaultLineEdit =
nullptr;
165 QCheckBox *mMultiLineCheckBox =
nullptr;
169 class GUI_EXPORT QgsProcessingStringWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
193 QVariant widgetValue() const override;
195 QStringList compatibleParameterTypes() const override;
197 QStringList compatibleOutputTypes() const override;
199 QList<
int > compatibleDataTypes() const override;
203 QLineEdit *mLineEdit =
nullptr;
204 QPlainTextEdit *mPlainTextEdit =
nullptr;
206 friend class TestProcessingGui;
210 class GUI_EXPORT QgsProcessingAuthConfigWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
229 QVariant widgetValue() const override;
231 QStringList compatibleParameterTypes() const override;
233 QStringList compatibleOutputTypes() const override;
235 QList<
int > compatibleDataTypes() const override;
239 QgsAuthConfigSelect *mAuthConfigSelect =
nullptr;
241 friend class TestProcessingGui;
245 class GUI_EXPORT QgsProcessingNumericWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
264 QVariant widgetValue() const override;
266 QStringList compatibleParameterTypes() const override;
268 QStringList compatibleOutputTypes() const override;
270 QList<
int > compatibleDataTypes() const override;
279 static
double calculateStep(
double minimum,
double maximum );
281 bool mAllowingNull = false;
283 friend class TestProcessingGui;
287 class GUI_EXPORT QgsProcessingDistanceWidgetWrapper : public QgsProcessingNumericWidgetWrapper
302 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
305 void setUnitParameterValue( const QVariant &value );
310 QVariant widgetValue() const override;
315 QLabel *mLabel =
nullptr;
316 QWidget *mWarningLabel =
nullptr;
317 QComboBox *mUnitsCombo =
nullptr;
319 friend class TestProcessingGui;
323 class GUI_EXPORT QgsProcessingScaleWidgetWrapper : public QgsProcessingNumericWidgetWrapper
341 QVariant widgetValue() const override;
348 friend class TestProcessingGui;
351 class GUI_EXPORT QgsProcessingRangeWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
370 QVariant widgetValue() const override;
371 QStringList compatibleParameterTypes() const override;
372 QStringList compatibleOutputTypes() const override;
373 QList<
int > compatibleDataTypes() const override;
374 QString modelerExpressionFormatString() const override;
383 int mBlockChangedSignal = 0;
384 bool mAllowingNull = false;
386 friend class TestProcessingGui;
390 class GUI_EXPORT QgsProcessingMatrixWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
409 QVariant widgetValue() const override;
411 QStringList compatibleParameterTypes() const override;
412 QStringList compatibleOutputTypes() const override;
413 QList<
int > compatibleDataTypes() const override;
414 QString modelerExpressionFormatString() const override;
418 QgsProcessingMatrixParameterPanel *mMatrixWidget =
nullptr;
420 friend class TestProcessingGui;
432 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
436 QComboBox *mTypeComboBox =
nullptr;
437 QComboBox *mFilterComboBox =
nullptr;
442 class GUI_EXPORT QgsProcessingFileWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
466 QVariant widgetValue() const override;
468 QStringList compatibleParameterTypes() const override;
470 QStringList compatibleOutputTypes() const override;
472 QList<
int > compatibleDataTypes() const override;
473 QString modelerExpressionFormatString() const override;
479 friend class TestProcessingGui;
482 class GUI_EXPORT QgsProcessingExpressionWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
497 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
499 void setParentLayerWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
503 QVariant widgetValue() const override;
505 QStringList compatibleParameterTypes() const override;
507 QStringList compatibleOutputTypes() const override;
509 QList<
int > compatibleDataTypes() const override;
510 QString modelerExpressionFormatString() const override;
518 friend class TestProcessingGui;
522 class GUI_EXPORT QgsProcessingEnumCheckboxPanelWidget : public QWidget
528 QgsProcessingEnumCheckboxPanelWidget( QWidget *parent =
nullptr,
const QgsProcessingParameterEnum *param =
nullptr,
int columns = 2 );
529 QVariant value()
const;
530 void setValue(
const QVariant &value );
538 void showPopupMenu();
545 QMap< QVariant, QAbstractButton * > mButtons;
546 QButtonGroup *mButtonGroup =
nullptr;
548 bool mBlockChangedSignal =
false;
550 friend class TestProcessingGui;
553 class GUI_EXPORT QgsProcessingEnumPanelWidget :
public QWidget
560 QVariant value()
const {
return mValue; }
561 void setValue(
const QVariant &value );
573 void updateSummaryText();
576 QLineEdit *mLineEdit =
nullptr;
577 QToolButton *mToolButton =
nullptr;
581 friend class TestProcessingGui;
585 class GUI_EXPORT QgsProcessingEnumWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
604 QVariant widgetValue() const override;
606 QStringList compatibleParameterTypes() const override;
608 QStringList compatibleOutputTypes() const override;
610 QList<
int > compatibleDataTypes() const override;
611 QString modelerExpressionFormatString() const override;
614 QComboBox *mComboBox =
nullptr;
615 QgsProcessingEnumPanelWidget *mPanel =
nullptr;
616 QgsProcessingEnumCheckboxPanelWidget *mCheckboxPanel =
nullptr;
618 friend class TestProcessingGui;
623 class GUI_EXPORT QgsProcessingLayoutWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
642 QVariant widgetValue() const override;
644 QStringList compatibleParameterTypes() const override;
646 QStringList compatibleOutputTypes() const override;
648 QList<
int > compatibleDataTypes() const override;
649 QString modelerExpressionFormatString() const override;
653 QLineEdit *mLineEdit =
nullptr;
655 friend class TestProcessingGui;
669 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
673 QComboBox *mParentLayoutComboBox =
nullptr;
677 class GUI_EXPORT QgsProcessingLayoutItemWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
697 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
701 void setLayoutParameterValue( const QVariant &value );
707 QVariant widgetValue() const override;
709 QStringList compatibleParameterTypes() const override;
711 QStringList compatibleOutputTypes() const override;
713 QList<
int > compatibleDataTypes() const override;
714 QString modelerExpressionFormatString() const override;
718 QLineEdit *mLineEdit =
nullptr;
720 friend class TestProcessingGui;
723 class GUI_EXPORT QgsProcessingPointMapTool : public
QgsMapTool 728 ~QgsProcessingPointMapTool()
override;
729 void deactivate()
override;
732 void keyPressEvent( QKeyEvent *e )
override;
741 std::unique_ptr<QgsSnapIndicator> mSnapIndicator;
742 friend class TestProcessingGui;
745 class GUI_EXPORT QgsProcessingPointPanel :
public QWidget
751 QgsProcessingPointPanel( QWidget *parent );
753 void setAllowNull(
bool allowNull );
755 QVariant value()
const;
761 void toggleDialogVisibility(
bool visible );
766 void selectOnCanvas();
773 QToolButton *mButton =
nullptr;
776 QPointer< QgsMapTool > mPrevTool;
777 std::unique_ptr< QgsProcessingPointMapTool > mTool;
778 friend class TestProcessingGui;
782 class GUI_EXPORT QgsProcessingPointWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
798 void setDialog( QDialog *dialog ) override;
803 QVariant widgetValue() const override;
805 QStringList compatibleParameterTypes() const override;
807 QStringList compatibleOutputTypes() const override;
809 QList<
int > compatibleDataTypes() const override;
810 QString modelerExpressionFormatString() const override;
813 QgsProcessingPointPanel *mPanel =
nullptr;
814 QLineEdit *mLineEdit =
nullptr;
815 QDialog *mDialog =
nullptr;
817 friend class TestProcessingGui;
830 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
835 QCheckBox *mAllowOpacity =
nullptr;
839 class GUI_EXPORT QgsProcessingColorWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
863 QVariant widgetValue() const override;
865 QStringList compatibleParameterTypes() const override;
867 QStringList compatibleOutputTypes() const override;
869 QList<
int > compatibleDataTypes() const override;
870 QString modelerExpressionFormatString() const override;
874 friend class TestProcessingGui;
888 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
892 QLineEdit *mDefaultLineEdit =
nullptr;
894 QComboBox *mSourceParamComboBox =
nullptr;
895 QComboBox *mDestParamComboBox =
nullptr;
903 class GUI_EXPORT QgsProcessingCoordinateOperationWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
923 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
928 QVariant widgetValue() const override;
930 QStringList compatibleParameterTypes() const override;
932 QStringList compatibleOutputTypes() const override;
934 QList<
int > compatibleDataTypes() const override;
935 QString modelerExpressionFormatString() const override;
938 void setSourceCrsParameterValue( const QVariant &value );
939 void setDestinationCrsParameterValue( const QVariant &value );
943 QLineEdit *mLineEdit =
nullptr;
946 friend class TestProcessingGui;
949 class GUI_EXPORT QgsProcessingFieldPanelWidget : public QWidget
957 void setFields(
const QgsFields &fields );
959 QgsFields fields()
const {
return mFields; }
961 QVariant value()
const {
return mValue; }
962 void setValue(
const QVariant &value );
974 void updateSummaryText();
979 QLineEdit *mLineEdit =
nullptr;
980 QToolButton *mToolButton =
nullptr;
984 friend class TestProcessingGui;
988 class GUI_EXPORT QgsProcessingFieldWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
1003 void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
1006 void setParentLayerWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
1011 QVariant widgetValue() const override;
1013 QStringList compatibleParameterTypes() const override;
1015 QStringList compatibleOutputTypes() const override;
1017 QList<
int > compatibleDataTypes() const override;
1018 QString modelerExpressionFormatString() const override;
1024 QgsProcessingFieldPanelWidget *mPanel =
nullptr;
1025 QLineEdit *mLineEdit =
nullptr;
1031 friend class TestProcessingGui;
1044 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1048 QComboBox *mDefaultComboBox =
nullptr;
1052 class GUI_EXPORT QgsProcessingMapThemeWidgetWrapper :
public QgsAbstractProcessingParameterWidgetWrapper,
public QgsProcessingParameterWidgetFactoryInterface
1076 QVariant widgetValue() const override;
1078 QStringList compatibleParameterTypes() const override;
1080 QStringList compatibleOutputTypes() const override;
1082 QList<
int > compatibleDataTypes() const override;
1083 QString modelerExpressionFormatString() const override;
1087 QComboBox *mComboBox =
nullptr;
1089 friend class TestProcessingGui;
1094 #endif // QGSPROCESSINGWIDGETWRAPPERIMPL_H The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value...
A vector layer or feature source field parameter for processing algorithms.
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.
Container of fields for a vector layer.
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 QgsFieldComboBox is a combo box which displays the list of fields of a given layer.
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.