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>
46class GameEventContainer;
47class Event_GameJoined;
48class Event_UserMessage;
49class Event_NotifyUser;
59 QRect
subElementRect(SubElement,
const QStyleOption *,
const QWidget *)
const override;
67 [[nodiscard]] QSize
sizeHint()
const override;
74#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
120 int myAddTab(
Tab *tab, QAction *manager =
nullptr);
132 void startLocal(
const QList<AbstractClient *> &_clients);
168 void setMenu(
const QList<QMenu *> &newMenuList = QList<QMenu *>());
209 void gameJoined(
const Event_GameJoined &event);
212 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:93
Represents a complete deck, including metadata, zones, cards, and sideboard plans.
Definition deck_list.h:63
Definition tab_supervisor.h:56
QRect subElementRect(SubElement, const QStyleOption *, const QWidget *) const override
Definition tab_supervisor.cpp:41
Definition tab_account.h:27
Definition tab_admin.h:37
Tab for browsing, searching, and filtering Archidekt decks.
Definition tab_archidekt.h:38
Definition tab_card_art_rules.h:50
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:55
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:715
QAction * aTabCardArtRules
Definition tab_supervisor.h:118
QAction * aTabLog
Definition tab_supervisor.h:118
QList< TabGame * > replayTabs
Definition tab_supervisor.h:111
TabEdhRecMain * addEdhrecMainTab()
Definition tab_supervisor.cpp:952
TabDeckStorageVisual * tabVisualDeckStorage
Definition tab_supervisor.h:101
int getGameCount() const
Definition tab_supervisor.h:138
void refreshShortcuts()
Definition tab_supervisor.cpp:271
void openTabAdmin()
Definition tab_supervisor.cpp:679
QAction * aTabAccount
Definition tab_supervisor.h:117
void openTabHome()
Definition tab_supervisor.cpp:537
ServerInfo_User * getUserInfo() const
Definition tab_supervisor.h:146
QAction * aTabVisualDeckEditor
Definition tab_supervisor.h:116
static QString sanitizeHtml(QString dirty)
Definition tab_supervisor.cpp:318
QMenu * tabsMenu
Definition tab_supervisor.h:99
void openTabDeckStorage()
Definition tab_supervisor.cpp:631
UserListManager * getUserListManager() const
Definition tab_supervisor.h:151
QMap< int, TabGame * > gameTabs
Definition tab_supervisor.h:110
void roomLeft(TabRoom *tab)
Definition tab_supervisor.cpp:814
void openTabVisualDeckStorage()
Definition tab_supervisor.cpp:561
TabAccount * getTabAccount() const
Definition tab_supervisor.h:142
void actTabVisualDeckStorage(bool checked)
Definition tab_supervisor.cpp:548
void addCloseButtonToTab(Tab *tab, int tabIndex, QAction *manager)
Definition tab_supervisor.cpp:385
void gameLeft(TabGame *tab)
Definition tab_supervisor.cpp:787
~TabSupervisor() override
Definition tab_supervisor.cpp:200
QMap< QString, TabMessage * > messageTabs
Definition tab_supervisor.h:112
const QMap< int, TabRoom * > & getRoomTabs() const
Definition tab_supervisor.h:155
void tabUserEvent(bool globalEvent)
Definition tab_supervisor.cpp:1000
QList< AbstractClient * > localClients
Definition tab_supervisor.h:98
QAction * aTabAdmin
Definition tab_supervisor.h:117
AbstractClient * getClient() const
Definition tab_supervisor.cpp:308
void processUserJoined(const ServerInfo_User &userInfo)
Definition tab_supervisor.cpp:1088
TabServer * tabServer
Definition tab_supervisor.h:102
QAction * aTabVisualDeckStorage
Definition tab_supervisor.h:116
void talkLeft(TabMessage *tab)
Definition tab_supervisor.cpp:891
void actTabAccount(bool checked)
Definition tab_supervisor.cpp:595
void processUserMessageEvent(const Event_UserMessage &event)
Definition tab_supervisor.cpp:1038
TabAdmin * tabAdmin
Definition tab_supervisor.h:106
TabSupervisor(AbstractClient *_client, QMenu *tabsMenu, QWidget *parent=nullptr)
Definition tab_supervisor.cpp:111
void openTabReplays()
Definition tab_supervisor.cpp:656
bool getIsLocalGame() const
Definition tab_supervisor.h:134
void gameJoined(const Event_GameJoined &event)
Definition tab_supervisor.cpp:749
TabReplays * tabReplays
Definition tab_supervisor.h:105
void processUserLeft(const QString &userName)
Definition tab_supervisor.cpp:1080
TabDeckEditorVisual * addVisualDeckEditorTab(const LoadedDeck &deckToOpen)
Definition tab_supervisor.cpp:940
static QString sanitizeTabName(QString dirty)
Definition tab_supervisor.cpp:313
bool switchToGameTabIfAlreadyExists(const int gameId)
Definition tab_supervisor.cpp:1191
void closeEvent(QCloseEvent *event) override
Definition tab_supervisor.cpp:287
void actTabDeckStorage(bool checked)
Definition tab_supervisor.cpp:620
TabHome * tabHome
Definition tab_supervisor.h:100
void addRoomTab(const ServerInfo_Room &info, bool setCurrent)
Definition tab_supervisor.cpp:801
void actTabReplays(bool checked)
Definition tab_supervisor.cpp:643
void startLocal(const QList< AbstractClient * > &_clients)
Definition tab_supervisor.cpp:457
void switchToFirstAvailableNetworkTab()
Definition tab_supervisor.cpp:824
void openTabServer()
Definition tab_supervisor.cpp:583
TabEdhRec * addEdhrecTab(const CardInfoPtr &cardToQuery, bool isCommander=false)
Definition tab_supervisor.cpp:978
QMap< int, TabRoom * > roomTabs
Definition tab_supervisor.h:109
void actTabAdmin(bool checked)
Definition tab_supervisor.cpp:668
void openTabAccount()
Definition tab_supervisor.cpp:606
AbstractClient * client
Definition tab_supervisor.h:96
int myAddTab(Tab *tab, QAction *manager=nullptr)
Definition tab_supervisor.cpp:363
void processRoomEvent(const RoomEvent &event)
Definition tab_supervisor.cpp:1019
void openReplay(GameReplay *replay)
Definition tab_supervisor.cpp:835
QAction * aTabReplays
Definition tab_supervisor.h:117
DeckEditorType
Definition tab_supervisor.h:89
@ VisualDeckEditor
Definition tab_supervisor.h:91
@ ClassicDeckEditor
Definition tab_supervisor.h:90
void resetTabsMenu()
Definition tab_supervisor.cpp:402
UserListManager * userListManager
Definition tab_supervisor.h:97
void updatePingTime(int value, int max)
Definition tab_supervisor.cpp:737
bool isLocalGame
Definition tab_supervisor.h:114
QAction * aTabDeckEditor
Definition tab_supervisor.h:116
QList< AbstractTabDeckEditor * > deckEditorTabs
Definition tab_supervisor.h:113
void actTabServer(bool checked)
Definition tab_supervisor.cpp:572
QAction * aTabVisualDatabaseDisplay
Definition tab_supervisor.h:117
void stop()
Definition tab_supervisor.cpp:477
void adminLockChanged(bool lock)
TabLog * tabLog
Definition tab_supervisor.h:108
void replayLeft(TabGame *tab)
Definition tab_supervisor.cpp:844
void processGameEventContainer(const GameEventContainer &cont)
Definition tab_supervisor.cpp:1027
TabMessage * addMessageTab(const QString &userName, bool focus)
Definition tab_supervisor.cpp:853
void maximizeMainWindow()
Definition tab_supervisor.cpp:886
void openTabLog()
Definition tab_supervisor.cpp:726
QAction * aTabDeckStorage
Definition tab_supervisor.h:117
QList< AbstractTabDeckEditor * > getDeckEditorTabs() const
Definition tab_supervisor.h:159
void deckEditorClosed(AbstractTabDeckEditor *tab)
Definition tab_supervisor.cpp:990
TabAccount * tabAccount
Definition tab_supervisor.h:103
TabDeckEditor * addDeckEditorTab(const LoadedDeck &deckToOpen)
Definition tab_supervisor.cpp:928
QAction * aTabServer
Definition tab_supervisor.h:117
void actTabCardArtRules(bool checked)
Definition tab_supervisor.cpp:691
void showWindowIfHidden()
void setMenu(const QList< QMenu * > &newMenuList=QList< QMenu * >())
void openTabCardArtRules()
Definition tab_supervisor.cpp:701
QAction * aTabArchidekt
Definition tab_supervisor.h:116
void updateCurrent(int index)
Definition tab_supervisor.cpp:1114
void start(const ServerInfo_User &userInfo)
Definition tab_supervisor.cpp:417
void localGameJoined(const Event_GameJoined &event)
Definition tab_supervisor.cpp:771
TabArchidekt * addArchidektTab()
Definition tab_supervisor.cpp:961
void retranslateUi()
Definition tab_supervisor.cpp:214
ServerInfo_User * userInfo
Definition tab_supervisor.h:95
TabDeckStorage * tabDeckStorage
Definition tab_supervisor.h:104
void updateTabText(Tab *tab, const QString &newTabText)
Definition tab_supervisor.cpp:1012
void actTabHome(bool checked)
Definition tab_supervisor.cpp:527
TabCardArtRules * tabCardArtRules
Definition tab_supervisor.h:107
void processNotifyUserEvent(const Event_NotifyUser &event)
Definition tab_supervisor.cpp:1142
static void actShowPopup(const QString &message)
Definition tab_supervisor.cpp:1069
TabVisualDatabaseDisplay * addVisualDatabaseDisplayTab()
Definition tab_supervisor.cpp:970
QAction * aTabEdhRec
Definition tab_supervisor.h:116
void initStartupTabs()
Definition tab_supervisor.cpp:339
void openDeckInNewTab(const LoadedDeck &deckToOpen)
Definition tab_supervisor.cpp:906
bool getAdminLocked() const
Definition tab_supervisor.cpp:1134
QAction * aTabHome
Definition tab_supervisor.h:116
Definition tab_visual_database_display.h:14
Definition user_list_manager.h:27
Represents a deck that was loaded from somewhere. Contains the DeckList itself, as well as info about...
Definition loaded_deck.h:14
Q_LOGGING_CATEGORY(TabSupervisorLog, "tab_supervisor")