mirror of
https://github.com/PabloMK7/citra.git
synced 2025-12-14 03:08:47 +00:00
Citra-qt: Add multiplayer ui
This commit is contained in:
parent
bba2a60b22
commit
871196bc10
34 changed files with 2653 additions and 46 deletions
57
src/citra_qt/multiplayer/chat_room.h
Normal file
57
src/citra_qt/multiplayer/chat_room.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
// Copyright 2017 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QDialog>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
#include <QVariant>
|
||||
#include "network/network.h"
|
||||
|
||||
namespace Ui {
|
||||
class ChatRoom;
|
||||
} // namespace Ui
|
||||
|
||||
namespace Core {
|
||||
class AnnounceMultiplayerSession;
|
||||
}
|
||||
|
||||
class ConnectionError;
|
||||
class ComboBoxProxyModel;
|
||||
|
||||
class ChatMessage;
|
||||
|
||||
class ChatRoom : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ChatRoom(QWidget* parent);
|
||||
void SetPlayerList(const Network::RoomMember::MemberList& member_list);
|
||||
void Clear();
|
||||
void AppendStatusMessage(const QString& msg);
|
||||
|
||||
public slots:
|
||||
void OnRoomUpdate(const Network::RoomInformation& info);
|
||||
void OnChatReceive(const Network::ChatEntry&);
|
||||
void OnSendChat();
|
||||
void OnChatTextChanged();
|
||||
void Disable();
|
||||
void Enable();
|
||||
|
||||
signals:
|
||||
void ChatReceived(const Network::ChatEntry&);
|
||||
|
||||
private:
|
||||
const u32 max_chat_lines = 1000;
|
||||
void AppendChatMessage(const QString&);
|
||||
bool ValidateMessage(const std::string&);
|
||||
QStandardItemModel* player_list;
|
||||
Ui::ChatRoom* ui;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(Network::ChatEntry);
|
||||
Q_DECLARE_METATYPE(Network::RoomInformation);
|
||||
Q_DECLARE_METATYPE(Network::RoomMember::State);
|
||||
Loading…
Add table
Add a link
Reference in a new issue