QGIS API Documentation 3.99.0-Master (a8f284845db)
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
23
24#define SIP_NO_FILE
25
26class QComboBox;
27class QLineEdit;
29
31
41class GUI_EXPORT QgsProcessingRasterOptionsWidgetWrapper : public QgsAbstractProcessingParameterWidgetWrapper, public QgsProcessingParameterWidgetFactoryInterface
42{
43 Q_OBJECT
44
45 public:
46 QgsProcessingRasterOptionsWidgetWrapper( const QgsProcessingParameterDefinition *parameter = nullptr, Qgis::ProcessingMode type = Qgis::ProcessingMode::Standard, QWidget *parent = nullptr );
47
48 // QgsProcessingParameterWidgetFactoryInterface
49 QString parameterType() const override;
51
52 // QgsProcessingParameterWidgetWrapper interface
53 QWidget *createWidget() override SIP_FACTORY;
54
55 protected:
56 void setWidgetValue( const QVariant &value, QgsProcessingContext &context ) override;
57 QVariant widgetValue() const override;
58
59 private:
60 QLineEdit *mLineEdit = nullptr;
61 QgsRasterFormatSaveOptionsWidget *mOptionsWidget = nullptr;
62
63 friend class TestProcessingGui;
64};
65
67
68#endif // QGSPROCESSINGRASTEROPTIONSWIDGETWRAPPER_H
ProcessingMode
Types of modes which Processing widgets can be created for.
Definition qgis.h:3757
@ Standard
Standard (single-run) algorithm mode.
Definition qgis.h:3758
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.
Base class for the definition of processing parameters.
An interface for Processing widget wrapper factories.
virtual QString parameterType() const =0
Returns the type string for the parameter type the factory is associated with.
virtual QgsAbstractProcessingParameterWidgetWrapper * createWidgetWrapper(const QgsProcessingParameterDefinition *parameter, Qgis::ProcessingMode type)=0
Creates a new widget wrapper for the specified parameter definition.
A widget to select format-specific raster saving options.
#define SIP_FACTORY
Definition qgis_sip.h:83