QGIS API Documentation 3.41.0-Master (3440c17df1d)
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#define SIP_NO_FILE
20
21#include "qgis.h"
22#include "qgis_gui.h"
23#include "ui_qgsprocessingmatrixmodelerwidgetbase.h"
24#include <QStandardItem>
25#include <QStandardItemModel>
26
28
35class GUI_EXPORT QgsProcessingMatrixModelerWidget : public QWidget, private Ui::QgsProcessingMatrixModelerWidgetBase
36{
37 Q_OBJECT
38
39 public:
40
44 QgsProcessingMatrixModelerWidget( QWidget *parent = nullptr );
45
49 QStringList headers() const;
50
56 QVariant value() const;
57
63 void setValue( const QStringList &headers, const QVariant &defaultValue );
64
69 bool fixedRows() const;
70
75 void setFixedRows( bool fixedRows );
76
77 private slots:
78
79 void addColumn();
80 void removeColumns();
81 void addRow();
82 void removeRows();
83 void clearTable();
84 void changeHeader( int index );
85
86 private:
87 QStandardItemModel *mModel = nullptr;
88
89 friend class TestProcessingGui;
90};
91
93
94#endif // QGSPROCESSINGMATRIXMODELERWIDGET_H