QGIS API Documentation 3.41.0-Master (cea29feecf2)
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:
43 QgsProcessingMatrixModelerWidget( QWidget *parent = nullptr );
44
48 QStringList headers() const;
49
55 QVariant value() const;
56
62 void setValue( const QStringList &headers, const QVariant &defaultValue );
63
68 bool fixedRows() const;
69
74 void setFixedRows( bool fixedRows );
75
76 private slots:
77
78 void addColumn();
79 void removeColumns();
80 void addRow();
81 void removeRows();
82 void clearTable();
83 void changeHeader( int index );
84
85 private:
86 QStandardItemModel *mModel = nullptr;
87
88 friend class TestProcessingGui;
89};
90
92
93#endif // QGSPROCESSINGMATRIXMODELERWIDGET_H