Cockatrice/cockatrice/src/tabs/tab_account.h
BruebachL c5b361e94d
[Documentation] Doxygen regroup files and reorder group structure (#6208)
* Regroup a whole bunch of files.

Took 1 hour 38 minutes

* Reorder the structure.

Took 15 minutes

* Link some more things.

Took 18 minutes

* More links.

Took 14 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-02 16:28:08 +02:00

63 lines
1.7 KiB
C++

/**
* @file tab_account.h
* @ingroup AccountTabs
* @brief TODO: Document this.
*/
#ifndef TAB_ACCOUNT_H
#define TAB_ACCOUNT_H
#include "pb/serverinfo_user.pb.h"
#include "tab.h"
class AbstractClient;
class Event_AddToList;
class Event_ListRooms;
class Event_RemoveFromList;
class Event_UserJoined;
class Event_UserLeft;
class LineEditUnfocusable;
class Response;
class ServerInfo_User;
class UserInfoBox;
class UserListWidget;
class TabAccount : public Tab
{
Q_OBJECT
signals:
void openMessageDialog(const QString &userName, bool focus);
void userLeft(const QString &userName);
void userJoined(const ServerInfo_User &userInfo);
private slots:
void processListUsersResponse(const Response &response);
void processUserJoinedEvent(const Event_UserJoined &event);
void processUserLeftEvent(const Event_UserLeft &event);
void buddyListReceived(const QList<ServerInfo_User> &_buddyList);
void ignoreListReceived(const QList<ServerInfo_User> &_ignoreList);
void processAddToListEvent(const Event_AddToList &event);
void processRemoveFromListEvent(const Event_RemoveFromList &event);
void addToIgnoreList();
void addToBuddyList();
private:
AbstractClient *client;
UserListWidget *allUsersList;
UserListWidget *buddyList;
UserListWidget *ignoreList;
UserInfoBox *userInfoBox;
LineEditUnfocusable *addBuddyEdit;
LineEditUnfocusable *addIgnoreEdit;
void addToList(const std::string &listName, const QString &userName);
public:
explicit TabAccount(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &userInfo);
void retranslateUi() override;
[[nodiscard]] QString getTabText() const override
{
return tr("Account");
}
};
#endif