QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsprocessingwidgetwrapperimpl.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprocessingwidgetwrapperimpl.h
3  ---------------------
4  begin : August 2018
5  copyright : (C) 2018 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 
19 #ifndef QGSPROCESSINGWIDGETWRAPPERIMPL_H
20 #define QGSPROCESSINGWIDGETWRAPPERIMPL_H
21 
22 #define SIP_NO_FILE
25 #include "qgsmaptool.h"
26 #include "qgsprocessingcontext.h"
27 #include "processing/models/qgsprocessingmodelchildparametersource.h"
28 
29 #include <QAbstractButton>
30 
31 class QCheckBox;
32 class QComboBox;
33 class QLineEdit;
34 class QPlainTextEdit;
35 class QToolButton;
36 class QButtonGroup;
38 class QgsSpinBox;
39 class QgsDoubleSpinBox;
41 class QgsProcessingMatrixParameterPanel;
42 class QgsFileWidget;
47 class QgsLayoutComboBox;
49 class QgsPrintLayout;
50 class QgsScaleWidget;
51 class QgsSnapIndicator;
52 class QgsFilterLineEdit;
53 class QgsColorButton;
55 class QgsFieldComboBox;
56 class QgsDateTimeEdit;
57 class QgsDateEdit;
58 class QgsTimeEdit;
62 class QgsExtentWidget;
63 class QgsProcessingEnumModelerWidget;
64 class QgsProcessingMatrixModelerWidget;
65 class QgsProcessingMapLayerComboBox;
67 class QgsProcessingLayerOutputDestinationWidget;
69 
71 
72 class GUI_EXPORT QgsProcessingBooleanParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
73 {
74  Q_OBJECT
75  public:
76 
77  QgsProcessingBooleanParameterDefinitionWidget( QgsProcessingContext &context,
78  const QgsProcessingParameterWidgetContext &widgetContext,
79  const QgsProcessingParameterDefinition *definition = nullptr,
80  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
81  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
82 
83  private:
84 
85  QCheckBox *mDefaultCheckBox = nullptr;
86 
87 };
88 
89 class GUI_EXPORT QgsProcessingBooleanWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
90 {
91  Q_OBJECT
92 
93  public:
94 
95  QgsProcessingBooleanWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
96  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
97 
98  // QgsProcessingParameterWidgetFactoryInterface
99  QString parameterType() const override;
102  QgsProcessingContext &context,
103  const QgsProcessingParameterWidgetContext &widgetContext,
104  const QgsProcessingParameterDefinition *definition = nullptr,
105  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
106 
107  // QgsProcessingParameterWidgetWrapper interface
108  QWidget *createWidget() override SIP_FACTORY;
109  QLabel *createLabel() override SIP_FACTORY;
110 
111  protected:
112 
113  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
114  QVariant widgetValue() const override;
115 
116  QStringList compatibleParameterTypes() const override;
117 
118  QStringList compatibleOutputTypes() const override;
119 
120  private:
121 
122  QCheckBox *mCheckBox = nullptr;
123  QComboBox *mComboBox = nullptr;
124 
125  friend class TestProcessingGui;
126 };
127 
128 
129 
130 class GUI_EXPORT QgsProcessingCrsParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
131 {
132  Q_OBJECT
133  public:
134 
135  QgsProcessingCrsParameterDefinitionWidget( QgsProcessingContext &context,
136  const QgsProcessingParameterWidgetContext &widgetContext,
137  const QgsProcessingParameterDefinition *definition = nullptr,
138  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
139  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
140 
141  private:
142 
143  QgsProjectionSelectionWidget *mCrsSelector = nullptr;
144 };
145 
146 class GUI_EXPORT QgsProcessingCrsWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
147 {
148  Q_OBJECT
149 
150  public:
151 
152  QgsProcessingCrsWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
153  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
154 
155  // QgsProcessingParameterWidgetFactoryInterface
156  QString parameterType() const override;
159  QgsProcessingContext &context,
160  const QgsProcessingParameterWidgetContext &widgetContext,
161  const QgsProcessingParameterDefinition *definition = nullptr,
162  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
163 
164  // QgsProcessingParameterWidgetWrapper interface
165  QWidget *createWidget() override SIP_FACTORY;
166 
167  protected:
168 
169  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
170  QVariant widgetValue() const override;
171 
172  QStringList compatibleParameterTypes() const override;
173  QStringList compatibleOutputTypes() const override;
174  QString modelerExpressionFormatString() const override;
175 
176  private:
177 
178  QgsProjectionSelectionWidget *mProjectionSelectionWidget = nullptr;
179  QCheckBox *mUseProjectCrsCheckBox = nullptr;
180 
181  friend class TestProcessingGui;
182 };
183 
184 
185 
186 class GUI_EXPORT QgsProcessingStringParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
187 {
188  Q_OBJECT
189  public:
190 
191  QgsProcessingStringParameterDefinitionWidget( QgsProcessingContext &context,
192  const QgsProcessingParameterWidgetContext &widgetContext,
193  const QgsProcessingParameterDefinition *definition = nullptr,
194  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
195  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
196 
197  private:
198 
199  QLineEdit *mDefaultLineEdit = nullptr;
200  QCheckBox *mMultiLineCheckBox = nullptr;
201 
202 };
203 
204 class GUI_EXPORT QgsProcessingStringWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
205 {
206  Q_OBJECT
207 
208  public:
209 
210  QgsProcessingStringWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
211  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
212 
213  // QgsProcessingParameterWidgetFactoryInterface
214  QString parameterType() const override;
217  QgsProcessingContext &context,
218  const QgsProcessingParameterWidgetContext &widgetContext,
219  const QgsProcessingParameterDefinition *definition = nullptr,
220  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
221 
222  // QgsProcessingParameterWidgetWrapper interface
223  QWidget *createWidget() override SIP_FACTORY;
224 
225  protected:
226 
227  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
228  QVariant widgetValue() const override;
229 
230  QStringList compatibleParameterTypes() const override;
231 
232  QStringList compatibleOutputTypes() const override;
233  private:
234 
235  QLineEdit *mLineEdit = nullptr;
236  QPlainTextEdit *mPlainTextEdit = nullptr;
237 
238  friend class TestProcessingGui;
239 };
240 
241 
242 class GUI_EXPORT QgsProcessingAuthConfigWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
243 {
244  Q_OBJECT
245 
246  public:
247 
248  QgsProcessingAuthConfigWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
249  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
250 
251  // QgsProcessingParameterWidgetFactoryInterface
252  QString parameterType() const override;
254 
255  // QgsProcessingParameterWidgetWrapper interface
256  QWidget *createWidget() override SIP_FACTORY;
257 
258  protected:
259 
260  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
261  QVariant widgetValue() const override;
262 
263  QStringList compatibleParameterTypes() const override;
264 
265  QStringList compatibleOutputTypes() const override;
266  private:
267 
268  QgsAuthConfigSelect *mAuthConfigSelect = nullptr;
269 
270  friend class TestProcessingGui;
271 };
272 
273 
274 class GUI_EXPORT QgsProcessingNumberParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
275 {
276  Q_OBJECT
277  public:
278 
279  QgsProcessingNumberParameterDefinitionWidget( QgsProcessingContext &context,
280  const QgsProcessingParameterWidgetContext &widgetContext,
281  const QgsProcessingParameterDefinition *definition = nullptr,
282  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
283  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
284 
285  private:
286 
287  QComboBox *mTypeComboBox = nullptr;
288  QLineEdit *mMinLineEdit = nullptr;
289  QLineEdit *mMaxLineEdit = nullptr;
290  QLineEdit *mDefaultLineEdit = nullptr;
291 
292 };
293 
294 
295 class GUI_EXPORT QgsProcessingNumericWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
296 {
297  Q_OBJECT
298 
299  public:
300 
301  QgsProcessingNumericWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
302  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
303 
304  // QgsProcessingParameterWidgetFactoryInterface
305  QString parameterType() const override;
308  QgsProcessingContext &context,
309  const QgsProcessingParameterWidgetContext &widgetContext,
310  const QgsProcessingParameterDefinition *definition = nullptr,
311  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
312 
313  // QgsProcessingParameterWidgetWrapper interface
314  QWidget *createWidget() override SIP_FACTORY;
315 
316  protected:
317 
318  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
319  QVariant widgetValue() const override;
320 
321  QStringList compatibleParameterTypes() const override;
322 
323  QStringList compatibleOutputTypes() const override;
324 
325  protected:
326 
327  QgsSpinBox *mSpinBox = nullptr;
328  QgsDoubleSpinBox *mDoubleSpinBox = nullptr;
329 
330  private:
331 
332  static double calculateStep( double minimum, double maximum );
333 
334  bool mAllowingNull = false;
335 
336  friend class TestProcessingGui;
337 };
338 
339 
340 class GUI_EXPORT QgsProcessingDistanceParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
341 {
342  Q_OBJECT
343  public:
344 
345  QgsProcessingDistanceParameterDefinitionWidget( QgsProcessingContext &context,
346  const QgsProcessingParameterWidgetContext &widgetContext,
347  const QgsProcessingParameterDefinition *definition = nullptr,
348  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
349  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
350 
351  private:
352 
353  QComboBox *mParentLayerComboBox = nullptr;
354  QLineEdit *mMinLineEdit = nullptr;
355  QLineEdit *mMaxLineEdit = nullptr;
356  QLineEdit *mDefaultLineEdit = nullptr;
357 
358 };
359 
360 class GUI_EXPORT QgsProcessingDistanceWidgetWrapper : public QgsProcessingNumericWidgetWrapper
361 {
362  Q_OBJECT
363 
364  public:
365 
366  QgsProcessingDistanceWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
367  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
368 
369  // QgsProcessingParameterWidgetFactoryInterface
370  QString parameterType() const override;
372  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
373  QgsProcessingContext &context,
374  const QgsProcessingParameterWidgetContext &widgetContext,
375  const QgsProcessingParameterDefinition *definition = nullptr,
376  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
377 
378  // QgsProcessingParameterWidgetWrapper interface
379  QWidget *createWidget() override SIP_FACTORY;
380  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
381 
382  public slots:
383  void setUnitParameterValue( const QVariant &value );
384  void setUnits( QgsUnitTypes::DistanceUnit unit );
385 
386  protected:
387 
388  QVariant widgetValue() const override;
389 
390  private:
391 
392  QgsUnitTypes::DistanceUnit mBaseUnit = QgsUnitTypes::DistanceUnknownUnit;
393  QLabel *mLabel = nullptr;
394  QWidget *mWarningLabel = nullptr;
395  QComboBox *mUnitsCombo = nullptr;
396 
397  friend class TestProcessingGui;
398 };
399 
400 
401 class GUI_EXPORT QgsProcessingScaleParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
402 {
403  Q_OBJECT
404  public:
405 
406  QgsProcessingScaleParameterDefinitionWidget( QgsProcessingContext &context,
407  const QgsProcessingParameterWidgetContext &widgetContext,
408  const QgsProcessingParameterDefinition *definition = nullptr,
409  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
410  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
411 
412  private:
413 
414  QLineEdit *mDefaultLineEdit = nullptr;
415 
416 };
417 
418 class GUI_EXPORT QgsProcessingScaleWidgetWrapper : public QgsProcessingNumericWidgetWrapper
419 {
420  Q_OBJECT
421 
422  public:
423 
424  QgsProcessingScaleWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
425  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
426 
427  // QgsProcessingParameterWidgetFactoryInterface
428  QString parameterType() const override;
430  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
431  QgsProcessingContext &context,
432  const QgsProcessingParameterWidgetContext &widgetContext,
433  const QgsProcessingParameterDefinition *definition = nullptr,
434  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
435 
436  // QgsProcessingParameterWidgetWrapper interface
437  QWidget *createWidget() override SIP_FACTORY;
438  void setWidgetContext( const QgsProcessingParameterWidgetContext &context ) override;
439  protected:
440 
441  QVariant widgetValue() const override;
442  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
443 
444  private:
445 
446  QgsScaleWidget *mScaleWidget = nullptr;
447 
448  friend class TestProcessingGui;
449 };
450 
451 
452 class GUI_EXPORT QgsProcessingRangeParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
453 {
454  Q_OBJECT
455  public:
456 
457  QgsProcessingRangeParameterDefinitionWidget( QgsProcessingContext &context,
458  const QgsProcessingParameterWidgetContext &widgetContext,
459  const QgsProcessingParameterDefinition *definition = nullptr,
460  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
461  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
462 
463  private:
464 
465  QComboBox *mTypeComboBox = nullptr;
466  QLineEdit *mMinLineEdit = nullptr;
467  QLineEdit *mMaxLineEdit = nullptr;
468 
469 };
470 
471 class GUI_EXPORT QgsProcessingRangeWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
472 {
473  Q_OBJECT
474 
475  public:
476 
477  QgsProcessingRangeWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
478  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
479 
480  // QgsProcessingParameterWidgetFactoryInterface
481  QString parameterType() const override;
484  QgsProcessingContext &context,
485  const QgsProcessingParameterWidgetContext &widgetContext,
486  const QgsProcessingParameterDefinition *definition = nullptr,
487  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
488 
489  // QgsProcessingParameterWidgetWrapper interface
490  QWidget *createWidget() override SIP_FACTORY;
491 
492  protected:
493 
494  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
495  QVariant widgetValue() const override;
496  QStringList compatibleParameterTypes() const override;
497  QStringList compatibleOutputTypes() const override;
498  QString modelerExpressionFormatString() const override;
499 
500  protected:
501 
502  QgsDoubleSpinBox *mMinSpinBox = nullptr;
503  QgsDoubleSpinBox *mMaxSpinBox = nullptr;
504 
505  private:
506 
507  int mBlockChangedSignal = 0;
508  bool mAllowingNull = false;
509 
510  friend class TestProcessingGui;
511 };
512 
513 class GUI_EXPORT QgsProcessingMatrixParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
514 {
515  Q_OBJECT
516  public:
517 
518  QgsProcessingMatrixParameterDefinitionWidget( QgsProcessingContext &context,
519  const QgsProcessingParameterWidgetContext &widgetContext,
520  const QgsProcessingParameterDefinition *definition = nullptr,
521  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
522  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
523 
524  private:
525 
526  QgsProcessingMatrixModelerWidget *mMatrixWidget = nullptr;
527 
528 };
529 
530 class GUI_EXPORT QgsProcessingMatrixWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
531 {
532  Q_OBJECT
533 
534  public:
535 
536  QgsProcessingMatrixWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
537  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
538 
539  // QgsProcessingParameterWidgetFactoryInterface
540  QString parameterType() const override;
543  QgsProcessingContext &context,
544  const QgsProcessingParameterWidgetContext &widgetContext,
545  const QgsProcessingParameterDefinition *definition = nullptr,
546  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
547 
548  // QgsProcessingParameterWidgetWrapper interface
549  QWidget *createWidget() override SIP_FACTORY;
550 
551  protected:
552 
553  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
554  QVariant widgetValue() const override;
555 
556  QStringList compatibleParameterTypes() const override;
557  QStringList compatibleOutputTypes() const override;
558  QString modelerExpressionFormatString() const override;
559 
560  private:
561 
562  QgsProcessingMatrixParameterPanel *mMatrixWidget = nullptr;
563 
564  friend class TestProcessingGui;
565 };
566 
567 class GUI_EXPORT QgsProcessingFileParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
568 {
569  Q_OBJECT
570  public:
571 
572  QgsProcessingFileParameterDefinitionWidget( QgsProcessingContext &context,
573  const QgsProcessingParameterWidgetContext &widgetContext,
574  const QgsProcessingParameterDefinition *definition = nullptr,
575  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
576  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
577 
578  private:
579 
580  QComboBox *mTypeComboBox = nullptr;
581  QComboBox *mFilterComboBox = nullptr;
582  QgsFileWidget *mDefaultFileWidget = nullptr;
583 
584 };
585 
586 class GUI_EXPORT QgsProcessingFileWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
587 {
588  Q_OBJECT
589 
590  public:
591 
592  QgsProcessingFileWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
593  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
594 
595  // QgsProcessingParameterWidgetFactoryInterface
596  QString parameterType() const override;
599  QgsProcessingContext &context,
600  const QgsProcessingParameterWidgetContext &widgetContext,
601  const QgsProcessingParameterDefinition *definition = nullptr,
602  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
603 
604  // QgsProcessingParameterWidgetWrapper interface
605  QWidget *createWidget() override SIP_FACTORY;
606 
607  protected:
608 
609  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
610  QVariant widgetValue() const override;
611 
612  QStringList compatibleParameterTypes() const override;
613 
614  QStringList compatibleOutputTypes() const override;
615  QString modelerExpressionFormatString() const override;
616 
617  private:
618 
619  QgsFileWidget *mFileWidget = nullptr;
620 
621  friend class TestProcessingGui;
622 };
623 
624 
625 
626 class GUI_EXPORT QgsProcessingExpressionParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
627 {
628  Q_OBJECT
629  public:
630 
631  QgsProcessingExpressionParameterDefinitionWidget( QgsProcessingContext &context,
632  const QgsProcessingParameterWidgetContext &widgetContext,
633  const QgsProcessingParameterDefinition *definition = nullptr,
634  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
635  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
636 
637  private:
638 
639  QComboBox *mParentLayerComboBox = nullptr;
640  QgsExpressionLineEdit *mDefaultLineEdit = nullptr;
641 
642 };
643 
644 class GUI_EXPORT QgsProcessingExpressionWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
645 {
646  Q_OBJECT
647 
648  public:
649 
650  QgsProcessingExpressionWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
651  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
652 
653  // QgsProcessingParameterWidgetFactoryInterface
654  QString parameterType() const override;
657  QgsProcessingContext &context,
658  const QgsProcessingParameterWidgetContext &widgetContext,
659  const QgsProcessingParameterDefinition *definition = nullptr,
660  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
661 
662  // QgsProcessingParameterWidgetWrapper interface
663  QWidget *createWidget() override SIP_FACTORY;
664  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
665  public slots:
666  void setParentLayerWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
667  protected:
668 
669  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
670  QVariant widgetValue() const override;
671 
672  QStringList compatibleParameterTypes() const override;
673 
674  QStringList compatibleOutputTypes() const override;
675 
676  QString modelerExpressionFormatString() const override;
677  const QgsVectorLayer *linkedVectorLayer() const override;
678  private:
679 
680  QgsFieldExpressionWidget *mFieldExpWidget = nullptr;
681  QgsExpressionBuilderWidget *mExpBuilderWidget = nullptr;
682  QgsExpressionLineEdit *mExpLineEdit = nullptr;
683  std::unique_ptr< QgsVectorLayer > mParentLayer;
684 
685  friend class TestProcessingGui;
686 };
687 
688 
689 class GUI_EXPORT QgsProcessingEnumCheckboxPanelWidget : public QWidget
690 {
691  Q_OBJECT
692 
693  public:
694 
695  QgsProcessingEnumCheckboxPanelWidget( QWidget *parent = nullptr, const QgsProcessingParameterEnum *param = nullptr, int columns = 2 );
696  QVariant value() const;
697  void setValue( const QVariant &value );
698 
699  signals:
700 
701  void changed();
702 
703  private slots:
704 
705  void showPopupMenu();
706  void selectAll();
707  void deselectAll();
708 
709  private:
710 
711  const QgsProcessingParameterEnum *mParam = nullptr;
712  QMap< QVariant, QAbstractButton * > mButtons;
713  QButtonGroup *mButtonGroup = nullptr;
714  int mColumns = 2;
715  bool mBlockChangedSignal = false;
716 
717  friend class TestProcessingGui;
718 };
719 
720 class GUI_EXPORT QgsProcessingEnumPanelWidget : public QWidget
721 {
722  Q_OBJECT
723 
724  public:
725 
726  QgsProcessingEnumPanelWidget( QWidget *parent = nullptr, const QgsProcessingParameterEnum *param = nullptr );
727  QVariant value() const { return mValue; }
728  void setValue( const QVariant &value );
729 
730  signals:
731 
732  void changed();
733 
734  private slots:
735 
736  void showDialog();
737 
738  private:
739 
740  void updateSummaryText();
741 
742  const QgsProcessingParameterEnum *mParam = nullptr;
743  QLineEdit *mLineEdit = nullptr;
744  QToolButton *mToolButton = nullptr;
745 
746  QVariantList mValue;
747 
748  friend class TestProcessingGui;
749 };
750 
751 class GUI_EXPORT QgsProcessingEnumParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
752 {
753  Q_OBJECT
754  public:
755 
756  QgsProcessingEnumParameterDefinitionWidget( QgsProcessingContext &context,
757  const QgsProcessingParameterWidgetContext &widgetContext,
758  const QgsProcessingParameterDefinition *definition = nullptr,
759  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
760  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
761 
762  private:
763 
764  QgsProcessingEnumModelerWidget *mEnumWidget = nullptr;
765 
766 };
767 
768 class GUI_EXPORT QgsProcessingEnumWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
769 {
770  Q_OBJECT
771 
772  public:
773 
774  QgsProcessingEnumWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
775  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
776 
777  // QgsProcessingParameterWidgetFactoryInterface
778  QString parameterType() const override;
781  QgsProcessingContext &context,
782  const QgsProcessingParameterWidgetContext &widgetContext,
783  const QgsProcessingParameterDefinition *definition = nullptr,
784  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
785 
786  // QgsProcessingParameterWidgetWrapper interface
787  QWidget *createWidget() override SIP_FACTORY;
788 
789  protected:
790 
791  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
792  QVariant widgetValue() const override;
793 
794  QStringList compatibleParameterTypes() const override;
795 
796  QStringList compatibleOutputTypes() const override;
797 
798  QString modelerExpressionFormatString() const override;
799  private:
800 
801  QComboBox *mComboBox = nullptr;
802  QgsProcessingEnumPanelWidget *mPanel = nullptr;
803  QgsProcessingEnumCheckboxPanelWidget *mCheckboxPanel = nullptr;
804 
805  friend class TestProcessingGui;
806 };
807 
808 
809 
810 class GUI_EXPORT QgsProcessingLayoutWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
811 {
812  Q_OBJECT
813 
814  public:
815 
816  QgsProcessingLayoutWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
817  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
818 
819  // QgsProcessingParameterWidgetFactoryInterface
820  QString parameterType() const override;
822 
823  // QgsProcessingParameterWidgetWrapper interface
824  QWidget *createWidget() override SIP_FACTORY;
825 
826  protected:
827 
828  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
829  QVariant widgetValue() const override;
830  void setWidgetContext( const QgsProcessingParameterWidgetContext &context ) override;
831 
832  QStringList compatibleParameterTypes() const override;
833 
834  QStringList compatibleOutputTypes() const override;
835 
836  QString modelerExpressionFormatString() const override;
837  private:
838 
839  QgsLayoutComboBox *mComboBox = nullptr;
840  QComboBox *mPlainComboBox = nullptr;
841 
842  friend class TestProcessingGui;
843 };
844 
845 
846 
847 class GUI_EXPORT QgsProcessingLayoutItemParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
848 {
849  Q_OBJECT
850  public:
851 
852  QgsProcessingLayoutItemParameterDefinitionWidget( QgsProcessingContext &context,
853  const QgsProcessingParameterWidgetContext &widgetContext,
854  const QgsProcessingParameterDefinition *definition = nullptr,
855  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
856  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
857 
858  private:
859 
860  QComboBox *mParentLayoutComboBox = nullptr;
861 
862 };
863 
864 class GUI_EXPORT QgsProcessingLayoutItemWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
865 {
866  Q_OBJECT
867 
868  public:
869 
870  QgsProcessingLayoutItemWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
871  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
872 
873  // QgsProcessingParameterWidgetFactoryInterface
874  QString parameterType() const override;
877  QgsProcessingContext &context,
878  const QgsProcessingParameterWidgetContext &widgetContext,
879  const QgsProcessingParameterDefinition *definition = nullptr,
880  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
881 
882  // QgsProcessingParameterWidgetWrapper interface
883  QWidget *createWidget() override SIP_FACTORY;
884  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
885 
886 
887  public slots:
888  void setLayoutParameterValue( const QVariant &value );
889  void setLayout( QgsPrintLayout *layout );
890 
891  protected:
892 
893  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
894  QVariant widgetValue() const override;
895 
896  QStringList compatibleParameterTypes() const override;
897 
898  QStringList compatibleOutputTypes() const override;
899  QString modelerExpressionFormatString() const override;
900  private:
901 
902  QgsLayoutItemComboBox *mComboBox = nullptr;
903  QLineEdit *mLineEdit = nullptr;
904 
905  friend class TestProcessingGui;
906 };
907 
908 class GUI_EXPORT QgsProcessingPointMapTool : public QgsMapTool
909 {
910  Q_OBJECT
911  public:
912  QgsProcessingPointMapTool( QgsMapCanvas *canvas );
913  ~QgsProcessingPointMapTool() override;
914  void deactivate() override;
915  void canvasMoveEvent( QgsMapMouseEvent *e ) override;
916  void canvasPressEvent( QgsMapMouseEvent *e ) override;
917  void keyPressEvent( QKeyEvent *e ) override;
918 
919  signals:
920 
921  void clicked( const QgsPointXY &point );
922  void complete();
923 
924  private:
925 
926  std::unique_ptr<QgsSnapIndicator> mSnapIndicator;
927  friend class TestProcessingGui;
928 };
929 
930 class GUI_EXPORT QgsProcessingPointPanel : public QWidget
931 {
932  Q_OBJECT
933 
934  public:
935 
936  QgsProcessingPointPanel( QWidget *parent );
937  void setMapCanvas( QgsMapCanvas *canvas );
938  void setAllowNull( bool allowNull );
939 
940  QVariant value() const;
941  void clear();
942  void setValue( const QgsPointXY &point, const QgsCoordinateReferenceSystem &crs );
943 
944  signals:
945 
946  void toggleDialogVisibility( bool visible );
947  void changed();
948 
949  private slots:
950 
951  void selectOnCanvas();
952  void updatePoint( const QgsPointXY &point );
953  void pointPicked();
954 
955  private:
956 
957  QgsFilterLineEdit *mLineEdit = nullptr;
958  QToolButton *mButton = nullptr;
959  QgsMapCanvas *mCanvas = nullptr;
961  QPointer< QgsMapTool > mPrevTool;
962  std::unique_ptr< QgsProcessingPointMapTool > mTool;
963  friend class TestProcessingGui;
964 };
965 
966 
967 class GUI_EXPORT QgsProcessingPointParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
968 {
969  Q_OBJECT
970  public:
971 
972  QgsProcessingPointParameterDefinitionWidget( QgsProcessingContext &context,
973  const QgsProcessingParameterWidgetContext &widgetContext,
974  const QgsProcessingParameterDefinition *definition = nullptr,
975  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
976  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
977 
978  private:
979 
980  QLineEdit *mDefaultLineEdit = nullptr;
981 
982 };
983 
984 class GUI_EXPORT QgsProcessingPointWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
985 {
986  Q_OBJECT
987 
988  public:
989 
990  QgsProcessingPointWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
991  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
992 
993  // QgsProcessingParameterWidgetFactoryInterface
994  QString parameterType() const override;
997  QgsProcessingContext &context,
998  const QgsProcessingParameterWidgetContext &widgetContext,
999  const QgsProcessingParameterDefinition *definition = nullptr,
1000  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1001 
1002  // QgsProcessingParameterWidgetWrapper interface
1003  QWidget *createWidget() override SIP_FACTORY;
1004  void setWidgetContext( const QgsProcessingParameterWidgetContext &context ) override;
1005  void setDialog( QDialog *dialog ) override;
1006 
1007  protected:
1008 
1009  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1010  QVariant widgetValue() const override;
1011 
1012  QStringList compatibleParameterTypes() const override;
1013 
1014  QStringList compatibleOutputTypes() const override;
1015  QString modelerExpressionFormatString() const override;
1016  private:
1017 
1018  QgsProcessingPointPanel *mPanel = nullptr;
1019  QLineEdit *mLineEdit = nullptr;
1020  QDialog *mDialog = nullptr;
1021 
1022  friend class TestProcessingGui;
1023 };
1024 
1025 class GUI_EXPORT QgsProcessingGeometryParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1026 {
1027  Q_OBJECT
1028  public:
1029 
1030  QgsProcessingGeometryParameterDefinitionWidget( QgsProcessingContext &context,
1031  const QgsProcessingParameterWidgetContext &widgetContext,
1032  const QgsProcessingParameterDefinition *definition = nullptr,
1033  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1034  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1035 
1036  private:
1037 
1038  QLineEdit *mDefaultLineEdit = nullptr;
1039 
1040 };
1041 
1042 class GUI_EXPORT QgsProcessingGeometryWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1043 {
1044  Q_OBJECT
1045 
1046  public:
1047 
1048  QgsProcessingGeometryWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1049  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1050 
1051  // QgsProcessingParameterWidgetFactoryInterface
1052  QString parameterType() const override;
1055  QgsProcessingContext &context,
1056  const QgsProcessingParameterWidgetContext &widgetContext,
1057  const QgsProcessingParameterDefinition *definition = nullptr,
1058  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1059 
1060  // QgsProcessingParameterWidgetWrapper interface
1061  QWidget *createWidget() override SIP_FACTORY;
1062 
1063  protected:
1064 
1065  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1066  QVariant widgetValue() const override;
1067 
1068  QStringList compatibleParameterTypes() const override;
1069 
1070  QStringList compatibleOutputTypes() const override;
1071  QString modelerExpressionFormatString() const override;
1072  private:
1073 
1074  QLineEdit *mLineEdit = nullptr;
1075 
1076  friend class TestProcessingGui;
1077 };
1078 
1079 class GUI_EXPORT QgsProcessingExtentParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1080 {
1081  Q_OBJECT
1082  public:
1083 
1084  QgsProcessingExtentParameterDefinitionWidget( QgsProcessingContext &context,
1085  const QgsProcessingParameterWidgetContext &widgetContext,
1086  const QgsProcessingParameterDefinition *definition = nullptr,
1087  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1088  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1089 
1090  private:
1091 
1092  QgsExtentWidget *mDefaultWidget = nullptr;
1093 
1094 };
1095 
1096 class GUI_EXPORT QgsProcessingExtentWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1097 {
1098  Q_OBJECT
1099 
1100  public:
1101 
1102  QgsProcessingExtentWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1103  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1104 
1105  // QgsProcessingParameterWidgetFactoryInterface
1106  QString parameterType() const override;
1109  QgsProcessingContext &context,
1110  const QgsProcessingParameterWidgetContext &widgetContext,
1111  const QgsProcessingParameterDefinition *definition = nullptr,
1112  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1113 
1114  // QgsProcessingParameterWidgetWrapper interface
1115  QWidget *createWidget() override SIP_FACTORY;
1116  void setWidgetContext( const QgsProcessingParameterWidgetContext &context ) override;
1117  void setDialog( QDialog *dialog ) override;
1118 
1119  protected:
1120 
1121  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1122  QVariant widgetValue() const override;
1123 
1124  QStringList compatibleParameterTypes() const override;
1125 
1126  QStringList compatibleOutputTypes() const override;
1127  QString modelerExpressionFormatString() const override;
1128  private:
1129 
1130  QgsExtentWidget *mExtentWidget = nullptr;
1131  QDialog *mDialog = nullptr;
1132 
1133  friend class TestProcessingGui;
1134 };
1135 
1136 class GUI_EXPORT QgsProcessingColorParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1137 {
1138  Q_OBJECT
1139  public:
1140 
1141  QgsProcessingColorParameterDefinitionWidget( QgsProcessingContext &context,
1142  const QgsProcessingParameterWidgetContext &widgetContext,
1143  const QgsProcessingParameterDefinition *definition = nullptr,
1144  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1145  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1146 
1147  private:
1148 
1149  QgsColorButton *mDefaultColorButton = nullptr;
1150  QCheckBox *mAllowOpacity = nullptr;
1151 
1152 };
1153 
1154 class GUI_EXPORT QgsProcessingColorWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1155 {
1156  Q_OBJECT
1157 
1158  public:
1159 
1160  QgsProcessingColorWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1161  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1162 
1163  // QgsProcessingParameterWidgetFactoryInterface
1164  QString parameterType() const override;
1167  QgsProcessingContext &context,
1168  const QgsProcessingParameterWidgetContext &widgetContext,
1169  const QgsProcessingParameterDefinition *definition = nullptr,
1170  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1171 
1172  // QgsProcessingParameterWidgetWrapper interface
1173  QWidget *createWidget() override SIP_FACTORY;
1174 
1175  protected:
1176 
1177  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1178  QVariant widgetValue() const override;
1179 
1180  QStringList compatibleParameterTypes() const override;
1181 
1182  QStringList compatibleOutputTypes() const override;
1183  QString modelerExpressionFormatString() const override;
1184  private:
1185 
1186  QgsColorButton *mColorButton = nullptr;
1187  friend class TestProcessingGui;
1188 };
1189 
1190 
1191 
1192 class GUI_EXPORT QgsProcessingCoordinateOperationParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1193 {
1194  Q_OBJECT
1195  public:
1196 
1197  QgsProcessingCoordinateOperationParameterDefinitionWidget( QgsProcessingContext &context,
1198  const QgsProcessingParameterWidgetContext &widgetContext,
1199  const QgsProcessingParameterDefinition *definition = nullptr,
1200  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1201  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1202 
1203  private:
1204 
1205  QLineEdit *mDefaultLineEdit = nullptr;
1206 
1207  QComboBox *mSourceParamComboBox = nullptr;
1208  QComboBox *mDestParamComboBox = nullptr;
1209 
1210  QgsProjectionSelectionWidget *mStaticSourceWidget = nullptr;
1211  QgsProjectionSelectionWidget *mStaticDestWidget = nullptr;
1212 
1213 
1214 };
1215 
1216 class GUI_EXPORT QgsProcessingCoordinateOperationWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1217 {
1218  Q_OBJECT
1219 
1220  public:
1221 
1222  QgsProcessingCoordinateOperationWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1223  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1224 
1225  // QgsProcessingParameterWidgetFactoryInterface
1226  QString parameterType() const override;
1229  QgsProcessingContext &context,
1230  const QgsProcessingParameterWidgetContext &widgetContext,
1231  const QgsProcessingParameterDefinition *definition = nullptr,
1232  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1233 
1234  // QgsProcessingParameterWidgetWrapper interface
1235  QWidget *createWidget() override SIP_FACTORY;
1236  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
1237  void setWidgetContext( const QgsProcessingParameterWidgetContext &context ) override;
1238  protected:
1239 
1240  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1241  QVariant widgetValue() const override;
1242 
1243  QStringList compatibleParameterTypes() const override;
1244 
1245  QStringList compatibleOutputTypes() const override;
1246  QString modelerExpressionFormatString() const override;
1247  private:
1248 
1249  void setSourceCrsParameterValue( const QVariant &value );
1250  void setDestinationCrsParameterValue( const QVariant &value );
1251 
1252  QgsCoordinateOperationWidget *mOperationWidget = nullptr;
1253  QgsMapCanvas *mCanvas = nullptr;
1254  QLineEdit *mLineEdit = nullptr;
1255  QgsCoordinateReferenceSystem mSourceCrs;
1257  friend class TestProcessingGui;
1258 };
1259 
1260 class GUI_EXPORT QgsProcessingFieldPanelWidget : public QWidget
1261 {
1262  Q_OBJECT
1263 
1264  public:
1265 
1266  QgsProcessingFieldPanelWidget( QWidget *parent = nullptr, const QgsProcessingParameterField *param = nullptr );
1267 
1268  void setFields( const QgsFields &fields );
1269 
1270  QgsFields fields() const { return mFields; }
1271 
1272  QVariant value() const { return mValue; }
1273  void setValue( const QVariant &value );
1274 
1275  signals:
1276 
1277  void changed();
1278 
1279  private slots:
1280 
1281  void showDialog();
1282 
1283  private:
1284 
1285  void updateSummaryText();
1286 
1287  QgsFields mFields;
1288 
1289  const QgsProcessingParameterField *mParam = nullptr;
1290  QLineEdit *mLineEdit = nullptr;
1291  QToolButton *mToolButton = nullptr;
1292 
1293  QVariantList mValue;
1294 
1295  friend class TestProcessingGui;
1296 };
1297 
1298 class GUI_EXPORT QgsProcessingFieldParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1299 {
1300  Q_OBJECT
1301  public:
1302 
1303  QgsProcessingFieldParameterDefinitionWidget( QgsProcessingContext &context,
1304  const QgsProcessingParameterWidgetContext &widgetContext,
1305  const QgsProcessingParameterDefinition *definition = nullptr,
1306  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1307  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1308 
1309  private:
1310 
1311  QComboBox *mParentLayerComboBox = nullptr;
1312  QComboBox *mDataTypeComboBox = nullptr;
1313  QLineEdit *mDefaultLineEdit = nullptr;
1314  QCheckBox *mAllowMultipleCheckBox = nullptr;
1315  QCheckBox *mDefaultToAllCheckBox = nullptr;
1316 };
1317 
1318 class GUI_EXPORT QgsProcessingFieldWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1319 {
1320  Q_OBJECT
1321 
1322  public:
1323 
1324  QgsProcessingFieldWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1325  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1326 
1327  // QgsProcessingParameterWidgetFactoryInterface
1328  QString parameterType() const override;
1331  QgsProcessingContext &context,
1332  const QgsProcessingParameterWidgetContext &widgetContext,
1333  const QgsProcessingParameterDefinition *definition = nullptr,
1334  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1335 
1336  // QgsProcessingParameterWidgetWrapper interface
1337  QWidget *createWidget() override SIP_FACTORY;
1338  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
1339 
1340  public slots:
1341  void setParentLayerWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
1342 
1343  protected:
1344 
1345  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1346  QVariant widgetValue() const override;
1347 
1348  QStringList compatibleParameterTypes() const override;
1349 
1350  QStringList compatibleOutputTypes() const override;
1351  QString modelerExpressionFormatString() const override;
1352  const QgsVectorLayer *linkedVectorLayer() const override;
1353 
1354  private:
1355 
1356  QgsFieldComboBox *mComboBox = nullptr;
1357  QgsProcessingFieldPanelWidget *mPanel = nullptr;
1358  QLineEdit *mLineEdit = nullptr;
1359 
1360  std::unique_ptr< QgsVectorLayer > mParentLayer;
1361 
1362  QgsFields filterFields( const QgsFields &fields ) const;
1363 
1364  friend class TestProcessingGui;
1365 };
1366 
1367 
1368 class GUI_EXPORT QgsProcessingMapThemeParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1369 {
1370  Q_OBJECT
1371  public:
1372 
1373  QgsProcessingMapThemeParameterDefinitionWidget( QgsProcessingContext &context,
1374  const QgsProcessingParameterWidgetContext &widgetContext,
1375  const QgsProcessingParameterDefinition *definition = nullptr,
1376  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1377  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1378 
1379  private:
1380 
1381  QComboBox *mDefaultComboBox = nullptr;
1382 
1383 };
1384 
1385 class GUI_EXPORT QgsProcessingMapThemeWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1386 {
1387  Q_OBJECT
1388 
1389  public:
1390 
1391  QgsProcessingMapThemeWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1392  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1393 
1394  // QgsProcessingParameterWidgetFactoryInterface
1395  QString parameterType() const override;
1398  QgsProcessingContext &context,
1399  const QgsProcessingParameterWidgetContext &widgetContext,
1400  const QgsProcessingParameterDefinition *definition = nullptr,
1401  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1402 
1403  // QgsProcessingParameterWidgetWrapper interface
1404  QWidget *createWidget() override SIP_FACTORY;
1405 
1406  protected:
1407 
1408  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1409  QVariant widgetValue() const override;
1410 
1411  QStringList compatibleParameterTypes() const override;
1412 
1413  QStringList compatibleOutputTypes() const override;
1414  QString modelerExpressionFormatString() const override;
1415 
1416  private:
1417 
1418  QComboBox *mComboBox = nullptr;
1419 
1420  friend class TestProcessingGui;
1421 };
1422 
1423 
1424 class GUI_EXPORT QgsProcessingDateTimeParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1425 {
1426  Q_OBJECT
1427  public:
1428 
1429  QgsProcessingDateTimeParameterDefinitionWidget( QgsProcessingContext &context,
1430  const QgsProcessingParameterWidgetContext &widgetContext,
1431  const QgsProcessingParameterDefinition *definition = nullptr,
1432  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1433  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1434 
1435  private:
1436 
1437  QComboBox *mTypeComboBox = nullptr;
1438 
1439 };
1440 
1441 class GUI_EXPORT QgsProcessingDateTimeWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1442 {
1443  Q_OBJECT
1444 
1445  public:
1446 
1447  QgsProcessingDateTimeWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1448  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1449 
1450  // QgsProcessingParameterWidgetFactoryInterface
1451  QString parameterType() const override;
1453 
1454  // QgsProcessingParameterWidgetWrapper interface
1455  QWidget *createWidget() override SIP_FACTORY;
1456  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
1457  QgsProcessingContext &context,
1458  const QgsProcessingParameterWidgetContext &widgetContext,
1459  const QgsProcessingParameterDefinition *definition = nullptr,
1460  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1461 
1462  protected:
1463 
1464  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1465  QVariant widgetValue() const override;
1466 
1467  QStringList compatibleParameterTypes() const override;
1468 
1469  QStringList compatibleOutputTypes() const override;
1470  QString modelerExpressionFormatString() const override;
1471 
1472  private:
1473 
1474  QgsDateTimeEdit *mDateTimeEdit = nullptr;
1475  QgsDateEdit *mDateEdit = nullptr;
1476  QgsTimeEdit *mTimeEdit = nullptr;
1477 
1478  friend class TestProcessingGui;
1479 };
1480 
1481 
1482 
1483 //
1484 // QgsProcessingProviderConnectionWidgetWrapper
1485 //
1486 
1487 class GUI_EXPORT QgsProcessingProviderConnectionParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1488 {
1489  Q_OBJECT
1490  public:
1491 
1492  QgsProcessingProviderConnectionParameterDefinitionWidget( QgsProcessingContext &context,
1493  const QgsProcessingParameterWidgetContext &widgetContext,
1494  const QgsProcessingParameterDefinition *definition = nullptr,
1495  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1496  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1497 
1498  private:
1499 
1500  QComboBox *mProviderComboBox = nullptr;
1501  QLineEdit *mDefaultEdit = nullptr;
1502 
1503 };
1504 
1505 class GUI_EXPORT QgsProcessingProviderConnectionWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1506 {
1507  Q_OBJECT
1508 
1509  public:
1510 
1511  QgsProcessingProviderConnectionWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1512  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1513 
1514  // QgsProcessingParameterWidgetFactoryInterface
1515  QString parameterType() const override;
1517 
1518 
1519  // QgsProcessingParameterWidgetWrapper interface
1520  QWidget *createWidget() override SIP_FACTORY;
1521  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
1522  QgsProcessingContext &context,
1523  const QgsProcessingParameterWidgetContext &widgetContext,
1524  const QgsProcessingParameterDefinition *definition = nullptr,
1525  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1526 
1527  protected:
1528 
1529  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1530  QVariant widgetValue() const override;
1531 
1532  QStringList compatibleParameterTypes() const override;
1533 
1534  QStringList compatibleOutputTypes() const override;
1535  QString modelerExpressionFormatString() const override;
1536 
1537  private:
1538 
1539  QgsProviderConnectionComboBox *mProviderComboBox = nullptr;
1540  int mBlockSignals = 0;
1541 
1542  friend class TestProcessingGui;
1543 };
1544 
1545 
1546 
1547 class GUI_EXPORT QgsProcessingDatabaseSchemaParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1548 {
1549  Q_OBJECT
1550  public:
1551 
1552  QgsProcessingDatabaseSchemaParameterDefinitionWidget( QgsProcessingContext &context,
1553  const QgsProcessingParameterWidgetContext &widgetContext,
1554  const QgsProcessingParameterDefinition *definition = nullptr,
1555  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1556  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1557 
1558  private:
1559 
1560  QComboBox *mConnectionParamComboBox = nullptr;
1561  QLineEdit *mDefaultEdit = nullptr;
1562 
1563 };
1564 
1565 class GUI_EXPORT QgsProcessingDatabaseSchemaWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1566 {
1567  Q_OBJECT
1568 
1569  public:
1570 
1571  QgsProcessingDatabaseSchemaWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1572  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1573 
1574  // QgsProcessingParameterWidgetFactoryInterface
1575  QString parameterType() const override;
1577  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
1578 
1579 
1580  // QgsProcessingParameterWidgetWrapper interface
1581  QWidget *createWidget() override SIP_FACTORY;
1582  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
1583  QgsProcessingContext &context,
1584  const QgsProcessingParameterWidgetContext &widgetContext,
1585  const QgsProcessingParameterDefinition *definition = nullptr,
1586  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1587 
1588  public slots:
1589  void setParentConnectionWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
1590 
1591  protected:
1592 
1593  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1594  QVariant widgetValue() const override;
1595 
1596  QStringList compatibleParameterTypes() const override;
1597 
1598  QStringList compatibleOutputTypes() const override;
1599  QString modelerExpressionFormatString() const override;
1600 
1601  private:
1602 
1603  QgsDatabaseSchemaComboBox *mSchemaComboBox = nullptr;
1604  int mBlockSignals = 0;
1605 
1606  friend class TestProcessingGui;
1607 };
1608 
1609 
1610 
1611 
1612 class GUI_EXPORT QgsProcessingDatabaseTableParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1613 {
1614  Q_OBJECT
1615  public:
1616 
1617  QgsProcessingDatabaseTableParameterDefinitionWidget( QgsProcessingContext &context,
1618  const QgsProcessingParameterWidgetContext &widgetContext,
1619  const QgsProcessingParameterDefinition *definition = nullptr,
1620  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1621  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1622 
1623  private:
1624 
1625  QComboBox *mConnectionParamComboBox = nullptr;
1626  QComboBox *mSchemaParamComboBox = nullptr;
1627  QLineEdit *mDefaultEdit = nullptr;
1628 
1629 };
1630 
1631 class GUI_EXPORT QgsProcessingDatabaseTableWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1632 {
1633  Q_OBJECT
1634 
1635  public:
1636 
1637  QgsProcessingDatabaseTableWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1638  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1639 
1640  // QgsProcessingParameterWidgetFactoryInterface
1641  QString parameterType() const override;
1643  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
1644 
1645 
1646  // QgsProcessingParameterWidgetWrapper interface
1647  QWidget *createWidget() override SIP_FACTORY;
1648  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
1649  QgsProcessingContext &context,
1650  const QgsProcessingParameterWidgetContext &widgetContext,
1651  const QgsProcessingParameterDefinition *definition = nullptr,
1652  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1653 
1654  public slots:
1655  void setParentConnectionWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
1656  void setParentSchemaWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
1657 
1658  protected:
1659 
1660  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1661  QVariant widgetValue() const override;
1662 
1663  QStringList compatibleParameterTypes() const override;
1664 
1665  QStringList compatibleOutputTypes() const override;
1666  QString modelerExpressionFormatString() const override;
1667 
1668  private:
1669 
1670  QgsDatabaseTableComboBox *mTableComboBox = nullptr;
1671  int mBlockSignals = 0;
1672  QString mConnection;
1673  QString mProvider;
1674  QString mSchema;
1675 
1676  friend class TestProcessingGui;
1677 };
1678 
1679 class GUI_EXPORT QgsProcessingMapLayerParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1680 {
1681  Q_OBJECT
1682  public:
1683 
1684  QgsProcessingMapLayerParameterDefinitionWidget( QgsProcessingContext &context,
1685  const QgsProcessingParameterWidgetContext &widgetContext,
1686  const QgsProcessingParameterDefinition *definition = nullptr,
1687  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1688  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1689 
1690  private:
1691 
1692  QgsCheckableComboBox *mLayerTypeComboBox = nullptr;
1693 };
1694 
1695 class GUI_EXPORT QgsProcessingMapLayerWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1696 {
1697  Q_OBJECT
1698 
1699  public:
1700 
1701  QgsProcessingMapLayerWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1702  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1703 
1704  // QgsProcessingParameterWidgetFactoryInterface
1705  QString parameterType() const override;
1708  QgsProcessingContext &context,
1709  const QgsProcessingParameterWidgetContext &widgetContext,
1710  const QgsProcessingParameterDefinition *definition = nullptr,
1711  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1712 
1713  void setWidgetContext( const QgsProcessingParameterWidgetContext &context ) override;
1714  // QgsProcessingParameterWidgetWrapper interface
1715  QWidget *createWidget() override SIP_FACTORY;
1716  protected:
1717 
1718  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1719  QVariant widgetValue() const override;
1720 
1721  QStringList compatibleParameterTypes() const override;
1722 
1723  QStringList compatibleOutputTypes() const override;
1724  QString modelerExpressionFormatString() const override;
1725 
1726  private:
1727 
1728  QPointer< QgsProcessingMapLayerComboBox > mComboBox;
1729  int mBlockSignals = 0;
1730 
1731  friend class TestProcessingGui;
1732 };
1733 
1734 
1735 class GUI_EXPORT QgsProcessingRasterLayerWidgetWrapper : public QgsProcessingMapLayerWidgetWrapper
1736 {
1737  Q_OBJECT
1738 
1739  public:
1740 
1741  QgsProcessingRasterLayerWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1742  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1743 
1744  // QgsProcessingParameterWidgetFactoryInterface
1745  QString parameterType() const override;
1748  QgsProcessingContext &context,
1749  const QgsProcessingParameterWidgetContext &widgetContext,
1750  const QgsProcessingParameterDefinition *definition = nullptr,
1751  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1752 
1753  protected:
1754  QStringList compatibleParameterTypes() const override;
1755 
1756  QStringList compatibleOutputTypes() const override;
1757 
1758  QString modelerExpressionFormatString() const override;
1759 
1760 };
1761 
1762 
1763 class GUI_EXPORT QgsProcessingVectorLayerParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1764 {
1765  Q_OBJECT
1766  public:
1767 
1768  QgsProcessingVectorLayerParameterDefinitionWidget( QgsProcessingContext &context,
1769  const QgsProcessingParameterWidgetContext &widgetContext,
1770  const QgsProcessingParameterDefinition *definition = nullptr,
1771  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1772  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1773 
1774  private:
1775 
1776  QgsCheckableComboBox *mGeometryTypeComboBox = nullptr;
1777 };
1778 
1779 class GUI_EXPORT QgsProcessingVectorLayerWidgetWrapper : public QgsProcessingMapLayerWidgetWrapper
1780 {
1781  Q_OBJECT
1782 
1783  public:
1784 
1785  QgsProcessingVectorLayerWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1786  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1787 
1788  // QgsProcessingParameterWidgetFactoryInterface
1789  QString parameterType() const override;
1791  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
1792  QgsProcessingContext &context,
1793  const QgsProcessingParameterWidgetContext &widgetContext,
1794  const QgsProcessingParameterDefinition *definition = nullptr,
1795  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1796 
1797  protected:
1798  QStringList compatibleParameterTypes() const override;
1799 
1800  QStringList compatibleOutputTypes() const override;
1801 
1802  QString modelerExpressionFormatString() const override;
1803  QList< int > compatibleDataTypes( const QgsProcessingParameterDefinition *parameter ) const override;
1804 };
1805 
1806 
1807 class GUI_EXPORT QgsProcessingFeatureSourceParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1808 {
1809  Q_OBJECT
1810  public:
1811 
1812  QgsProcessingFeatureSourceParameterDefinitionWidget( QgsProcessingContext &context,
1813  const QgsProcessingParameterWidgetContext &widgetContext,
1814  const QgsProcessingParameterDefinition *definition = nullptr,
1815  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1816  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1817 
1818  private:
1819 
1820  QgsCheckableComboBox *mGeometryTypeComboBox = nullptr;
1821 };
1822 
1823 class GUI_EXPORT QgsProcessingFeatureSourceWidgetWrapper : public QgsProcessingMapLayerWidgetWrapper
1824 {
1825  Q_OBJECT
1826 
1827  public:
1828 
1829  QgsProcessingFeatureSourceWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1830  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1831 
1832  // QgsProcessingParameterWidgetFactoryInterface
1833  QString parameterType() const override;
1835  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
1836  QgsProcessingContext &context,
1837  const QgsProcessingParameterWidgetContext &widgetContext,
1838  const QgsProcessingParameterDefinition *definition = nullptr,
1839  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1840 
1841  protected:
1842  QStringList compatibleParameterTypes() const override;
1843 
1844  QStringList compatibleOutputTypes() const override;
1845 
1846  QString modelerExpressionFormatString() const override;
1847  QList< int > compatibleDataTypes( const QgsProcessingParameterDefinition *parameter ) const override;
1848 };
1849 
1850 
1851 class GUI_EXPORT QgsProcessingMeshLayerWidgetWrapper : public QgsProcessingMapLayerWidgetWrapper
1852 {
1853  Q_OBJECT
1854 
1855  public:
1856 
1857  QgsProcessingMeshLayerWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1858  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1859 
1860  // QgsProcessingParameterWidgetFactoryInterface
1861  QString parameterType() const override;
1863  QgsProcessingAbstractParameterDefinitionWidget *createParameterDefinitionWidget(
1864  QgsProcessingContext &context,
1865  const QgsProcessingParameterWidgetContext &widgetContext,
1866  const QgsProcessingParameterDefinition *definition = nullptr,
1867  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1868 
1869  protected:
1870  QStringList compatibleParameterTypes() const override;
1871 
1872  QStringList compatibleOutputTypes() const override;
1873 
1874  QString modelerExpressionFormatString() const override;
1875 
1876 };
1877 
1878 
1879 class GUI_EXPORT QgsProcessingRasterBandPanelWidget : public QWidget
1880 {
1881  Q_OBJECT
1882 
1883  public:
1884 
1885  QgsProcessingRasterBandPanelWidget( QWidget *parent = nullptr, const QgsProcessingParameterBand *param = nullptr );
1886 
1887  void setBands( const QList< int > &bands );
1888  void setBandNames( const QHash<int, QString > &names );
1889  QList< int > bands() const { return mBands; }
1890 
1891  QVariant value() const { return mValue; }
1892  void setValue( const QVariant &value );
1893 
1894  signals:
1895 
1896  void changed();
1897 
1898  private slots:
1899 
1900  void showDialog();
1901 
1902  private:
1903 
1904  void updateSummaryText();
1905 
1906  QList< int > mBands;
1907  QHash<int, QString > mBandNames;
1908 
1909  const QgsProcessingParameterBand *mParam = nullptr;
1910  QLineEdit *mLineEdit = nullptr;
1911  QToolButton *mToolButton = nullptr;
1912 
1913  QVariantList mValue;
1914 
1915  friend class TestProcessingGui;
1916 };
1917 
1918 class GUI_EXPORT QgsProcessingBandParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
1919 {
1920  Q_OBJECT
1921  public:
1922 
1923  QgsProcessingBandParameterDefinitionWidget( QgsProcessingContext &context,
1924  const QgsProcessingParameterWidgetContext &widgetContext,
1925  const QgsProcessingParameterDefinition *definition = nullptr,
1926  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1927  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
1928 
1929  private:
1930 
1931  QComboBox *mParentLayerComboBox = nullptr;
1932  QLineEdit *mDefaultLineEdit = nullptr;
1933  QCheckBox *mAllowMultipleCheckBox = nullptr;
1934 };
1935 
1936 class GUI_EXPORT QgsProcessingBandWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
1937 {
1938  Q_OBJECT
1939 
1940  public:
1941 
1942  QgsProcessingBandWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
1943  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
1944 
1945  // QgsProcessingParameterWidgetFactoryInterface
1946  QString parameterType() const override;
1949  QgsProcessingContext &context,
1950  const QgsProcessingParameterWidgetContext &widgetContext,
1951  const QgsProcessingParameterDefinition *definition = nullptr,
1952  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
1953 
1954  // QgsProcessingParameterWidgetWrapper interface
1955  QWidget *createWidget() override SIP_FACTORY;
1956  void postInitialize( const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers ) override;
1957 
1958  public slots:
1959  void setParentLayerWrapperValue( const QgsAbstractProcessingParameterWidgetWrapper *parentWrapper );
1960 
1961  protected:
1962 
1963  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
1964  QVariant widgetValue() const override;
1965 
1966  QStringList compatibleParameterTypes() const override;
1967 
1968  QStringList compatibleOutputTypes() const override;
1969  QString modelerExpressionFormatString() const override;
1970 
1971  private:
1972 
1973  QgsRasterBandComboBox *mComboBox = nullptr;
1974  QgsProcessingRasterBandPanelWidget *mPanel = nullptr;
1975  QLineEdit *mLineEdit = nullptr;
1976 
1977  std::unique_ptr< QgsRasterLayer > mParentLayer;
1978 
1979  friend class TestProcessingGui;
1980 };
1981 
1982 
1983 
1984 class GUI_EXPORT QgsProcessingMultipleLayerPanelWidget : public QWidget
1985 {
1986  Q_OBJECT
1987 
1988  public:
1989 
1990  QgsProcessingMultipleLayerPanelWidget( QWidget *parent = nullptr, const QgsProcessingParameterMultipleLayers *param = nullptr );
1991 
1992  QVariant value() const { return mValue; }
1993  void setValue( const QVariant &value );
1994 
1995  void setProject( QgsProject *project );
1996  void setModel( QgsProcessingModelAlgorithm *model, const QString &modelChildAlgorithmID );
1997 
1998  signals:
1999 
2000  void changed();
2001 
2002  private slots:
2003 
2004  void showDialog();
2005 
2006  private:
2007 
2008  void updateSummaryText();
2009 
2010  const QgsProcessingParameterMultipleLayers *mParam = nullptr;
2011  QLineEdit *mLineEdit = nullptr;
2012  QToolButton *mToolButton = nullptr;
2013 
2014  QVariantList mValue;
2015  QList< QgsProcessingModelChildParameterSource > mModelSources;
2016  QgsProcessingModelAlgorithm *mModel = nullptr;
2017 
2018  QgsProject *mProject = nullptr;
2019 
2020  friend class TestProcessingGui;
2021 };
2022 
2023 class GUI_EXPORT QgsProcessingMultipleLayerParameterDefinitionWidget : public QgsProcessingAbstractParameterDefinitionWidget
2024 {
2025  Q_OBJECT
2026  public:
2027 
2028  QgsProcessingMultipleLayerParameterDefinitionWidget( QgsProcessingContext &context,
2029  const QgsProcessingParameterWidgetContext &widgetContext,
2030  const QgsProcessingParameterDefinition *definition = nullptr,
2031  const QgsProcessingAlgorithm *algorithm = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
2032  QgsProcessingParameterDefinition *createParameter( const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags ) const override;
2033 
2034  private:
2035 
2036  QComboBox *mLayerTypeComboBox = nullptr;
2037 };
2038 
2039 class GUI_EXPORT QgsProcessingMultipleLayerWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
2040 {
2041  Q_OBJECT
2042 
2043  public:
2044 
2045  QgsProcessingMultipleLayerWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
2046  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
2047 
2048  // QgsProcessingParameterWidgetFactoryInterface
2049  QString parameterType() const override;
2052  QgsProcessingContext &context,
2053  const QgsProcessingParameterWidgetContext &widgetContext,
2054  const QgsProcessingParameterDefinition *definition = nullptr,
2055  const QgsProcessingAlgorithm *algorithm = nullptr ) override;
2056 
2057  // QgsProcessingParameterWidgetWrapper interface
2058  QWidget *createWidget() override SIP_FACTORY;
2059  void setWidgetContext( const QgsProcessingParameterWidgetContext &context ) override;
2060 
2061  protected:
2062 
2063  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
2064  QVariant widgetValue() const override;
2065 
2066  QStringList compatibleParameterTypes() const override;
2067 
2068  QStringList compatibleOutputTypes() const override;
2069  QString modelerExpressionFormatString() const override;
2070 
2071  private:
2072 
2073  QgsProcessingMultipleLayerPanelWidget *mPanel = nullptr;
2074 
2075  friend class TestProcessingGui;
2076 };
2077 
2078 
2079 
2080 class GUI_EXPORT QgsProcessingOutputWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
2081 {
2082  Q_OBJECT
2083 
2084  public:
2085 
2086  QgsProcessingOutputWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
2087  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
2088 
2089  // QgsProcessingParameterWidgetWrapper interface
2090  QWidget *createWidget() override SIP_FACTORY;
2091  protected:
2092 
2093  void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
2094  QVariant widgetValue() const override;
2095  QVariantMap customProperties() const override;
2096 
2097  QStringList compatibleParameterTypes() const override;
2098 
2099  QStringList compatibleOutputTypes() const override;
2100 
2101  private:
2102 
2103  QgsProcessingLayerOutputDestinationWidget *mOutputWidget = nullptr;
2104  int mBlockSignals = 0;
2105 
2106  friend class TestProcessingGui;
2107 };
2108 
2109 
2110 class GUI_EXPORT QgsProcessingFeatureSinkWidgetWrapper : public QgsProcessingOutputWidgetWrapper
2111 {
2112  Q_OBJECT
2113 
2114  public:
2115 
2116  QgsProcessingFeatureSinkWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
2117  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
2118 
2119  // QgsProcessingParameterWidgetFactoryInterface
2120  QString parameterType() const override;
2122 
2123  protected:
2124  QString modelerExpressionFormatString() const override;
2125 
2126  private:
2127  QgsProcessingContext mContext;
2128 
2129 };
2130 
2131 class GUI_EXPORT QgsProcessingVectorDestinationWidgetWrapper : public QgsProcessingOutputWidgetWrapper
2132 {
2133  Q_OBJECT
2134 
2135  public:
2136 
2137  QgsProcessingVectorDestinationWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
2138  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
2139 
2140  // QgsProcessingParameterWidgetFactoryInterface
2141  QString parameterType() const override;
2143 
2144  protected:
2145  QString modelerExpressionFormatString() const override;
2146 
2147 };
2148 
2149 class GUI_EXPORT QgsProcessingRasterDestinationWidgetWrapper : public QgsProcessingOutputWidgetWrapper
2150 {
2151  Q_OBJECT
2152 
2153  public:
2154 
2155  QgsProcessingRasterDestinationWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
2156  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
2157 
2158  // QgsProcessingParameterWidgetFactoryInterface
2159  QString parameterType() const override;
2161 
2162  protected:
2163  QString modelerExpressionFormatString() const override;
2164 
2165 };
2166 
2167 class GUI_EXPORT QgsProcessingFileDestinationWidgetWrapper : public QgsProcessingOutputWidgetWrapper
2168 {
2169  Q_OBJECT
2170 
2171  public:
2172 
2173  QgsProcessingFileDestinationWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
2174  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
2175 
2176  // QgsProcessingParameterWidgetFactoryInterface
2177  QString parameterType() const override;
2179 
2180  protected:
2181  QString modelerExpressionFormatString() const override;
2182 
2183 };
2184 
2185 class GUI_EXPORT QgsProcessingFolderDestinationWidgetWrapper : public QgsProcessingOutputWidgetWrapper
2186 {
2187  Q_OBJECT
2188 
2189  public:
2190 
2191  QgsProcessingFolderDestinationWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
2192  QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
2193 
2194  // QgsProcessingParameterWidgetFactoryInterface
2195  QString parameterType() const override;
2197 
2198  protected:
2199  QString modelerExpressionFormatString() const override;
2200 
2201 };
2202 
2204 
2205 #endif // QGSPROCESSINGWIDGETWRAPPERIMPL_H
QgsDateTimeEdit
The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times.
Definition: qgsdatetimeedit.h:37
QgsProcessingParameterWidgetContext
Contains settings which reflect the context in which a Processing parameter widget is shown,...
Definition: qgsprocessingwidgetwrapper.h:100
QgsLayoutItemComboBox
The QgsLayoutItemComboBox class is a combo box which displays items of a matching type from a layout.
Definition: qgslayoutitemcombobox.h:35
QgsCoordinateOperationWidget
A widget for selecting the coordinate operation to use when transforming between a source and destina...
Definition: qgscoordinateoperationwidget.h:34
QgsAbstractProcessingParameterWidgetWrapper::createWidget
virtual QWidget * createWidget()=0
Creates a new widget which allows customization of the parameter's value.
QgsLayoutComboBox
The QgsLayoutComboBox class is a combo box which displays available layouts from a QgsLayoutManager.
Definition: qgslayoutcombobox.h:31
qgsprocessingparameterdefinitionwidget.h
QgsExpressionBuilderWidget
A reusable widget that can be used to build a expression string.
Definition: qgsexpressionbuilderwidget.h:43
algorithm
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
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:51
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:45
QgsAbstractProcessingParameterWidgetWrapper::setWidgetContext
virtual void setWidgetContext(const QgsProcessingParameterWidgetContext &context)
Sets the context in which the Processing parameter widget is shown, e.g., the parent model algorithm,...
Definition: qgsprocessingwidgetwrapper.cpp:121
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:85
QgsFilterLineEdit
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
Definition: qgsfilterlineedit.h:40
QgsProviderConnectionComboBox
The QgsProviderConnectionComboBox class is a combo box which displays the list of connections registe...
Definition: qgsproviderconnectioncombobox.h:50
QgsProjectionSelectionWidget
A widget for selecting a projection.
Definition: qgsprojectionselectionwidget.h:39
QgsProcessingParameterDefinition
Base class for the definition of processing parameters.
Definition: qgsprocessingparameters.h:331
QgsDatabaseSchemaComboBox
The QgsDatabaseSchemaComboBox class is a combo box which displays the list of schemas for a specific ...
Definition: qgsdatabaseschemacombobox.h:51
QgsAbstractProcessingParameterWidgetWrapper
A widget wrapper for Processing parameter value widgets.
Definition: qgsprocessingwidgetwrapper.h:267
QgsProcessingParameterMultipleLayers
A parameter for processing algorithms which accepts multiple map layers.
Definition: qgsprocessingparameters.h:1878
QgsProcessingParameterWidgetFactoryInterface::createWidgetWrapper
virtual QgsAbstractProcessingParameterWidgetWrapper * createWidgetWrapper(const QgsProcessingParameterDefinition *parameter, QgsProcessingGui::WidgetType type)=0
Creates a new widget wrapper for the specified parameter definition.
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:95
QgsSnapIndicator
Class that shows snapping marker on map canvas for the current snapping match.
Definition: qgssnapindicator.h:33
QgsProcessingGui::Standard
@ Standard
Standard algorithm dialog.
Definition: qgsprocessinggui.h:40
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsMapTool
Abstract base class for all map tools.
Definition: qgsmaptool.h:64
geos::unique_ptr
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Definition: qgsgeos.h:79
QgsDateEdit
The QgsDateEdit class is a QDateEdit widget with the capability of setting/reading null dates.
Definition: qgsdatetimeedit.h:273
QgsPrintLayout
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Definition: qgsprintlayout.h:31
QgsRasterBandComboBox
A combobox widget which displays the bands present in a raster layer.
Definition: qgsrasterbandcombobox.h:34
QgsProcessingParameterWidgetFactoryInterface::modelerExpressionFormatString
virtual QString modelerExpressionFormatString() const
Returns the expected expression format string for expression results for the parameter within model c...
Definition: qgsprocessingwidgetwrapper.cpp:378
QgsProcessingParameterWidgetFactoryInterface::parameterType
virtual QString parameterType() const =0
Returns the type string for the parameter type the factory is associated with.
QgsProcessingContext
Contains information about the context in which a processing algorithm is executed.
Definition: qgsprocessingcontext.h:44
qgsmaptool.h
QgsProcessingAbstractParameterDefinitionWidget::createParameter
virtual QgsProcessingParameterDefinition * createParameter(const QString &name, const QString &description, QgsProcessingParameterDefinition::Flags flags) const =0
Returns a new instance of a parameter definition, using the current settings defined in the dialog.
qgsprocessingwidgetwrapper.h
QgsUnitTypes
Helper functions for various unit types.
Definition: qgsunittypes.h:39
QgsFieldComboBox
The QgsFieldComboBox is a combo box which displays the list of fields of a given layer.
Definition: qgsfieldcombobox.h:39
QgsScaleWidget
A combobox which lets the user select map scale from predefined list and highlights nearest to curren...
Definition: qgsscalewidget.h:35
QgsRasterLayer
Represents a raster layer.
Definition: qgsrasterlayer.h:71
QgsAuthConfigSelect::QgsAuthConfigSelect
QgsAuthConfigSelect(QWidget *parent=nullptr, const QString &dataprovider=QString())
Create a dialog for setting an associated authentication config, either from existing configs,...
Definition: qgsauthconfigselect.cpp:32
QgsExtentWidget
A widget for configuration of a map extent.
Definition: qgsextentwidget.h:51
QgsProcessingAbstractParameterDefinitionWidget
Abstract base class for widgets which allow users to specify the properties of a Processing parameter...
Definition: qgsprocessingparameterdefinitionwidget.h:44
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:206
QgsSpinBox
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Definition: qgsspinbox.h:43
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:44
QgsTimeEdit
The QgsTimeEdit class is a QTimeEdit widget with the capability of setting/reading null date/times.
Definition: qgsdatetimeedit.h:227
QgsDatabaseTableComboBox
The QgsDatabaseTableComboBox class is a combo box which displays the list of tables for a specific da...
Definition: qgsdatabasetablecombobox.h:51
QgsMapMouseEvent
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
Definition: qgsmapmouseevent.h:36
QgsProcessingGui::WidgetType
WidgetType
Types of dialogs which Processing widgets can be created for.
Definition: qgsprocessinggui.h:39
QgsProcessingParameterWidgetFactoryInterface
An interface for Processing widget wrapper factories.
Definition: qgsprocessingwidgetwrapper.h:515
QgsProcessingAlgorithm
Abstract base class for processing algorithms.
Definition: qgsprocessingalgorithm.h:52
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
QgsColorButton
A cross platform button subclass for selecting colors.
Definition: qgscolorbutton.h:36
QgsExpressionLineEdit
The QgsExpressionLineEdit widget includes a line edit for entering expressions together with a button...
Definition: qgsexpressionlineedit.h:49
QgsProcessingParameterWidgetFactoryInterface::compatibleOutputTypes
virtual QStringList compatibleOutputTypes() const =0
Returns a list of compatible Processing output types for inputs for this parameter.
QgsDoubleSpinBox
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Definition: qgsdoublespinbox.h:43
QgsProcessingParameterBand
A raster band parameter for Processing algorithms.
Definition: qgsprocessingparameters.h:3225
qgsprocessingcontext.h
QgsProcessingParameterWidgetFactoryInterface::createParameterDefinitionWidget
virtual QgsProcessingAbstractParameterDefinitionWidget * createParameterDefinitionWidget(QgsProcessingContext &context, const QgsProcessingParameterWidgetContext &widgetContext, const QgsProcessingParameterDefinition *definition=nullptr, const QgsProcessingAlgorithm *algorithm=nullptr)
Creates a new parameter definition widget allowing for configuration of an instance of the parameter ...
Definition: qgsprocessingwidgetwrapper.cpp:366
QgsCheckableComboBox
QComboBox subclass which allows selecting multiple items.
Definition: qgscheckablecombobox.h:125
QgsProcessingParameterWidgetFactoryInterface::compatibleParameterTypes
virtual QStringList compatibleParameterTypes() const =0
Returns a list of compatible Processing parameter types for inputs for this parameter.
QgsProcessingParameterEnum
An enum based parameter for processing algorithms, allowing for selection from predefined values.
Definition: qgsprocessingparameters.h:2256
QgsFieldExpressionWidget
The QgsFieldExpressionWidget class reates a widget to choose fields and edit expressions It contains ...
Definition: qgsfieldexpressionwidget.h:47
QgsFileWidget
The QgsFileWidget class creates a widget for selecting a file or a folder.
Definition: qgsfilewidget.h:37
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
QgsProcessingParameterField
A vector layer or feature source field parameter for processing algorithms.
Definition: qgsprocessingparameters.h:2617
QgsAbstractProcessingParameterWidgetWrapper::postInitialize
virtual void postInitialize(const QList< QgsAbstractProcessingParameterWidgetWrapper * > &wrappers)
Called after all wrappers have been created within a particular dialog or context,...
Definition: qgsprocessingwidgetwrapper.cpp:252