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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
// Copyright 2007-2021 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
#ifndef MUMBLE_MUMBLE_ACLEDITOR_H_
#define MUMBLE_MUMBLE_ACLEDITOR_H_
#include "ACL.h"
#include "Group.h"
#include "Mumble.pb.h"
#include "ui_ACLEditor.h"
class ACLGroup : public Group {
private:
Q_DISABLE_COPY(ACLGroup)
public:
bool bInherited;
ACLGroup(const QString &name);
};
class ACLEditor : public QDialog, public Ui::ACLEditor {
private:
Q_OBJECT
Q_DISABLE_COPY(ACLEditor)
protected:
typedef QPair< QString, int > idname;
MumbleProto::ACL msg;
enum WaitID { GroupAdd, GroupRemove, GroupInherit, ACLList };
QHash< int, QString > qhNameCache;
QHash< QString, int > qhIDCache;
QHash< QString, int > qhNameWait;
int iUnknown;
void refill(WaitID what);
ACLGroup *currentGroup();
ChanACL *currentACL();
int iId;
bool bInheritACL;
QList< ChanACL * > qlACLs;
QList< ACLGroup * > qlGroups;
ChanACL *pcaPassword;
int numInheritACL;
int iChannel;
bool bAddChannelMode;
const QString userName(int id);
int id(const QString &uname);
QList< QCheckBox * > qlACLAllow;
QList< QCheckBox * > qlACLDeny;
QList< ChanACL::Perm > qlPerms;
void updatePasswordACL(void);
void updatePasswordField(void);
void showEvent(QShowEvent *) Q_DECL_OVERRIDE;
void fillWidgetFromSet(QListWidget *, const QSet< int > &);
public:
ACLEditor(int parentchannelid, QWidget *p = nullptr);
ACLEditor(int channelid, const MumbleProto::ACL &mea, QWidget *p = nullptr);
~ACLEditor();
void returnQuery(const MumbleProto::QueryUsers &mqu);
public slots:
void accept() Q_DECL_OVERRIDE;
public slots:
void refillACL();
void refillGroupNames();
void refillGroupAdd();
void refillGroupRemove();
void refillGroupInherit();
void refillComboBoxes();
void groupEnableCheck();
void ACLEnableCheck();
void on_qtwTab_currentChanged(int index);
void on_qlwACLs_currentRowChanged();
void on_qpbACLAdd_clicked();
void on_qpbACLRemove_clicked();
void on_qpbACLUp_clicked();
void on_qpbACLDown_clicked();
void on_qcbACLInherit_clicked(bool checked);
void on_qcbACLApplyHere_clicked(bool checked);
void on_qcbACLApplySubs_clicked(bool checked);
void on_qcbACLGroup_activated(const QString &text);
void on_qcbACLUser_activated();
void ACLPermissions_clicked();
void on_qcbGroupList_activated(const QString &text);
void on_qcbGroupList_editTextChanged(const QString &text);
void on_qpbGroupAdd_clicked();
void on_qpbGroupRemove_clicked();
void on_qcbGroupInherit_clicked(bool checked);
void on_qcbGroupInheritable_clicked(bool checked);
void on_qpbGroupAddAdd_clicked();
void on_qpbGroupAddRemove_clicked();
void on_qpbGroupRemoveAdd_clicked();
void on_qpbGroupRemoveRemove_clicked();
void on_qpbGroupInheritRemove_clicked();
};
#endif
|