QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgsprocessingrasteroptionswidgetwrapper.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingrasteroptionswidgetwrapper.h
3 ---------------------
4 begin : November 2020
5 copyright : (C) 2020 by Alexander Bruy
6 email : alexander dot bruy 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#ifndef QGSPROCESSINGRASTEROPTIONSWIDGETWRAPPER_H
19#define QGSPROCESSINGRASTEROPTIONSWIDGETWRAPPER_H
20
21#define SIP_NO_FILE
22
24
25class QComboBox;
26class QLineEdit;
28
30
40class GUI_EXPORT QgsProcessingRasterOptionsWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
41{
42 Q_OBJECT
43
44 public:
45
46 QgsProcessingRasterOptionsWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr,
47 QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
48
49 // QgsProcessingParameterWidgetFactoryInterface
50 QString parameterType() const override;
52
53 // QgsProcessingParameterWidgetWrapper interface
54 QWidget *createWidget() override SIP_FACTORY;
55
56 protected:
57
58 void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
59 QVariant widgetValue() const override;
60
61 QStringList compatibleParameterTypes() const override;
62 QStringList compatibleOutputTypes() const override;
63
64 private:
65
66 QLineEdit *mLineEdit = nullptr;
67 QgsRasterFormatSaveOptionsWidget *mOptionsWidget = nullptr;
68
69 friend class TestProcessingGui;
70};
71
73
74#endif // QGSPROCESSINGRASTEROPTIONSWIDGETWRAPPER_H
A widget wrapper for Processing parameter value widgets.
virtual QWidget * createWidget()=0
Creates a new widget which allows customization of the parameter's value.
Contains information about the context in which a processing algorithm is executed.
WidgetType
Types of dialogs which Processing widgets can be created for.
@ Standard
Standard algorithm dialog.
Base class for the definition of processing parameters.
An interface for Processing widget wrapper factories.
virtual QgsAbstractProcessingParameterWidgetWrapper * createWidgetWrapper(const QgsProcessingParameterDefinition *parameter, QgsProcessingGui::WidgetType type)=0
Creates a new widget wrapper for the specified parameter definition.
virtual QString parameterType() const =0
Returns the type string for the parameter type the factory is associated with.
A widget to select format-specific raster saving options.
#define SIP_FACTORY
Definition qgis_sip.h:76