QGIS API Documentation  3.6.0-Noosa (5873452)
qgstablewidgetbase.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgstablewidgetbase.h
3  --------------------------------------
4  Date : 09.2016
5  Copyright : (C) 2016 Patrick Valsecchi
6  Email : [email protected]
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 QGSTABLEWIDGETBASE_H
17 #define QGSTABLEWIDGETBASE_H
18 
19 #include "ui_qgstablewidgetuibase.h"
20 #include <QAbstractTableModel>
21 #include <QVariant>
22 #include "qgis_gui.h"
23 
33 class GUI_EXPORT QgsTableWidgetBase: public QWidget, protected Ui::QgsTableWidgetUiBase
34 {
35  Q_OBJECT
36  public:
37 
41  explicit QgsTableWidgetBase( QWidget *parent );
42 
43  protected:
44 
49  void init( QAbstractTableModel *model );
50 
51  signals:
52 
56  void valueChanged();
57 
58  private slots:
59 
63  void addButton_clicked();
64 
68  void removeButton_clicked();
69 
73  void onSelectionChanged();
74 
75  friend class TestQgsKeyValueWidget;
76  friend class TestQgsListWidget;
77 
78 };
79 
80 
81 #endif // QGSTABLEWIDGETBASE_H
Base widget allowing to edit a collection, using a table.