8#include <libcockatrice/protocol/pb/commands.pb.h>
9#include <libcockatrice/protocol/pb/event_add_to_list.pb.h>
10#include <libcockatrice/protocol/pb/event_remove_from_list.pb.h>
172 void joinGame(
bool asSpectator =
false,
bool asJudge =
false);
200 const QMap<int, QString> &_rooms,
201 const QMap<int, GameTypeMap> &_gameTypes,
202 const bool restoresettings,
203 const bool _showfilters,
204 QWidget *parent =
nullptr);
225 bool joinGameById(
int gameId,
bool asSpectator =
false);
Definition abstract_client.h:57
void enableButtons()
Enables buttons for the currently selected game.
Definition game_selector.cpp:447
AbstractClient * client
Definition game_selector.h:121
void actJoinAsSpectator()
Joins the currently selected game as a spectator.
Definition game_selector.cpp:286
QPushButton * createButton
Definition game_selector.h:133
QPushButton * joinAsJudgeSpectatorButton
Definition game_selector.h:137
void actSelectedGameChanged(const QModelIndex ¤t, const QModelIndex &previous)
Slot called when the selected game changes.
Definition game_selector.cpp:491
void actJoin()
Joins the currently selected game as a player.
Definition game_selector.cpp:272
void retranslateUi()
Updates UI text for translation/localization.
Definition game_selector.cpp:470
const bool showFilters
Definition game_selector.h:139
GameSelectorQuickFilterToolBar * quickFilterToolBar
Definition game_selector.h:129
bool joinGameById(int gameId, bool asSpectator=false)
Finds a game by ID and joins or spectates it.
Definition game_selector.cpp:421
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:30
void ignoreListReceived(const QList< ServerInfo_User > &_ignoreList)
Refreshes the game list when the ignore list is received from the server.
Definition game_selector.cpp:167
GamesProxyModel * gameListProxyModel
Definition game_selector.h:127
QPushButton * joinAsJudgeButton
Definition game_selector.h:135
void actJoinAsJudge()
Joins the currently selected game as a judge.
Definition game_selector.cpp:277
void actSetFilter()
Opens a dialog to set filters for the game list.
Definition game_selector.cpp:188
TabSupervisor * tabSupervisor
Definition game_selector.h:122
void actClearFilter()
Clears all filters applied to the game list.
Definition game_selector.cpp:207
QPushButton * joinButton
Definition game_selector.h:134
GameTypeMap gameTypeMap
Definition game_selector.h:140
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:172
void checkClearFilterButtonState()
Definition game_selector.cpp:202
GamesModel * gameListModel
Definition game_selector.h:126
QPushButton * spectateButton
Definition game_selector.h:136
void customContextMenu(const QPoint &point)
Shows the custom context menu for a game when right-clicked.
Definition game_selector.cpp:300
void disableButtons()
Disables create/join/spectate buttons.
Definition game_selector.cpp:437
void processGameInfo(const ServerInfo_Game &info)
Updates or adds a game entry in the list.
Definition game_selector.cpp:485
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:180
TabRoom * room
Definition game_selector.h:123
void enableButtonsForIndex(const QModelIndex ¤t)
Enables buttons for a specific game index.
Definition game_selector.cpp:457
void actCreate()
Opens the dialog to create a new game in the current room.
Definition game_selector.cpp:215
QPushButton * clearFilterButton
Definition game_selector.h:132
void updateTitle()
Updates the widget title to reflect the current number of displayed games.
Definition game_selector.cpp:496
void joinGame(bool asSpectator=false, bool asJudge=false)
Performs the join or spectate action for the currently selected game.
Definition game_selector.cpp:355
QPushButton * filterButton
Definition game_selector.h:131
QTreeView * gameListView
Definition game_selector.h:125
void checkResponse(const Response &response)
Processes server responses for join or spectate commands.
Definition game_selector.cpp:227
void actJoinAsJudgeSpectator()
Definition game_selector.cpp:291
Model storing all available games for display in a QTreeView or QTableView.
Definition games_model.h:24
Proxy model for filtering and sorting the GamesModel based on user preferences.
Definition games_model.h:113
Definition tab_supervisor.h:84
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