QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgstablewidgetbase.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstablewidgetbase.h
3 --------------------------------------
4 Date : 09.2016
5 Copyright : (C) 2016 Patrick Valsecchi
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
21#include "qgis_gui.h"
22
23#include <QAbstractTableModel>
24#include <QVariant>
25
34class GUI_EXPORT QgsTableWidgetBase : public QWidget, protected Ui::QgsTableWidgetUiBase
35{
36 Q_OBJECT
37 public:
38
42 explicit QgsTableWidgetBase( QWidget *parent );
43
50 bool isReadOnly() const { return mReadOnly; }
51
52 public slots:
53
60 virtual void setReadOnly( bool readOnly );
61
62 protected:
63
68 void init( QAbstractTableModel *model );
69
70 signals:
71
76
77 private slots:
78
82 void addButton_clicked();
83
87 void removeButton_clicked();
88
92 void onSelectionChanged();
93
94 private:
95 bool mReadOnly = false;
96
98 friend class TestQgsListWidget;
99};
100
101
102#endif // QGSTABLEWIDGETBASE_H
bool isReadOnly() const
Returns true if the widget is shown in a read-only state.
friend class TestQgsKeyValueWidget
friend class TestQgsListWidget
void valueChanged()
Emitted each time a key or a value is changed.
QgsTableWidgetBase(QWidget *parent)
Constructor.