forked from sqlitebrowser/sqlitebrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDbStructureModel.h
36 lines (27 loc) · 1.08 KB
/
DbStructureModel.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
#ifndef DBSTRUCTUREMODEL_H
#define DBSTRUCTUREMODEL_H
#include <QAbstractItemModel>
class DBBrowserDB;
class QTreeWidgetItem;
class DbStructureModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit DbStructureModel(QObject* parent = 0);
~DbStructureModel();
void reloadData(DBBrowserDB* db);
QVariant data(const QModelIndex& index, int role) const;
Qt::ItemFlags flags(const QModelIndex& index) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex& index) const;
int rowCount(const QModelIndex& parent = QModelIndex()) const;
int columnCount(const QModelIndex& = QModelIndex()) const;
QStringList mimeTypes() const;
QMimeData* mimeData(const QModelIndexList& indices) const;
bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent);
private:
QTreeWidgetItem* rootItem;
DBBrowserDB* m_db;
};
#endif