QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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#define SIP_NO_FILE
20
21#include "ui_qgsprocessingenummodelerwidgetbase.h"
22
23#include "qgis.h"
24#include "qgis_gui.h"
25
26#include <QStandardItem>
27#include <QStandardItemModel>
28
30
37class GUI_EXPORT QgsProcessingEnumModelerWidget : public QWidget, private Ui::QgsProcessingEnumModelerWidgetBase
38{
39 Q_OBJECT
40
41 public:
45 QgsProcessingEnumModelerWidget( QWidget *parent = nullptr );
46
52 QStringList options() const;
53
59 void setOptions( const QStringList &options );
60
66 QVariant defaultOptions() const;
67
73 void setDefaultOptions( const QVariant &defaultValue );
74
79 bool allowMultiple() const;
80
85 void setAllowMultiple( bool allowMultiple );
86
87 private slots:
88
89 void addItem();
90 void removeItems( const bool removeAll );
91 void onItemChanged( QStandardItem *item );
92
93 private:
94 QStandardItemModel *mModel = nullptr;
95
96 friend class TestProcessingGui;
97};
98
100
101#endif // QGSPROCESSINGENUMMODELERWIDGET_H