Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
tab_account.h
Go to the documentation of this file.
1
6
7#ifndef TAB_ACCOUNT_H
8#define TAB_ACCOUNT_H
9
10#include "tab.h"
11
12#include <libcockatrice/protocol/pb/serverinfo_user.pb.h>
13
14class AbstractClient;
15class Event_AddToList;
16class Event_ListRooms;
17class Event_RemoveFromList;
18class Event_UserJoined;
19class Event_UserLeft;
21class Response;
22class ServerInfo_User;
23class UserInfoBox;
24class UserListWidget;
25
26class TabAccount : public Tab
27{
28 Q_OBJECT
29signals:
30 void openMessageDialog(const QString &userName, bool focus);
31 void userLeft(const QString &userName);
32 void userJoined(const ServerInfo_User &userInfo);
33
34private slots:
35 void processListUsersResponse(const Response &response);
36 void processUserJoinedEvent(const Event_UserJoined &event);
37 void processUserLeftEvent(const Event_UserLeft &event);
38 void buddyListReceived(const QList<ServerInfo_User> &_buddyList);
39 void ignoreListReceived(const QList<ServerInfo_User> &_ignoreList);
40 void processAddToListEvent(const Event_AddToList &event);
41 void processRemoveFromListEvent(const Event_RemoveFromList &event);
42 void addToIgnoreList();
43 void addToBuddyList();
44
45private:
53 void addToList(const std::string &listName, const QString &userName);
54
55public:
56 explicit TabAccount(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &userInfo);
57 void retranslateUi() override;
58 [[nodiscard]] QString getTabText() const override
59 {
60 return tr("Account");
61 }
62};
63
64#endif
Definition abstract_client.h:51
Definition custom_line_edit.h:20
void processListUsersResponse(const Response &response)
Definition tab_account.cpp:135
void openMessageDialog(const QString &userName, bool focus)
void addToList(const std::string &listName, const QString &userName)
Definition tab_account.cpp:118
void buddyListReceived(const QList< ServerInfo_User > &_buddyList)
Definition tab_account.cpp:189
void processAddToListEvent(const Event_AddToList &event)
Definition tab_account.cpp:205
TabAccount(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &userInfo)
Definition tab_account.cpp:22
LineEditUnfocusable * addBuddyEdit
Definition tab_account.h:51
UserInfoBox * userInfoBox
Definition tab_account.h:50
void ignoreListReceived(const QList< ServerInfo_User > &_ignoreList)
Definition tab_account.cpp:197
void processRemoveFromListEvent(const Event_RemoveFromList &event)
Definition tab_account.cpp:224
void retranslateUi() override
Definition tab_account.cpp:127
void addToBuddyList()
Definition tab_account.cpp:94
void userJoined(const ServerInfo_User &userInfo)
void userLeft(const QString &userName)
QString getTabText() const override
Definition tab_account.h:58
LineEditUnfocusable * addIgnoreEdit
Definition tab_account.h:52
UserListWidget * ignoreList
Definition tab_account.h:49
void addToIgnoreList()
Definition tab_account.cpp:106
void processUserLeftEvent(const Event_UserLeft &event)
Definition tab_account.cpp:171
UserListWidget * buddyList
Definition tab_account.h:48
UserListWidget * allUsersList
Definition tab_account.h:47
AbstractClient * client
Definition tab_account.h:46
void processUserJoinedEvent(const Event_UserJoined &event)
Definition tab_account.cpp:151
Definition tab_supervisor.h:83
Tab(TabSupervisor *_tabSupervisor)
Definition tab.cpp:11
Definition user_info_box.h:20
Definition user_list_widget.h:122
TODO: Document this.