mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
fixed shuffling, more chat widget code
This commit is contained in:
parent
947cd1736c
commit
120193fb0b
8 changed files with 131 additions and 9 deletions
|
|
@ -3,31 +3,45 @@
|
|||
|
||||
#include <QWidget>
|
||||
#include "servereventdata.h"
|
||||
#include "client.h"
|
||||
|
||||
class QListWidget;
|
||||
class QTextEdit;
|
||||
class QLineEdit;
|
||||
class QTreeWidget;
|
||||
class QTabWidget;
|
||||
class Client;
|
||||
class QPushButton;
|
||||
|
||||
class ChannelWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QListWidget *playerList;
|
||||
QTextEdit *textEdit;
|
||||
QLineEdit *sayEdit;
|
||||
QString name;
|
||||
public:
|
||||
ChannelWidget(QWidget *parent = 0);
|
||||
ChannelWidget(const QString &_name, QWidget *parent = 0);
|
||||
const QString &getName() const { return name; }
|
||||
|
||||
void joinEvent(const QString &playerName);
|
||||
void listPlayersEvent(const QString &playerName);
|
||||
void leaveEvent(const QString &playerName);
|
||||
void sayEvent(const QString &playerName, const QString &s);
|
||||
};
|
||||
|
||||
class ChatWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QTreeWidget *channelList;
|
||||
QPushButton *joinButton;
|
||||
QTabWidget *tab;
|
||||
Client *client;
|
||||
|
||||
ChannelWidget *getChannel(const QString &name);
|
||||
private slots:
|
||||
void chatEvent(const ChatEventData &data);
|
||||
void joinClicked();
|
||||
void joinFinished(ServerResponse resp);
|
||||
public:
|
||||
ChatWidget(Client *_client, QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue