8#include <qtmetamacros.h>
12#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
31template <
class Key,
class T>
class QMap;
32template <
typename T>
class QList;
185 void joinGame(
bool asSpectator =
false,
bool asJudge =
false);
215 const bool restoresettings,
216 const bool _showfilters,
217 QWidget *parent =
nullptr);
239 bool joinGameById(
int gameId,
bool asSpectator =
false);
Definition abstract_client.h:73
void enableButtons()
Enables buttons for the currently selected game.
Definition game_selector.cpp:493
AbstractClient * client
Definition game_selector.h:131
void actJoinAsSpectator()
Joins the currently selected game as a spectator.
Definition game_selector.cpp:332
QPushButton * createButton
Definition game_selector.h:143
QPushButton * joinAsJudgeSpectatorButton
Definition game_selector.h:147
void actSelectedGameChanged(const QModelIndex ¤t, const QModelIndex &previous)
Slot called when the selected game changes.
Definition game_selector.cpp:537
void actJoin()
Joins the currently selected game as a player.
Definition game_selector.cpp:318
void retranslateUi()
Updates UI text for translation/localization.
Definition game_selector.cpp:516
const bool showFilters
Definition game_selector.h:149
GameSelectorQuickFilterToolBar * quickFilterToolBar
Definition game_selector.h:139
bool joinGameById(int gameId, bool asSpectator=false)
Finds a game by ID and joins or spectates it.
Definition game_selector.cpp:467
GameSelector(AbstractClient *_client, TabSupervisor *_tabSupervisor, TabRoom *_room, const QMap< int, QString > &_rooms, const QMap< int, GameTypeMap > &_gameTypes, const bool restoresettings, const bool _showfilters, QWidget *parent=nullptr)
Constructs a GameSelector widget.
Definition game_selector.cpp:53
QTimer filterSaveDebounceTimer
Definition game_selector.h:152
void ignoreListReceived(const QList< ServerInfo_User > &_ignoreList)
Refreshes the game list when the ignore list is received from the server.
Definition game_selector.cpp:213
GamesProxyModel * gameListProxyModel
Definition game_selector.h:137
QPushButton * joinAsJudgeButton
Definition game_selector.h:145
void actJoinAsJudge()
Joins the currently selected game as a judge.
Definition game_selector.cpp:323
void actSetFilter()
Opens a dialog to set filters for the game list.
Definition game_selector.cpp:234
TabSupervisor * tabSupervisor
Definition game_selector.h:132
void actClearFilter()
Clears all filters applied to the game list.
Definition game_selector.cpp:253
QPushButton * joinButton
Definition game_selector.h:144
GameTypeMap gameTypeMap
Definition game_selector.h:150
void processAddToListEvent(const Event_AddToList &event)
Processes events where a user is added to a list (e.g., ignore or buddy).
Definition game_selector.cpp:218
void checkClearFilterButtonState()
Definition game_selector.cpp:248
GamesModel * gameListModel
Definition game_selector.h:136
QPushButton * spectateButton
Definition game_selector.h:146
void customContextMenu(const QPoint &point)
Shows the custom context menu for a game when right-clicked.
Definition game_selector.cpp:346
void disableButtons()
Disables create/join/spectate buttons.
Definition game_selector.cpp:483
void processGameInfo(const ServerInfo_Game &info)
Updates or adds a game entry in the list.
Definition game_selector.cpp:531
void gameJoined(int gameId)
Emitted when a game has been successfully joined.
void processRemoveFromListEvent(const Event_RemoveFromList &event)
Processes events where a user is removed from a list (e.g., ignore or buddy).
Definition game_selector.cpp:226
TabRoom * room
Definition game_selector.h:133
void enableButtonsForIndex(const QModelIndex ¤t)
Enables buttons for a specific game index.
Definition game_selector.cpp:503
void actCreate()
Opens the dialog to create a new game in the current room.
Definition game_selector.cpp:261
QPushButton * clearFilterButton
Definition game_selector.h:142
void updateTitle()
Updates the widget title to reflect the current number of displayed games.
Definition game_selector.cpp:542
void joinGame(bool asSpectator=false, bool asJudge=false)
Performs the join or spectate action for the currently selected game.
Definition game_selector.cpp:401
QPushButton * filterButton
Definition game_selector.h:141
QTreeView * gameListView
Definition game_selector.h:135
void checkResponse(const Response &response)
Processes server responses for join or spectate commands.
Definition game_selector.cpp:273
void actJoinAsJudgeSpectator()
Definition game_selector.cpp:337
Model storing all available games for display in a QTreeView or QTableView.
Definition games_model.h:29
Proxy model for filtering and sorting the GamesModel based on user preferences.
Definition games_model.h:118
Definition remote_connection_controller.h:20
Definition tab_supervisor.h:92
QMap< int, QString > GameTypeMap
Definition game_type_map.h:6
Definition event_add_to_list.proto:4
Definition event_remove_from_list.proto:3
Definition response.proto:11
Definition serverinfo_game.proto:5
Definition serverinfo_user.proto:2