QGIS API Documentation 3.99.0-Master (26c88405ac0)
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:
43
47 QgsProcessingMatrixParameterPanelWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QgsProcessingParameterMatrix *param = nullptr, const QVariantList &initialTable = QVariantList() );
48
52 QVariantList table() const;
53
54 private slots:
55
56 void addRow();
57 void deleteRow();
58 void deleteAllRows();
59
60 private:
61 QPushButton *mButtonAdd = nullptr;
62 QPushButton *mButtonRemove = nullptr;
63 QPushButton *mButtonRemoveAll = nullptr;
64 const QgsProcessingParameterMatrix *mParam = nullptr;
65 QStandardItemModel *mModel = nullptr;
66 bool mWasCanceled = false;
67
68 void populateTable( const QVariantList &contents );
69
70 friend class TestProcessingGui;
71};
72
73
80class GUI_EXPORT QgsProcessingMatrixParameterPanel : public QWidget
81{
82 Q_OBJECT
83
84 public:
85 QgsProcessingMatrixParameterPanel( QWidget *parent = nullptr, const QgsProcessingParameterMatrix *param = nullptr );
86
87 QVariantList value() const;
88
89 void setValue( const QVariantList &value );
90
91 signals:
92
93 void changed();
94
95 private slots:
96
97 void showDialog();
98
99 private:
100 void updateSummaryText();
101
102 const QgsProcessingParameterMatrix *mParam = nullptr;
103 QLineEdit *mLineEdit = nullptr;
104 QToolButton *mToolButton = nullptr;
105
106 QVariantList mTable;
107 QPointer< QgsProcessingMatrixParameterPanelWidget > mPanelWidget;
108
109 friend class TestProcessingGui;
110};
111
113
114#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