Cockatrice 2026-09-01-Development-3.1.0-beta.10
A 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;
19class Event_UserLeft;
21class QPushButton;
22class Response;
23class ServerInfo_User;
24class UserInfoBox;
25class UserListWidget;
26
27class TabAccount : public Tab
28{
29 Q_OBJECT
30signals:
31 void openMessageDialog(const QString &userName, bool focus);
32 void userLeft(const QString &userName);
33 void userJoined(const ServerInfo_User &userInfo);
34
35private slots:
36 void processListUsersResponse(const Response &response);
38 void processUserLeftEvent(const Event_UserLeft &event);
39 void buddyListReceived(const QList<ServerInfo_User> &_buddyList);
40 void ignoreListReceived(const QList<ServerInfo_User> &_ignoreList);
41 void processAddToListEvent(const Event_AddToList &event);
43 void addToIgnoreList();
44 void addToBuddyList();
45 void openMyReports();
46
47private:
55 QPushButton *myReportsButton;
56 void addToList(const std::string &listName, const QString &userName);
57
58public:
59 explicit TabAccount(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &userInfo);
60 void retranslateUi() override;
61 [[nodiscard]] QString getTabText() const override
62 {
63 return tr("Account");
64 }
65};
66
67#endif
Definition abstract_client.h:57
Definition custom_line_edit.h:20
void processListUsersResponse(const Response &response)
Definition tab_account.cpp:142
void openMessageDialog(const QString &userName, bool focus)
void addToList(const std::string &listName, const QString &userName)
Definition tab_account.cpp:124
void buddyListReceived(const QList< ServerInfo_User > &_buddyList)
Definition tab_account.cpp:197
void openMyReports()
Definition tab_account.cpp:251
void processAddToListEvent(const Event_AddToList &event)
Definition tab_account.cpp:215
TabAccount(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &userInfo)
Definition tab_account.cpp:23
LineEditUnfocusable * addBuddyEdit
Definition tab_account.h:53
UserInfoBox * userInfoBox
Definition tab_account.h:52
void ignoreListReceived(const QList< ServerInfo_User > &_ignoreList)
Definition tab_account.cpp:206
void processRemoveFromListEvent(const Event_RemoveFromList &event)
Definition tab_account.cpp:234
void retranslateUi() override
Definition tab_account.cpp:133
void addToBuddyList()
Definition tab_account.cpp:100
void userJoined(const ServerInfo_User &userInfo)
void userLeft(const QString &userName)
QString getTabText() const override
Definition tab_account.h:61
LineEditUnfocusable * addIgnoreEdit
Definition tab_account.h:54
UserListWidget * ignoreList
Definition tab_account.h:51
QPushButton * myReportsButton
Definition tab_account.h:55
void addToIgnoreList()
Definition tab_account.cpp:112
void processUserLeftEvent(const Event_UserLeft &event)
Definition tab_account.cpp:179
UserListWidget * buddyList
Definition tab_account.h:50
UserListWidget * allUsersList
Definition tab_account.h:49
AbstractClient * client
Definition tab_account.h:48
void processUserJoinedEvent(const Event_UserJoined &event)
Definition tab_account.cpp:159
Definition tab_supervisor.h:84
Tab(TabSupervisor *_tabSupervisor)
Definition tab.cpp:11
Definition user_info_box.h:22
Definition user_list_widget.h:77
Definition event_add_to_list.proto:4
Definition event_list_rooms.proto:4
Definition event_remove_from_list.proto:3
Definition event_user_joined.proto:4
Definition event_user_left.proto:3
Definition response.proto:11
Definition serverinfo_user.proto:2