-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbinfodialog.h
More file actions
77 lines (53 loc) · 1.34 KB
/
dbinfodialog.h
File metadata and controls
77 lines (53 loc) · 1.34 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef DBINFODIALOG_H
#define DBINFODIALOG_H
#include <QDialog>
#include <QAbstractTableModel>
#include <QSqlQueryModel>
class QTableView;
class QLabel;
class QSpinBox;
class QTimer;
class QDialogButtonBox;
class ConnectedUserListModel;
class DBInfoDialog : public QDialog
{
Q_OBJECT
public:
explicit DBInfoDialog(QWidget *parent = 0);
signals:
public slots:
private:
QLabel *lblVersionInfo;
QLabel *lblUserInfo;
QLabel *lblUserListTitle;
QLabel *lblUpdateInterval;
QDialogButtonBox *buttonBox;
QSpinBox *spinUpdateInterval;
QTableView *tvUserList;
void createWidgets();
void layoutWidgets();
void retranslateUi();
void connectSlots();
QTimer *updateIntervalTimer;
ConnectedUserListModel *userListModel;
private slots:
void setUpdateInterval(int);
};
class ConnectedUserListModel : public QAbstractTableModel
{
Q_OBJECT
public:
ConnectedUserListModel(QObject *parent);
int rowCount(const QModelIndex &) const;
int columnCount(const QModelIndex &) const;
QVariant data(const QModelIndex &, int) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
public slots:
void update();
signals:
void updated();
private:
QStringList m_horizontalHeaders;
QSqlQueryModel *queryModel;
};
#endif // DBINFODIALOG_H