19 #ifndef QGSPROCESSINGWIDGETWRAPPERIMPL_H
20 #define QGSPROCESSINGWIDGETWRAPPERIMPL_H
29 #include <QAbstractButton>
41 class QgsProcessingMatrixParameterPanel;
63 class QgsProcessingEnumModelerWidget;
64 class QgsProcessingMatrixModelerWidget;
65 class QgsProcessingMapLayerComboBox;
67 class QgsProcessingLayerOutputDestinationWidget;
86 QCheckBox *mDefaultCheckBox =
nullptr;
115 QVariant widgetValue() const override;
117 QStringList compatibleParameterTypes() const override;
119 QStringList compatibleOutputTypes() const override;
123 QCheckBox *mCheckBox =
nullptr;
124 QComboBox *mComboBox =
nullptr;
126 friend class TestProcessingGui;
140 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
171 QVariant widgetValue() const override;
173 QStringList compatibleParameterTypes() const override;
174 QStringList compatibleOutputTypes() const override;
175 QString modelerExpressionFormatString() const override;
180 QCheckBox *mUseProjectCrsCheckBox =
nullptr;
182 friend class TestProcessingGui;
196 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
200 QLineEdit *mDefaultLineEdit =
nullptr;
201 QCheckBox *mMultiLineCheckBox =
nullptr;
229 QVariant widgetValue() const override;
231 QStringList compatibleParameterTypes() const override;
233 QStringList compatibleOutputTypes() const override;
236 QLineEdit *mLineEdit =
nullptr;
237 QComboBox *mComboBox =
nullptr;
238 QPlainTextEdit *mPlainTextEdit =
nullptr;
240 friend class TestProcessingGui;
263 QVariant widgetValue() const override;
265 QStringList compatibleParameterTypes() const override;
267 QStringList compatibleOutputTypes() const override;
270 QgsAuthConfigSelect *mAuthConfigSelect =
nullptr;
272 friend class TestProcessingGui;
285 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
289 QComboBox *mTypeComboBox =
nullptr;
290 QLineEdit *mMinLineEdit =
nullptr;
291 QLineEdit *mMaxLineEdit =
nullptr;
292 QLineEdit *mDefaultLineEdit =
nullptr;
321 QVariant widgetValue() const override;
323 QStringList compatibleParameterTypes() const override;
325 QStringList compatibleOutputTypes() const override;
334 static
double calculateStep(
double minimum,
double maximum );
336 bool mAllowingNull = false;
338 friend class TestProcessingGui;
351 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
355 QComboBox *mParentLayerComboBox =
nullptr;
356 QLineEdit *mMinLineEdit =
nullptr;
357 QLineEdit *mMaxLineEdit =
nullptr;
358 QLineEdit *mDefaultLineEdit =
nullptr;
362 class GUI_EXPORT QgsProcessingDistanceWidgetWrapper :
public QgsProcessingNumericWidgetWrapper
372 QString parameterType()
const override;
385 void setUnitParameterValue( const QVariant &value );
390 QVariant widgetValue() const override;
395 QLabel *mLabel =
nullptr;
396 QWidget *mWarningLabel =
nullptr;
397 QComboBox *mUnitsCombo =
nullptr;
399 friend class TestProcessingGui;
412 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
416 QLineEdit *mMinLineEdit =
nullptr;
417 QLineEdit *mMaxLineEdit =
nullptr;
418 QLineEdit *mDefaultLineEdit =
nullptr;
419 QComboBox *mUnitsCombo =
nullptr;
423 class GUI_EXPORT QgsProcessingDurationWidgetWrapper :
public QgsProcessingNumericWidgetWrapper
433 QString parameterType()
const override;
447 QVariant widgetValue() const override;
453 QComboBox *mUnitsCombo =
nullptr;
455 friend class TestProcessingGui;
467 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
471 QLineEdit *mDefaultLineEdit =
nullptr;
475 class GUI_EXPORT QgsProcessingScaleWidgetWrapper :
public QgsProcessingNumericWidgetWrapper
485 QString parameterType()
const override;
498 QVariant widgetValue() const override;
505 friend class TestProcessingGui;
518 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
522 QComboBox *mTypeComboBox =
nullptr;
523 QLineEdit *mMinLineEdit =
nullptr;
524 QLineEdit *mMaxLineEdit =
nullptr;
552 QVariant widgetValue() const override;
553 QStringList compatibleParameterTypes() const override;
554 QStringList compatibleOutputTypes() const override;
555 QString modelerExpressionFormatString() const override;
564 int mBlockChangedSignal = 0;
565 bool mAllowingNull = false;
567 friend class TestProcessingGui;
579 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
583 QgsProcessingMatrixModelerWidget *mMatrixWidget =
nullptr;
611 QVariant widgetValue() const override;
613 QStringList compatibleParameterTypes() const override;
614 QStringList compatibleOutputTypes() const override;
615 QString modelerExpressionFormatString() const override;
619 QgsProcessingMatrixParameterPanel *mMatrixWidget =
nullptr;
621 friend class TestProcessingGui;
633 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
637 QComboBox *mTypeComboBox =
nullptr;
638 QComboBox *mFilterComboBox =
nullptr;
667 QVariant widgetValue() const override;
669 QStringList compatibleParameterTypes() const override;
671 QStringList compatibleOutputTypes() const override;
672 QString modelerExpressionFormatString() const override;
678 friend class TestProcessingGui;
692 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
696 QComboBox *mParentLayerComboBox =
nullptr;
729 QVariant widgetValue() const override;
731 QStringList compatibleParameterTypes() const override;
733 QStringList compatibleOutputTypes() const override;
735 QString modelerExpressionFormatString() const override;
744 friend class TestProcessingGui;
748 class GUI_EXPORT QgsProcessingEnumCheckboxPanelWidget : public QWidget
754 QgsProcessingEnumCheckboxPanelWidget( QWidget *parent =
nullptr,
const QgsProcessingParameterEnum *param =
nullptr,
int columns = 2 );
755 QVariant value()
const;
756 void setValue(
const QVariant &value );
764 void showPopupMenu();
771 QMap< QVariant, QAbstractButton * > mButtons;
772 QButtonGroup *mButtonGroup =
nullptr;
774 bool mBlockChangedSignal =
false;
776 friend class TestProcessingGui;
779 class GUI_EXPORT QgsProcessingEnumPanelWidget :
public QWidget
786 QVariant value()
const {
return mValue; }
787 void setValue(
const QVariant &value );
799 void updateSummaryText();
802 QLineEdit *mLineEdit =
nullptr;
803 QToolButton *mToolButton =
nullptr;
807 friend class TestProcessingGui;
823 QgsProcessingEnumModelerWidget *mEnumWidget =
nullptr;
851 QVariant widgetValue() const override;
853 QStringList compatibleParameterTypes() const override;
855 QStringList compatibleOutputTypes() const override;
857 QString modelerExpressionFormatString() const override;
860 QComboBox *mComboBox =
nullptr;
861 QgsProcessingEnumPanelWidget *mPanel =
nullptr;
862 QgsProcessingEnumCheckboxPanelWidget *mCheckboxPanel =
nullptr;
864 friend class TestProcessingGui;
888 QVariant widgetValue() const override;
891 QStringList compatibleParameterTypes() const override;
893 QStringList compatibleOutputTypes() const override;
895 QString modelerExpressionFormatString() const override;
899 QComboBox *mPlainComboBox =
nullptr;
901 friend class TestProcessingGui;
915 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
919 QComboBox *mParentLayoutComboBox =
nullptr;
947 void setLayoutParameterValue( const QVariant &value );
953 QVariant widgetValue() const override;
955 QStringList compatibleParameterTypes() const override;
957 QStringList compatibleOutputTypes() const override;
958 QString modelerExpressionFormatString() const override;
962 QLineEdit *mLineEdit =
nullptr;
964 friend class TestProcessingGui;
967 class GUI_EXPORT QgsProcessingPointMapTool : public
QgsMapTool
972 ~QgsProcessingPointMapTool()
override;
973 void deactivate()
override;
976 void keyPressEvent( QKeyEvent *e )
override;
985 std::unique_ptr<QgsSnapIndicator> mSnapIndicator;
986 friend class TestProcessingGui;
989 class GUI_EXPORT QgsProcessingPointPanel :
public QWidget
995 QgsProcessingPointPanel( QWidget *parent );
997 void setAllowNull(
bool allowNull );
999 QVariant value()
const;
1005 void toggleDialogVisibility(
bool visible );
1010 void selectOnCanvas();
1017 QToolButton *mButton =
nullptr;
1020 QPointer< QgsMapTool > mPrevTool;
1021 std::unique_ptr< QgsProcessingPointMapTool > mTool;
1022 friend class TestProcessingGui;
1039 QLineEdit *mDefaultLineEdit =
nullptr;
1064 void setDialog( QDialog *dialog ) override;
1069 QVariant widgetValue() const override;
1071 QStringList compatibleParameterTypes() const override;
1073 QStringList compatibleOutputTypes() const override;
1074 QString modelerExpressionFormatString() const override;
1077 QgsProcessingPointPanel *mPanel =
nullptr;
1078 QLineEdit *mLineEdit =
nullptr;
1079 QDialog *mDialog =
nullptr;
1081 friend class TestProcessingGui;
1093 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1097 QLineEdit *mDefaultLineEdit =
nullptr;
1125 QVariant widgetValue() const override;
1127 QStringList compatibleParameterTypes() const override;
1129 QStringList compatibleOutputTypes() const override;
1130 QString modelerExpressionFormatString() const override;
1133 QLineEdit *mLineEdit =
nullptr;
1135 friend class TestProcessingGui;
1147 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1176 void setDialog( QDialog *dialog ) override;
1181 QVariant widgetValue() const override;
1183 QStringList compatibleParameterTypes() const override;
1185 QStringList compatibleOutputTypes() const override;
1186 QString modelerExpressionFormatString() const override;
1190 QDialog *mDialog =
nullptr;
1192 friend class TestProcessingGui;
1204 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1209 QCheckBox *mAllowOpacity =
nullptr;
1237 QVariant widgetValue() const override;
1239 QStringList compatibleParameterTypes() const override;
1241 QStringList compatibleOutputTypes() const override;
1242 QString modelerExpressionFormatString() const override;
1246 friend class TestProcessingGui;
1260 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1264 QLineEdit *mDefaultLineEdit =
nullptr;
1266 QComboBox *mSourceParamComboBox =
nullptr;
1267 QComboBox *mDestParamComboBox =
nullptr;
1300 QVariant widgetValue() const override;
1302 QStringList compatibleParameterTypes() const override;
1304 QStringList compatibleOutputTypes() const override;
1305 QString modelerExpressionFormatString() const override;
1308 void setSourceCrsParameterValue( const QVariant &value );
1309 void setDestinationCrsParameterValue( const QVariant &value );
1313 QLineEdit *mLineEdit =
nullptr;
1316 friend class TestProcessingGui;
1319 class GUI_EXPORT QgsProcessingFieldPanelWidget : public QWidget
1327 void setFields(
const QgsFields &fields );
1329 QgsFields fields()
const {
return mFields; }
1331 QVariant value()
const {
return mValue; }
1332 void setValue(
const QVariant &value );
1344 void updateSummaryText();
1349 QLineEdit *mLineEdit =
nullptr;
1350 QToolButton *mToolButton =
nullptr;
1352 QVariantList mValue;
1354 friend class TestProcessingGui;
1370 QComboBox *mParentLayerComboBox =
nullptr;
1371 QComboBox *mDataTypeComboBox =
nullptr;
1372 QLineEdit *mDefaultLineEdit =
nullptr;
1373 QCheckBox *mAllowMultipleCheckBox =
nullptr;
1374 QCheckBox *mDefaultToAllCheckBox =
nullptr;
1405 QVariant widgetValue() const override;
1407 QStringList compatibleParameterTypes() const override;
1409 QStringList compatibleOutputTypes() const override;
1410 QString modelerExpressionFormatString() const override;
1416 QgsProcessingFieldPanelWidget *mPanel =
nullptr;
1417 QLineEdit *mLineEdit =
nullptr;
1423 friend class TestProcessingGui;
1436 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1440 QComboBox *mDefaultComboBox =
nullptr;
1468 QVariant widgetValue() const override;
1470 QStringList compatibleParameterTypes() const override;
1472 QStringList compatibleOutputTypes() const override;
1473 QString modelerExpressionFormatString() const override;
1477 QComboBox *mComboBox =
nullptr;
1479 friend class TestProcessingGui;
1492 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1496 QComboBox *mTypeComboBox =
nullptr;
1524 QVariant widgetValue() const override;
1526 QStringList compatibleParameterTypes() const override;
1527 QStringList compatibleOutputTypes() const override;
1528 QString modelerExpressionFormatString() const override;
1536 friend class TestProcessingGui;
1554 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1558 QComboBox *mProviderComboBox =
nullptr;
1559 QLineEdit *mDefaultEdit =
nullptr;
1588 QVariant widgetValue() const override;
1590 QStringList compatibleParameterTypes() const override;
1592 QStringList compatibleOutputTypes() const override;
1593 QString modelerExpressionFormatString() const override;
1598 int mBlockSignals = 0;
1600 friend class TestProcessingGui;
1614 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1618 QComboBox *mConnectionParamComboBox =
nullptr;
1619 QLineEdit *mDefaultEdit =
nullptr;
1635 void postInitialize(
const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers )
override;
1652 QVariant widgetValue() const override;
1654 QStringList compatibleParameterTypes() const override;
1656 QStringList compatibleOutputTypes() const override;
1657 QString modelerExpressionFormatString() const override;
1662 int mBlockSignals = 0;
1664 friend class TestProcessingGui;
1679 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1683 QComboBox *mConnectionParamComboBox =
nullptr;
1684 QComboBox *mSchemaParamComboBox =
nullptr;
1685 QLineEdit *mDefaultEdit =
nullptr;
1701 void postInitialize(
const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers )
override;
1719 QVariant widgetValue() const override;
1721 QStringList compatibleParameterTypes() const override;
1723 QStringList compatibleOutputTypes() const override;
1724 QString modelerExpressionFormatString() const override;
1729 int mBlockSignals = 0;
1730 QString mConnection;
1734 friend class TestProcessingGui;
1746 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
1777 QVariant widgetValue() const override;
1779 QStringList compatibleParameterTypes() const override;
1781 QStringList compatibleOutputTypes() const override;
1782 QString modelerExpressionFormatString() const override;
1787 QPointer< QgsProcessingMapLayerComboBox > mComboBox;
1788 int mBlockSignals = 0;
1790 friend class TestProcessingGui;
1794 class GUI_EXPORT QgsProcessingRasterLayerWidgetWrapper : public QgsProcessingMapLayerWidgetWrapper
1838 class GUI_EXPORT QgsProcessingVectorLayerWidgetWrapper :
public QgsProcessingMapLayerWidgetWrapper
1848 QString parameterType()
const override;
1857 QStringList compatibleParameterTypes()
const override;
1859 QStringList compatibleOutputTypes()
const override;
1861 QString modelerExpressionFormatString()
const override;
1882 class GUI_EXPORT QgsProcessingFeatureSourceWidgetWrapper :
public QgsProcessingMapLayerWidgetWrapper
1892 QString parameterType()
const override;
1901 QStringList compatibleParameterTypes()
const override;
1903 QStringList compatibleOutputTypes()
const override;
1905 QString modelerExpressionFormatString()
const override;
1910 class GUI_EXPORT QgsProcessingMeshLayerWidgetWrapper :
public QgsProcessingMapLayerWidgetWrapper
1920 QString parameterType()
const override;
1929 QStringList compatibleParameterTypes()
const override;
1931 QStringList compatibleOutputTypes()
const override;
1933 QString modelerExpressionFormatString()
const override;
1938 class GUI_EXPORT QgsProcessingRasterBandPanelWidget :
public QWidget
1946 void setBands(
const QList< int > &bands );
1947 void setBandNames(
const QHash<int, QString > &names );
1948 QList< int > bands()
const {
return mBands; }
1950 QVariant value()
const {
return mValue; }
1951 void setValue(
const QVariant &value );
1963 void updateSummaryText();
1965 QList< int > mBands;
1966 QHash<int, QString > mBandNames;
1969 QLineEdit *mLineEdit =
nullptr;
1970 QToolButton *mToolButton =
nullptr;
1972 QVariantList mValue;
1974 friend class TestProcessingGui;
1990 QComboBox *mParentLayerComboBox =
nullptr;
1991 QLineEdit *mDefaultLineEdit =
nullptr;
1992 QCheckBox *mAllowMultipleCheckBox =
nullptr;
2023 QVariant widgetValue() const override;
2025 QStringList compatibleParameterTypes() const override;
2027 QStringList compatibleOutputTypes() const override;
2028 QString modelerExpressionFormatString() const override;
2033 QgsProcessingRasterBandPanelWidget *mPanel =
nullptr;
2034 QLineEdit *mLineEdit =
nullptr;
2038 friend class TestProcessingGui;
2043 class GUI_EXPORT QgsProcessingMultipleLayerPanelWidget : public QWidget
2051 QVariant value()
const {
return mValue; }
2052 void setValue(
const QVariant &value );
2055 void setModel( QgsProcessingModelAlgorithm *model,
const QString &modelChildAlgorithmID );
2067 void updateSummaryText();
2070 QLineEdit *mLineEdit =
nullptr;
2071 QToolButton *mToolButton =
nullptr;
2073 QVariantList mValue;
2074 QList< QgsProcessingModelChildParameterSource > mModelSources;
2075 QgsProcessingModelAlgorithm *mModel =
nullptr;
2079 friend class TestProcessingGui;
2095 QComboBox *mLayerTypeComboBox =
nullptr;
2123 QVariant widgetValue() const override;
2125 QStringList compatibleParameterTypes() const override;
2127 QStringList compatibleOutputTypes() const override;
2128 QString modelerExpressionFormatString() const override;
2132 QgsProcessingMultipleLayerPanelWidget *mPanel =
nullptr;
2134 friend class TestProcessingGui;
2153 QVariant widgetValue() const override;
2154 QVariantMap customProperties() const override;
2156 QStringList compatibleParameterTypes() const override;
2158 QStringList compatibleOutputTypes() const override;
2162 QgsProcessingLayerOutputDestinationWidget *mOutputWidget =
nullptr;
2163 int mBlockSignals = 0;
2165 friend class TestProcessingGui;
2169 class GUI_EXPORT QgsProcessingFeatureSinkWidgetWrapper : public QgsProcessingOutputWidgetWrapper
2190 class GUI_EXPORT QgsProcessingVectorDestinationWidgetWrapper :
public QgsProcessingOutputWidgetWrapper
2200 QString parameterType()
const override;
2204 QString modelerExpressionFormatString()
const override;
2208 class GUI_EXPORT QgsProcessingRasterDestinationWidgetWrapper :
public QgsProcessingOutputWidgetWrapper
2218 QString parameterType()
const override;
2222 QString modelerExpressionFormatString()
const override;
2226 class GUI_EXPORT QgsProcessingPointCloudDestinationWidgetWrapper :
public QgsProcessingOutputWidgetWrapper
2236 QString parameterType()
const override;
2240 QString modelerExpressionFormatString()
const override;
2244 class GUI_EXPORT QgsProcessingFileDestinationWidgetWrapper :
public QgsProcessingOutputWidgetWrapper
2254 QString parameterType()
const override;
2258 QString modelerExpressionFormatString()
const override;
2262 class GUI_EXPORT QgsProcessingFolderDestinationWidgetWrapper :
public QgsProcessingOutputWidgetWrapper
2272 QString parameterType()
const override;
2276 QString modelerExpressionFormatString()
const override;
2280 class GUI_EXPORT QgsProcessingPointCloudLayerWidgetWrapper :
public QgsProcessingMapLayerWidgetWrapper
2290 QString parameterType()
const override;
2299 QStringList compatibleParameterTypes()
const override;
2301 QStringList compatibleOutputTypes()
const override;
2303 QString modelerExpressionFormatString()
const override;
2331 QVariant widgetValue() const override;
2333 QStringList compatibleParameterTypes() const override;
2335 QStringList compatibleOutputTypes() const override;
2337 QString modelerExpressionFormatString() const override;
2342 int mBlockSignals = 0;
2344 friend class TestProcessingGui;
2350 #endif // QGSPROCESSINGWIDGETWRAPPERIMPL_H