QGIS API Documentation 3.99.0-Master (18a1e75d814)
Loading...
Searching...
No Matches
qgsprocessingmatrixmodelerwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingmatrixmodelerwidget.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 QGSPROCESSINGMATRIXMODELERWIDGET_H
17#define QGSPROCESSINGMATRIXMODELERWIDGET_H
18
19
20#include "ui_qgsprocessingmatrixmodelerwidgetbase.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 QgsProcessingMatrixModelerWidget : public QWidget, private Ui::QgsProcessingMatrixModelerWidgetBase
39{
40 Q_OBJECT
41
42 public:
46 QgsProcessingMatrixModelerWidget( QWidget *parent = nullptr );
47
51 QStringList headers() const;
52
58 QVariant value() const;
59
65 void setValue( const QStringList &headers, const QVariant &defaultValue );
66
71 bool fixedRows() const;
72
77 void setFixedRows( bool fixedRows );
78
79 signals:
80
86 void changed();
87
88 private slots:
89
90 void addColumn();
91 void removeColumns();
92 void addRow();
93 void removeRows();
94 void clearTable();
95 void changeHeader( int index );
96
97 private:
98 QStandardItemModel *mModel = nullptr;
99
100 friend class TestProcessingGui;
101};
102
104
105#endif // QGSPROCESSINGMATRIXMODELERWIDGET_H