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:93
Represents a complete deck, including metadata, zones, cards, and sideboard plans.
Definition deck_list.h:63
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:38
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:684
QAction * aTabLog
Definition tab_supervisor.h:115
QList< TabGame * > replayTabs
Definition tab_supervisor.h:109
TabEdhRecMain * addEdhrecMainTab()
Definition tab_supervisor.cpp:921
TabDeckStorageVisual * tabVisualDeckStorage
Definition tab_supervisor.h:100
int getGameCount() const
Definition tab_supervisor.h:135
void refreshShortcuts()
Definition tab_supervisor.cpp:266
void openTabAdmin()
Definition tab_supervisor.cpp:672
QAction * aTabAccount
Definition tab_supervisor.h:115
void openTabHome()
Definition tab_supervisor.cpp:530
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:313
QMenu * tabsMenu
Definition tab_supervisor.h:98
void openTabDeckStorage()
Definition tab_supervisor.cpp:624
QMap< int, TabGame * > gameTabs
Definition tab_supervisor.h:108
void roomLeft(TabRoom *tab)
Definition tab_supervisor.cpp:783
void openTabVisualDeckStorage()
Definition tab_supervisor.cpp:554
TabAccount * getTabAccount() const
Definition tab_supervisor.h:139
void actTabVisualDeckStorage(bool checked)
Definition tab_supervisor.cpp:541
void addCloseButtonToTab(Tab *tab, int tabIndex, QAction *manager)
Definition tab_supervisor.cpp:380
const UserListManager * getUserListManager() const
Definition tab_supervisor.h:148
void gameLeft(TabGame *tab)
Definition tab_supervisor.cpp:756
~TabSupervisor() override
Definition tab_supervisor.cpp:195
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:969
QList< AbstractClient * > localClients
Definition tab_supervisor.h:97
QAction * aTabAdmin
Definition tab_supervisor.h:115
AbstractClient * getClient() const
Definition tab_supervisor.cpp:303
void processUserJoined(const ServerInfo_User &userInfo)
Definition tab_supervisor.cpp:1051
TabServer * tabServer
Definition tab_supervisor.h:101
QAction * aTabVisualDeckStorage
Definition tab_supervisor.h:114
void talkLeft(TabMessage *tab)
Definition tab_supervisor.cpp:860
void actTabAccount(bool checked)
Definition tab_supervisor.cpp:588
void processUserMessageEvent(const Event_UserMessage &event)
Definition tab_supervisor.cpp:1007
TabAdmin * tabAdmin
Definition tab_supervisor.h:105
TabSupervisor(AbstractClient *_client, QMenu *tabsMenu, QWidget *parent=nullptr)
Definition tab_supervisor.cpp:110
void openTabReplays()
Definition tab_supervisor.cpp:649
bool getIsLocalGame() const
Definition tab_supervisor.h:131
void gameJoined(const Event_GameJoined &event)
Definition tab_supervisor.cpp:718
TabReplays * tabReplays
Definition tab_supervisor.h:104
void processUserLeft(const QString &userName)
Definition tab_supervisor.cpp:1043
TabDeckEditorVisual * addVisualDeckEditorTab(const LoadedDeck &deckToOpen)
Definition tab_supervisor.cpp:909
static QString sanitizeTabName(QString dirty)
Definition tab_supervisor.cpp:308
bool switchToGameTabIfAlreadyExists(const int gameId)
Definition tab_supervisor.cpp:1154
void closeEvent(QCloseEvent *event) override
Definition tab_supervisor.cpp:282
void actTabDeckStorage(bool checked)
Definition tab_supervisor.cpp:613
TabHome * tabHome
Definition tab_supervisor.h:99
void addRoomTab(const ServerInfo_Room &info, bool setCurrent)
Definition tab_supervisor.cpp:770
void actTabReplays(bool checked)
Definition tab_supervisor.cpp:636
void startLocal(const QList< AbstractClient * > &_clients)
Definition tab_supervisor.cpp:450
void switchToFirstAvailableNetworkTab()
Definition tab_supervisor.cpp:793
void openTabServer()
Definition tab_supervisor.cpp:576
TabEdhRec * addEdhrecTab(const CardInfoPtr &cardToQuery, bool isCommander=false)
Definition tab_supervisor.cpp:947
QMap< int, TabRoom * > roomTabs
Definition tab_supervisor.h:107
void actTabAdmin(bool checked)
Definition tab_supervisor.cpp:661
void openTabAccount()
Definition tab_supervisor.cpp:599
AbstractClient * client
Definition tab_supervisor.h:95
int myAddTab(Tab *tab, QAction *manager=nullptr)
Definition tab_supervisor.cpp:358
void processRoomEvent(const RoomEvent &event)
Definition tab_supervisor.cpp:988
void openReplay(GameReplay *replay)
Definition tab_supervisor.cpp:804
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:397
UserListManager * userListManager
Definition tab_supervisor.h:96
void updatePingTime(int value, int max)
Definition tab_supervisor.cpp:706
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:565
QAction * aTabVisualDatabaseDisplay
Definition tab_supervisor.h:115
void stop()
Definition tab_supervisor.cpp:470
void adminLockChanged(bool lock)
TabLog * tabLog
Definition tab_supervisor.h:106
void replayLeft(TabGame *tab)
Definition tab_supervisor.cpp:813
void processGameEventContainer(const GameEventContainer &cont)
Definition tab_supervisor.cpp:996
TabMessage * addMessageTab(const QString &userName, bool focus)
Definition tab_supervisor.cpp:822
void maximizeMainWindow()
Definition tab_supervisor.cpp:855
void openTabLog()
Definition tab_supervisor.cpp:695
QAction * aTabDeckStorage
Definition tab_supervisor.h:115
QList< AbstractTabDeckEditor * > getDeckEditorTabs() const
Definition tab_supervisor.h:156
void deckEditorClosed(AbstractTabDeckEditor *tab)
Definition tab_supervisor.cpp:959
TabAccount * tabAccount
Definition tab_supervisor.h:102
TabDeckEditor * addDeckEditorTab(const LoadedDeck &deckToOpen)
Definition tab_supervisor.cpp:897
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:1077
void start(const ServerInfo_User &userInfo)
Definition tab_supervisor.cpp:412
void localGameJoined(const Event_GameJoined &event)
Definition tab_supervisor.cpp:740
TabArchidekt * addArchidektTab()
Definition tab_supervisor.cpp:930
void retranslateUi()
Definition tab_supervisor.cpp:209
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:981
void actTabHome(bool checked)
Definition tab_supervisor.cpp:520
void processNotifyUserEvent(const Event_NotifyUser &event)
Definition tab_supervisor.cpp:1105
static void actShowPopup(const QString &message)
Definition tab_supervisor.cpp:1032
TabVisualDatabaseDisplay * addVisualDatabaseDisplayTab()
Definition tab_supervisor.cpp:939
QAction * aTabEdhRec
Definition tab_supervisor.h:114
void initStartupTabs()
Definition tab_supervisor.cpp:334
void openDeckInNewTab(const LoadedDeck &deckToOpen)
Definition tab_supervisor.cpp:875
bool getAdminLocked() const
Definition tab_supervisor.cpp:1097
QAction * aTabHome
Definition tab_supervisor.h:114
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")