mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-29 18:13:55 -07:00
implemented game types
This commit is contained in:
parent
7116382a96
commit
04742f6fb9
23 changed files with 249 additions and 127 deletions
|
|
@ -23,6 +23,7 @@ class Event_ListGames;
|
|||
class Event_JoinRoom;
|
||||
class Event_LeaveRoom;
|
||||
class Event_RoomSay;
|
||||
class TabRoom;
|
||||
|
||||
class GameSelector : public QGroupBox {
|
||||
Q_OBJECT
|
||||
|
|
@ -35,7 +36,7 @@ signals:
|
|||
void gameJoined(int gameId);
|
||||
private:
|
||||
AbstractClient *client;
|
||||
int roomId;
|
||||
TabRoom *room;
|
||||
|
||||
QTreeView *gameListView;
|
||||
GamesModel *gameListModel;
|
||||
|
|
@ -43,7 +44,7 @@ private:
|
|||
QPushButton *createButton, *joinButton, *spectateButton;
|
||||
QCheckBox *showFullGamesCheckBox;
|
||||
public:
|
||||
GameSelector(AbstractClient *_client, int _roomId, QWidget *parent = 0);
|
||||
GameSelector(AbstractClient *_client, TabRoom *_room, QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
void processGameInfo(ServerInfo_Game *info);
|
||||
};
|
||||
|
|
@ -55,6 +56,7 @@ private:
|
|||
int roomId;
|
||||
QString roomName;
|
||||
QString ownName;
|
||||
QMap<int, QString> gameTypes;
|
||||
|
||||
GameSelector *gameSelector;
|
||||
UserList *userList;
|
||||
|
|
@ -82,6 +84,7 @@ public:
|
|||
void retranslateUi();
|
||||
void processRoomEvent(RoomEvent *event);
|
||||
int getRoomId() const { return roomId; }
|
||||
const QMap<int, QString> &getGameTypes() const { return gameTypes; }
|
||||
QString getChannelName() const { return roomName; }
|
||||
QString getTabText() const { return roomName; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue