QGIS API Documentation 3.41.0-Master (af5edcb665c)
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:
43 QgsProcessingEnumModelerWidget( QWidget *parent = nullptr );
44
50 QStringList options() const;
51
57 void setOptions( const QStringList &options );
58
64 QVariant defaultOptions() const;
65
71 void setDefaultOptions( const QVariant &defaultValue );
72
77 bool allowMultiple() const;
78
83 void setAllowMultiple( bool allowMultiple );
84
85 private slots:
86
87 void addItem();
88 void removeItems( const bool removeAll );
89 void onItemChanged( QStandardItem *item );
90
91 private:
92 QStandardItemModel *mModel = nullptr;
93
94 friend class TestProcessingGui;
95};
96
98
99#endif // QGSPROCESSINGENUMMODELERWIDGET_H