blob: e9e5daff791f7218b04e7353336388fef58ddca9 (
plain) (
blame)
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
|
// SPDX-FileCopyrightText: Copyright 2018 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <memory>
#include <optional>
#include <QDialog>
#include "network/room.h"
#include "network/room_member.h"
namespace Ui {
class ModerationDialog;
}
class QStandardItemModel;
class ModerationDialog : public QDialog {
Q_OBJECT
public:
explicit ModerationDialog(Network::RoomNetwork& room_network_, QWidget* parent = nullptr);
~ModerationDialog();
signals:
void StatusMessageReceived(const Network::StatusMessageEntry&);
void BanListReceived(const Network::Room::BanList&);
private:
void LoadBanList();
void PopulateBanList(const Network::Room::BanList& ban_list);
void SendUnbanRequest(const QString& subject);
void OnStatusMessageReceived(const Network::StatusMessageEntry& status_message);
std::unique_ptr<Ui::ModerationDialog> ui;
QStandardItemModel* model;
Network::RoomMember::CallbackHandle<Network::StatusMessageEntry> callback_handle_status_message;
Network::RoomMember::CallbackHandle<Network::Room::BanList> callback_handle_ban_list;
Network::RoomNetwork& room_network;
};
Q_DECLARE_METATYPE(Network::Room::BanList);
|