-
Notifications
You must be signed in to change notification settings - Fork 0
/
usermanagement.h
executable file
·93 lines (75 loc) · 1.95 KB
/
usermanagement.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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* This file is part of community judge client project developed by Shervin Kh.
* Copyright (C) 2014 Shervin Kh.
* License: GPLv3 Or Later
* Full license could be found in License file shipped with program or at http://www.gnu.org/licenses/
*/
#ifndef USERMANAGEMENT_H
#define USERMANAGEMENT_H
#include <QWidget>
#include "general.h"
class MainWidget;
class QLabel;
class QComboBox;
class QLineEdit;
class QCheckBox;
class QPushButton;
class QTableWidget;
class QHBoxLayout;
class QVBoxLayout;
class QAction;
class QMenu;
class UserManagement : public QWidget
{
Q_OBJECT
private:
MainWidget *mw;
QLabel *unameLabel;
QLineEdit *unameLE;
QLabel *countLabel;
QLineEdit *countLE;
QLabel *filterLabel;
QCheckBox *enabledCheckBox;
QLabel *sortLabel;
QComboBox *sortCombo;
QComboBox *sortTypeCombo;
QPushButton *requestButton;
QTableWidget *tw;
QHBoxLayout *layT1;
QHBoxLayout *layT2;
QVBoxLayout *layT12;
QHBoxLayout *layUp;
QVBoxLayout *layout;
QList<User> data;
QMenu *contextMenu;
QAction *resetPasswdAction;
QAction *changeAdminAction;
QAction *deleteAction;
QAction *changeActivationAction;
QAction *editDescAction;
QAction *renameAction;
QAction *recordAction;
void updateData();
int lastRow;
User *newUsr;
public:
explicit UserManagement(MainWidget *MW, QWidget *parent = Q_NULLPTR);
void init();
void onSwitch();
private slots:
void handleSortType();
void handleMenu(const QPoint &pos);
void handleDblClick(int i, int j);
void request();
void resetPassword(int idx);
void changeAdmin(int idx);
void deleteUser(int idx);
void changeActivation(int idx);
void editDescription(int idx);
void rename(int idx);
void userRecord(int idx);
public slots:
void requestDone(StatCode stat, const QByteArray &BA);
void operationDone(StatCode stat, const QByteArray &);
};
#endif // USERMANAGEMENT_H