mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
Move game state and event handling out of tab_game and into separate classes (#6090)
* Move game state and event handling out of tab_game and into separate classes. Took 6 hours 38 minutes Took 23 seconds * Meta Info Took 14 hours 36 minutes * Properly respond to game started again. Took 49 minutes * Hook up the message log widgets to game events again. Took 33 minutes Took 7 seconds * Lint. Took 4 minutes * Hook up playerListWidget. Took 1 hour 2 minutes Took 10 seconds * Hook up playerListWidget properly. Took 1 hour 17 minutes * Fix regressions. Took 17 minutes Took 9 seconds * Log the local player joining too. Took 2 minutes * Connect some player signals unrelated to this refactor again. Took 5 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
5c16f0d027
commit
b8e545bfa4
18 changed files with 1482 additions and 788 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef PLAYERLISTWIDGET_H
|
||||
#define PLAYERLISTWIDGET_H
|
||||
|
||||
#include "player.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QMap>
|
||||
#include <QStyledItemDelegate>
|
||||
|
|
@ -47,12 +49,14 @@ signals:
|
|||
public:
|
||||
PlayerListWidget(TabSupervisor *_tabSupervisor, AbstractClient *_client, TabGame *_game, QWidget *parent = nullptr);
|
||||
void retranslateUi();
|
||||
void addPlayer(const ServerInfo_PlayerProperties &player);
|
||||
void removePlayer(int playerId);
|
||||
void setActivePlayer(int playerId);
|
||||
void updatePlayerProperties(const ServerInfo_PlayerProperties &prop, int playerId = -1);
|
||||
void setGameStarted(bool _gameStarted, bool resuming);
|
||||
void showContextMenu(const QPoint &pos, const QModelIndex &index);
|
||||
|
||||
public slots:
|
||||
void addPlayer(const ServerInfo_PlayerProperties &player);
|
||||
void removePlayer(int playerId);
|
||||
void updatePlayerProperties(const ServerInfo_PlayerProperties &prop, int playerId = -1);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue