QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
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 "qgis.h"
22#include "qgis_gui.h"
23#include "ui_qgsprocessingenummodelerwidgetbase.h"
24#include <QStandardItem>
25#include <QStandardItemModel>
26
28
35class GUI_EXPORT QgsProcessingEnumModelerWidget : public QWidget, private Ui::QgsProcessingEnumModelerWidgetBase
36{
37 Q_OBJECT
38
39 public:
40
44 QgsProcessingEnumModelerWidget( QWidget *parent = nullptr );
45
51 QStringList options() const;
52
58 void setOptions( const QStringList &options );
59
65 QVariant defaultOptions() const;
66
72 void setDefaultOptions( const QVariant &defaultValue );
73
78 bool allowMultiple() const;
79
84 void setAllowMultiple( bool allowMultiple );
85
86 private slots:
87
88 void addItem();
89 void removeItems( const bool removeAll );
90 void onItemChanged( QStandardItem *item );
91
92 private:
93 QStandardItemModel *mModel = nullptr;
94
95 friend class TestProcessingGui;
96};
97
99
100#endif // QGSPROCESSINGENUMMODELERWIDGET_H