QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsprocessingmatrixparameterdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingmatrixparameterdialog.h
3 ----------------------------------
4 Date : February 2019
5 Copyright : (C) 2019 Nyall Dawson
6 Email : nyall dot dawson 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 QGSPROCESSINGMATRIXPARAMETERDIALOG_H
17#define QGSPROCESSINGMATRIXPARAMETERDIALOG_H
18
19#include "ui_qgsprocessingmatrixparameterdialogbase.h"
20
21#include "qgis.h"
22#include "qgis_gui.h"
24
25#define SIP_NO_FILE
26
27class QStandardItemModel;
28class QToolButton;
29
31
38class GUI_EXPORT QgsProcessingMatrixParameterPanelWidget : public QgsPanelWidget, private Ui::QgsProcessingMatrixParameterDialogBase
39{
40 Q_OBJECT
41
42 public:
46 QgsProcessingMatrixParameterPanelWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QgsProcessingParameterMatrix *param = nullptr, const QVariantList &initialTable = QVariantList() );
47
51 QVariantList table() const;
52
53 private slots:
54
55 void addRow();
56 void deleteRow();
57 void deleteAllRows();
58
59 private:
60 QPushButton *mButtonAdd = nullptr;
61 QPushButton *mButtonRemove = nullptr;
62 QPushButton *mButtonRemoveAll = nullptr;
63 const QgsProcessingParameterMatrix *mParam = nullptr;
64 QStandardItemModel *mModel = nullptr;
65 bool mWasCanceled = false;
66
67 void populateTable( const QVariantList &contents );
68
69 friend class TestProcessingGui;
70};
71
72
79class GUI_EXPORT QgsProcessingMatrixParameterPanel : public QWidget
80{
81 Q_OBJECT
82
83 public:
84 QgsProcessingMatrixParameterPanel( QWidget *parent = nullptr, const QgsProcessingParameterMatrix *param = nullptr );
85
86 QVariantList value() const;
87
88 void setValue( const QVariantList &value );
89
90 signals:
91
92 void changed();
93
94 private slots:
95
96 void showDialog();
97
98 private:
99 void updateSummaryText();
100
101 const QgsProcessingParameterMatrix *mParam = nullptr;
102 QLineEdit *mLineEdit = nullptr;
103 QToolButton *mToolButton = nullptr;
104
105 QVariantList mTable;
106 QPointer< QgsProcessingMatrixParameterPanelWidget > mPanelWidget;
107
108 friend class TestProcessingGui;
109};
110
112
113#endif // QGSPROCESSINGMATRIXPARAMETERDIALOG_H
Base class for any widget that can be shown as an inline panel.
A table (matrix) parameter for processing algorithms.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53