-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrichsqlmodel.h
43 lines (33 loc) · 1.14 KB
/
richsqlmodel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Copyright (C) 30-8-2016 Abdullateef Qallaa
*
* This file is part of Furqan project,
* hosted on GitHub: https://github.com/laateef/furqan,
* licensed under GPLv3.
*
* GNU General Public License Usage
* This file may be used under the terms of the GNU
* General Public License version 3.0 as published by the Free Software
* Foundation and appearing in the file LICENSE.md included in the
* packaging of this file. Please review the following information to
* ensure the GNU General Public License version 3.0 requirements will be
* met: http://www.gnu.org/copyleft/gpl.html.
*/
#ifndef RICHSQLMODEL_H
#define RICHSQLMODEL_H
#include <QSqlTableModel>
class AbstractRelation;
class RichSqlModel : public QSqlTableModel
{
Q_OBJECT
public:
explicit RichSqlModel(QObject *parent = 0, QSqlDatabase db = QSqlDatabase());
void setRelation(int column, AbstractRelation *);
AbstractRelation *relation(int column) const;
QVariant data(const QModelIndex &idx, int role) const;
private:
QMap<int, AbstractRelation *> m_relationMap;
QList<int> m_hiddenColumnList;
int m_columnCollapsed;
};
#endif // RICHSQLMODEL_H