QGIS API Documentation 3.99.0-Master (18a1e75d814)
Loading...
Searching...
No Matches
qgsprocessingenummodelerwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingenummodelerwidget.h
3 ----------------------------------
4 Date : March 2020
5 Copyright : (C) 2020 Alexander Bruy
6 Email : alexander dot bruy at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSPROCESSINGENUMMODELERWIDGET_H
17#define QGSPROCESSINGENUMMODELERWIDGET_H
18
19
20#include "ui_qgsprocessingenummodelerwidgetbase.h"
21
22#include "qgis.h"
23#include "qgis_gui.h"
24
25#include <QStandardItem>
26#include <QStandardItemModel>
27
28#define SIP_NO_FILE
29
31
38class GUI_EXPORT QgsProcessingEnumModelerWidget : public QWidget, private Ui::QgsProcessingEnumModelerWidgetBase
39{
40 Q_OBJECT
41
42 public:
46 QgsProcessingEnumModelerWidget( QWidget *parent = nullptr );
47
53 QStringList options() const;
54
60 void setOptions( const QStringList &options );
61
67 QVariant defaultOptions() const;
68
74 void setDefaultOptions( const QVariant &defaultValue );
75
80 bool allowMultiple() const;
81
86 void setAllowMultiple( bool allowMultiple );
87
88 signals:
89
95 void changed();
96
97 private slots:
98
99 void addItem();
100 void removeItems( const bool removeAll );
101 void onItemChanged( QStandardItem *item );
102
103 private:
104 QStandardItemModel *mModel = nullptr;
105
106 friend class TestProcessingGui;
107};
108
110
111#endif // QGSPROCESSINGENUMMODELERWIDGET_H