1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-07 15:10:43 +02:00
vcmi/launcher/lobby/lobby_moc.h

59 lines
1.0 KiB
C
Raw Normal View History

2022-11-10 04:20:44 +04:00
#pragma once
2022-10-21 05:53:30 +04:00
#include <QWidget>
2022-11-10 04:20:44 +04:00
#include "lobby.h"
2022-10-21 05:53:30 +04:00
namespace Ui {
class Lobby;
}
class Lobby : public QWidget
{
Q_OBJECT
public:
explicit Lobby(QWidget *parent = nullptr);
~Lobby();
private slots:
2022-10-21 20:29:27 +04:00
void on_messageEdit_returnPressed();
2022-10-21 05:53:30 +04:00
2022-11-16 04:22:48 +04:00
void chatMessage(QString title, QString body, bool isSystem = false);
void sysMessage(QString body);
2022-10-23 02:55:22 +04:00
void dispatchMessage(QString);
void serverCommand(const ServerCommand &);
2022-10-21 05:53:30 +04:00
2022-10-21 20:29:27 +04:00
void on_connectButton_toggled(bool checked);
2022-10-23 02:55:22 +04:00
void on_newButton_clicked();
void on_joinButton_clicked();
2022-10-23 23:10:46 +04:00
void on_buttonLeave_clicked();
void on_buttonReady_clicked();
2022-10-25 05:27:53 +04:00
void onDisconnected();
2022-10-21 05:53:30 +04:00
private:
Ui::Lobby *ui;
2022-10-21 20:29:27 +04:00
SocketLobby socketLobby;
2022-10-23 02:55:22 +04:00
QString hostSession;
QString session;
QString username;
2022-11-08 04:44:34 +04:00
QStringList gameArgs;
2022-10-23 02:55:22 +04:00
2022-11-17 04:05:44 +04:00
enum class AuthStatus
2022-11-17 03:15:26 +04:00
{
NONE, OK, ERROR
};
2022-11-17 04:05:44 +04:00
AuthStatus authentificationStatus = AuthStatus::NONE;
2022-11-16 23:53:54 +04:00
2022-10-23 02:55:22 +04:00
private:
2022-11-17 03:15:26 +04:00
QMap<QString, QString> buildModsMap() const;
bool isModAvailable(const QString & modName, const QString & modVersion) const;
2022-10-23 02:55:22 +04:00
void protocolAssert(bool);
2022-10-21 05:53:30 +04:00
};