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>
171 void joinGame(
bool asSpectator =
false,
bool asJudge =
false);
188 const QMap<int, QString> &_rooms,
189 const QMap<int, GameTypeMap> &_gameTypes,
190 const bool restoresettings,
191 const bool _showfilters,
192 QWidget *parent =
nullptr);
Definition abstract_client.h:51
void enableButtons()
Enables buttons for the currently selected game.
Definition game_selector.cpp:380
AbstractClient * client
Definition game_selector.h:120
void actJoinAsSpectator()
Joins the currently selected game as a spectator.
Definition game_selector.cpp:271
QPushButton * createButton
Definition game_selector.h:132
QPushButton * joinAsJudgeSpectatorButton
Definition game_selector.h:136
void actSelectedGameChanged(const QModelIndex ¤t, const QModelIndex &previous)
Slot called when the selected game changes.
Definition game_selector.cpp:421
void actJoin()
Joins the currently selected game as a player.
Definition game_selector.cpp:257
void retranslateUi()
Updates UI text for translation/localization.
Definition game_selector.cpp:401
const bool showFilters
Definition game_selector.h:138
GameSelectorQuickFilterToolBar * quickFilterToolBar
Definition game_selector.h:128
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:25
void ignoreListReceived(const QList< ServerInfo_User > &_ignoreList)
Refreshes the game list when the ignore list is received from the server.
Definition game_selector.cpp:148
GamesProxyModel * gameListProxyModel
Definition game_selector.h:126
QPushButton * joinAsJudgeButton
Definition game_selector.h:134
void actJoinAsJudge()
Joins the currently selected game as a judge.
Definition game_selector.cpp:262
void actSetFilter()
Opens a dialog to set filters for the game list.
Definition game_selector.cpp:169
TabSupervisor * tabSupervisor
Definition game_selector.h:121
void actClearFilter()
Clears all filters applied to the game list.
Definition game_selector.cpp:190
QPushButton * joinButton
Definition game_selector.h:133
GameTypeMap gameTypeMap
Definition game_selector.h:139
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:153
GamesModel * gameListModel
Definition game_selector.h:125
QPushButton * spectateButton
Definition game_selector.h:135
void customContextMenu(const QPoint &point)
Shows the custom context menu for a game when right-clicked.
Definition game_selector.cpp:285
void disableButtons()
Disables create/join/spectate buttons.
Definition game_selector.cpp:371
void processGameInfo(const ServerInfo_Game &info)
Updates or adds a game entry in the list.
Definition game_selector.cpp:415
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:161
TabRoom * room
Definition game_selector.h:122
void enableButtonsForIndex(const QModelIndex ¤t)
Enables buttons for a specific game index.
Definition game_selector.cpp:389
void actCreate()
Opens the dialog to create a new game in the current room.
Definition game_selector.cpp:200
QPushButton * clearFilterButton
Definition game_selector.h:131
void updateTitle()
Updates the widget title to reflect the current number of displayed games.
Definition game_selector.cpp:426
void joinGame(bool asSpectator=false, bool asJudge=false)
Performs the join or spectate action for the currently selected game.
Definition game_selector.cpp:327
QPushButton * filterButton
Definition game_selector.h:130
QTreeView * gameListView
Definition game_selector.h:124
void checkResponse(const Response &response)
Processes server responses for join or spectate commands.
Definition game_selector.cpp:212
void actJoinAsJudgeSpectator()
Definition game_selector.cpp:276
Model storing all available games for display in a QTreeView or QTableView.
Definition games_model.h:23
Proxy model for filtering and sorting the GamesModel based on user preferences.
Definition games_model.h:112
Definition tab_supervisor.h:83
QMap< int, QString > GameTypeMap
Definition game_type_map.h:6