8#ifndef TAB_SUPERVISOR_H
9#define TAB_SUPERVISOR_H
12#include "../interface/widgets/server/user/user_list_proxy.h"
21#include <QAbstractButton>
22#include <QLoggingCategory>
45class GameEventContainer;
46class Event_GameJoined;
47class Event_UserMessage;
48class Event_NotifyUser;
58 QRect
subElementRect(SubElement,
const QStyleOption *,
const QWidget *)
const override;
66 [[nodiscard]] QSize
sizeHint()
const override;
73#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
117 int myAddTab(
Tab *tab, QAction *manager =
nullptr);
129 void startLocal(
const QList<AbstractClient *> &_clients);
165 void setMenu(
const QList<QMenu *> &newMenuList = QList<QMenu *>());
204 void gameJoined(
const Event_GameJoined &event);
207 void addRoomTab(
const ServerInfo_Room &info,
bool setCurrent);
Defines the AbstractTabDeckEditor class, which provides a base for deck editor tabs in the applicatio...
QSharedPointer< CardInfo > CardInfoPtr
Definition card_info.cpp:20
Definition abstract_client.h:51
AbstractTabDeckEditor is the base class for all deck editor tabs.
Definition abstract_tab_deck_editor.h:92
Represents a complete deck, including metadata, zones, cards, and sideboard plans.
Definition deck_list.h:127
Definition tab_supervisor.h:55
QRect subElementRect(SubElement, const QStyleOption *, const QWidget *) const override
Definition tab_supervisor.cpp:40
Definition tab_account.h:27
Definition tab_admin.h:37
Tab for browsing, searching, and filtering Archidekt decks.
Definition tab_archidekt.h:29
TabDeckEditorVisual provides a fully-featured deck editor tab with an enhanced visual interface....
Definition tab_deck_editor_visual.h:55
TabDeckEditor provides a fully-featured deck editor tab. It extends AbstractTabDeckEditor.
Definition tab_deck_editor.h:56
Definition tab_deck_storage_visual.h:26
Definition tab_deck_storage.h:29
Definition tab_edhrec_main.h:22
Definition tab_edhrec.h:17
Definition tab_message.h:24
Definition tab_replays.h:28
Definition tab_server.h:48
void actTabLog(bool checked)
Definition tab_supervisor.cpp:673
QAction * aTabLog
Definition tab_supervisor.h:115
QList< TabGame * > replayTabs
Definition tab_supervisor.h:109
TabEdhRecMain * addEdhrecMainTab()
Definition tab_supervisor.cpp:899
TabDeckStorageVisual * tabVisualDeckStorage
Definition tab_supervisor.h:100
int getGameCount() const
Definition tab_supervisor.h:135
void refreshShortcuts()
Definition tab_supervisor.cpp:257
void openTabAdmin()
Definition tab_supervisor.cpp:661
QAction * aTabAccount
Definition tab_supervisor.h:115
void openTabHome()
Definition tab_supervisor.cpp:519
ServerInfo_User * getUserInfo() const
Definition tab_supervisor.h:143
QAction * aTabVisualDeckEditor
Definition tab_supervisor.h:114
static QString sanitizeHtml(QString dirty)
Definition tab_supervisor.cpp:304
QMenu * tabsMenu
Definition tab_supervisor.h:98
void openTabDeckStorage()
Definition tab_supervisor.cpp:613
QMap< int, TabGame * > gameTabs
Definition tab_supervisor.h:108
void roomLeft(TabRoom *tab)
Definition tab_supervisor.cpp:765
void openTabVisualDeckStorage()
Definition tab_supervisor.cpp:543
TabAccount * getTabAccount() const
Definition tab_supervisor.h:139
void actTabVisualDeckStorage(bool checked)
Definition tab_supervisor.cpp:530
void addCloseButtonToTab(Tab *tab, int tabIndex, QAction *manager)
Definition tab_supervisor.cpp:371
const UserListManager * getUserListManager() const
Definition tab_supervisor.h:148
void gameLeft(TabGame *tab)
Definition tab_supervisor.cpp:741
~TabSupervisor() override
Definition tab_supervisor.cpp:191
QMap< QString, TabMessage * > messageTabs
Definition tab_supervisor.h:110
const QMap< int, TabRoom * > & getRoomTabs() const
Definition tab_supervisor.h:152
void tabUserEvent(bool globalEvent)
Definition tab_supervisor.cpp:946
QList< AbstractClient * > localClients
Definition tab_supervisor.h:97
QAction * aTabAdmin
Definition tab_supervisor.h:115
AbstractClient * getClient() const
Definition tab_supervisor.cpp:294
void processUserJoined(const ServerInfo_User &userInfo)
Definition tab_supervisor.cpp:1021
TabServer * tabServer
Definition tab_supervisor.h:101
QAction * aTabVisualDeckStorage
Definition tab_supervisor.h:114
void talkLeft(TabMessage *tab)
Definition tab_supervisor.cpp:837
void actTabAccount(bool checked)
Definition tab_supervisor.cpp:577
void processUserMessageEvent(const Event_UserMessage &event)
Definition tab_supervisor.cpp:981
TabAdmin * tabAdmin
Definition tab_supervisor.h:105
TabSupervisor(AbstractClient *_client, QMenu *tabsMenu, QWidget *parent=nullptr)
Definition tab_supervisor.cpp:106
void openTabReplays()
Definition tab_supervisor.cpp:638
bool getIsLocalGame() const
Definition tab_supervisor.h:131
void gameJoined(const Event_GameJoined &event)
Definition tab_supervisor.cpp:705
TabReplays * tabReplays
Definition tab_supervisor.h:104
void processUserLeft(const QString &userName)
Definition tab_supervisor.cpp:1014
static QString sanitizeTabName(QString dirty)
Definition tab_supervisor.cpp:299
bool switchToGameTabIfAlreadyExists(const int gameId)
Definition tab_supervisor.cpp:1120
void closeEvent(QCloseEvent *event) override
Definition tab_supervisor.cpp:273
void actTabDeckStorage(bool checked)
Definition tab_supervisor.cpp:602
TabHome * tabHome
Definition tab_supervisor.h:99
void addRoomTab(const ServerInfo_Room &info, bool setCurrent)
Definition tab_supervisor.cpp:753
void actTabReplays(bool checked)
Definition tab_supervisor.cpp:625
void startLocal(const QList< AbstractClient * > &_clients)
Definition tab_supervisor.cpp:441
void switchToFirstAvailableNetworkTab()
Definition tab_supervisor.cpp:774
void openTabServer()
Definition tab_supervisor.cpp:565
TabEdhRec * addEdhrecTab(const CardInfoPtr &cardToQuery, bool isCommander=false)
Definition tab_supervisor.cpp:925
QMap< int, TabRoom * > roomTabs
Definition tab_supervisor.h:107
void actTabAdmin(bool checked)
Definition tab_supervisor.cpp:650
void openTabAccount()
Definition tab_supervisor.cpp:588
AbstractClient * client
Definition tab_supervisor.h:95
int myAddTab(Tab *tab, QAction *manager=nullptr)
Definition tab_supervisor.cpp:349
void processRoomEvent(const RoomEvent &event)
Definition tab_supervisor.cpp:964
void openReplay(GameReplay *replay)
Definition tab_supervisor.cpp:785
QAction * aTabReplays
Definition tab_supervisor.h:115
DeckEditorType
Definition tab_supervisor.h:88
@ VisualDeckEditor
Definition tab_supervisor.h:90
@ ClassicDeckEditor
Definition tab_supervisor.h:89
void resetTabsMenu()
Definition tab_supervisor.cpp:388
UserListManager * userListManager
Definition tab_supervisor.h:96
TabDeckEditor * addDeckEditorTab(DeckLoader *deckToOpen)
Definition tab_supervisor.cpp:873
void updatePingTime(int value, int max)
Definition tab_supervisor.cpp:695
bool isLocalGame
Definition tab_supervisor.h:112
QAction * aTabDeckEditor
Definition tab_supervisor.h:114
QList< AbstractTabDeckEditor * > deckEditorTabs
Definition tab_supervisor.h:111
void actTabServer(bool checked)
Definition tab_supervisor.cpp:554
QAction * aTabVisualDatabaseDisplay
Definition tab_supervisor.h:115
void stop()
Definition tab_supervisor.cpp:460
void adminLockChanged(bool lock)
TabLog * tabLog
Definition tab_supervisor.h:106
void replayLeft(TabGame *tab)
Definition tab_supervisor.cpp:794
void processGameEventContainer(const GameEventContainer &cont)
Definition tab_supervisor.cpp:971
TabMessage * addMessageTab(const QString &userName, bool focus)
Definition tab_supervisor.cpp:802
void maximizeMainWindow()
Definition tab_supervisor.cpp:832
void openTabLog()
Definition tab_supervisor.cpp:684
QAction * aTabDeckStorage
Definition tab_supervisor.h:115
QList< AbstractTabDeckEditor * > getDeckEditorTabs() const
Definition tab_supervisor.h:156
void openDeckInNewTab(DeckLoader *deckToOpen)
Definition tab_supervisor.cpp:851
void deckEditorClosed(AbstractTabDeckEditor *tab)
Definition tab_supervisor.cpp:937
TabAccount * tabAccount
Definition tab_supervisor.h:102
QAction * aTabServer
Definition tab_supervisor.h:115
void showWindowIfHidden()
void setMenu(const QList< QMenu * > &newMenuList=QList< QMenu * >())
QAction * aTabArchidekt
Definition tab_supervisor.h:114
void updateCurrent(int index)
Definition tab_supervisor.cpp:1046
void start(const ServerInfo_User &userInfo)
Definition tab_supervisor.cpp:403
void localGameJoined(const Event_GameJoined &event)
Definition tab_supervisor.cpp:725
TabDeckEditorVisual * addVisualDeckEditorTab(DeckLoader *deckToOpen)
Definition tab_supervisor.cpp:886
TabArchidekt * addArchidektTab()
Definition tab_supervisor.cpp:908
void retranslateUi()
Definition tab_supervisor.cpp:205
ServerInfo_User * userInfo
Definition tab_supervisor.h:94
TabDeckStorage * tabDeckStorage
Definition tab_supervisor.h:103
void updateTabText(Tab *tab, const QString &newTabText)
Definition tab_supervisor.cpp:957
void actTabHome(bool checked)
Definition tab_supervisor.cpp:509
void processNotifyUserEvent(const Event_NotifyUser &event)
Definition tab_supervisor.cpp:1072
static void actShowPopup(const QString &message)
Definition tab_supervisor.cpp:1003
TabVisualDatabaseDisplay * addVisualDatabaseDisplayTab()
Definition tab_supervisor.cpp:917
QAction * aTabEdhRec
Definition tab_supervisor.h:114
void initStartupTabs()
Definition tab_supervisor.cpp:325
bool getAdminLocked() const
Definition tab_supervisor.cpp:1065
QAction * aTabHome
Definition tab_supervisor.h:114
Definition tab_visual_database_display.h:14
Definition user_list_manager.h:27
Q_LOGGING_CATEGORY(TabSupervisorLog, "tab_supervisor")