-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUserTreeWidget.h
44 lines (36 loc) · 959 Bytes
/
UserTreeWidget.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
44
#ifndef USERTREEWIDGET_H
#define USERTREEWIDGET_H
#include <QObject>
#include <QWidget>
#include <QTreeWidget>
#include <QPushButton>
#include <QVBoxLayout>
#include <QInputDialog>
#include <QMessageBox>
#include "AddUserDialog.h"
#include "UserManager.h"
#include "UserDatabase.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class UserTreeWidget;
}
QT_END_NAMESPACE
class UserTreeWidget : public QWidget
{
Q_OBJECT
public:
explicit UserTreeWidget(QWidget *parent = nullptr);
~UserTreeWidget();
auto InitGui() -> void;
auto InitTreeWidgetGroups() -> void;
auto LoadUsers() -> void;
auto SetUpEvent() -> void;
auto GetGroup(uint8_t privilege) const -> QTreeWidgetItem*;
auto SaveUsersToIni() -> void;
private:
Ui::UserTreeWidget *ui;
QTreeWidgetItem *supervisorGroup;
QTreeWidgetItem *engineerGroup;
QTreeWidgetItem *operatorGroup;
};
#endif // USERTREEWIDGET_H