QGIS API Documentation 3.41.0-Master (af5edcb665c)
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 QgsProcessingRasterOptionsWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr, QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = nullptr );
46
47 // QgsProcessingParameterWidgetFactoryInterface
48 QString parameterType() const override;
50
51 // QgsProcessingParameterWidgetWrapper interface
52 QWidget *createWidget() override SIP_FACTORY;
53
54 protected:
55 void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
56 QVariant widgetValue() const override;
57
58 QStringList compatibleParameterTypes() const override;
59 QStringList compatibleOutputTypes() const override;
60
61 private:
62 QLineEdit *mLineEdit = nullptr;
63 QgsRasterFormatSaveOptionsWidget *mOptionsWidget = nullptr;
64
65 friend class TestProcessingGui;
66};
67
69
70#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