![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <tab_supervisor.h>
Public Types | |
| enum | DeckEditorType { ClassicDeckEditor , VisualDeckEditor } |
Public Slots | |
| void | openDeckInNewTab (const LoadedDeck &deckToOpen) |
| TabDeckEditor * | addDeckEditorTab (const LoadedDeck &deckToOpen) |
| TabDeckEditorVisual * | addVisualDeckEditorTab (const LoadedDeck &deckToOpen) |
| TabVisualDatabaseDisplay * | addVisualDatabaseDisplayTab () |
| TabEdhRecMain * | addEdhrecMainTab () |
| TabArchidekt * | addArchidektTab () |
| TabEdhRec * | addEdhrecTab (const CardInfoPtr &cardToQuery, bool isCommander=false) |
| void | openReplay (GameReplay *replay) |
| void | joinReportGame (int gameId, int roomId) |
| void | joinGameFromUserCard (int gameId, int roomId, bool asSpectator) |
| void | openTabModeration (const QString &userName={}) |
| void | switchToFirstAvailableNetworkTab () |
| void | maximizeMainWindow () |
| void | actTabVisualDeckStorage (bool checked) |
| void | actTabReplays (bool checked) |
| void | openTabServer () |
| void | addRoomTab (const ServerInfo_Room &info, bool setCurrent) |
| void | openTabPublicDecks (const QString &userName) |
Signals | |
| void | setMenu (const QList< QMenu * > &newMenuList=QList< QMenu * >()) |
| void | localGameEnded () |
| void | adminLockChanged (bool lock) |
| void | showWindowIfHidden () |
| void | cockatriceLinkActivated (const QString &url) |
Static Public Member Functions | |
| static void | actShowPopup (const QString &message) |
Private Member Functions | |
| int | myAddTab (Tab *tab, QAction *manager=nullptr) |
| void | addCloseButtonToTab (Tab *tab, int tabIndex, QAction *manager) |
| void | resetTabsMenu () |
| void | joinGameByIntent (int gameId, int roomId, bool asSpectator) |
Static Private Member Functions | |
| static QString | sanitizeTabName (QString dirty) |
| static QString | sanitizeHtml (QString dirty) |
|
explicit |
|
override |
|
static |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
slot |
|
privateslot |
|
privateslot |
|
slot |
|
slot |
|
private |
Adds a usable close button to the tab.
| tab | The Tab |
| tabIndex | The tab bar index of the tab |
| manager | The menu action that corresponds to this tab, if this is a single-instance managed tab. Pass in nullptr if this is not a managed tab. |
|
slot |
Creates a new deck editor tab
| deckToOpen | The deck to open in the tab. |
|
slot |
|
slot |
|
privateslot |
|
slot |
|
slot |
|
slot |
|
signal |
|
nodiscard |
|
override |
|
signal |
|
privateslot |
|
privateslot |
|
privateslot |
|
nodiscard |
Determine if a user is a moderator/administrator By seeing if they have the admin tab open & unlocked
|
nodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
nodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
| void TabSupervisor::initStartupTabs | ( | ) |
Opens the always-available tabs, depending on settings, and lands on the configured startup tab.
The startup destination is a request: tabs that were not open before (deck editors, storage tabs disabled in the Tabs menu) are opened as part of the startup flow. Destinations that require a server connection (Server, Server Room) are handled asynchronously by MainWindow through the intent system, since this class has no RemoteClient.
|
private |
Shared join/spectate driver behind the report tab and the profile hover card.
Runs the join/spectate intent for gameId in roomId.
The intent owns the whole flow: if the room tab is not open yet it joins the room first, then retries the game, so callers do not have to care whether the room happens to be on screen.
|
slot |
Joins or spectates a game listed on a user's profile hover card.
|
slot |
|
signal |
|
privateslot |
|
slot |
|
private |
Adds the tab to the TabSupervisor's tab bar.
| tab | The Tab to add |
| manager | The menu action that corresponds to this tab, if this is a single-instance managed tab. Pass in nullptr if this is not a managed tab. |
|
slot |
Creates a new deck editor tab and loads the deck into it. Creates either a classic or visual deck editor tab depending on settings
| deckToOpen | The deck to open in the tab. |
|
slot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
slot |
|
slot |
|
privateslot |
|
privateslot |
|
slot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
private |
Resets the tabs menu to the tabs that are always available
| void TabSupervisor::retranslateUi | ( | ) |
|
privateslot |
|
staticprivate |
|
staticprivate |
| void TabSupervisor::sendInviteToUser | ( | const QString & | userName, |
| const QString & | inviteText ) |
|
signal |
| void TabSupervisor::start | ( | const ServerInfo_User & | userInfo | ) |
| void TabSupervisor::startLocal | ( | const QList< AbstractClient * > & | _clients | ) |
| void TabSupervisor::stop | ( | ) |
Call this when Cockatrice disconnects from the server in order to clean up.
|
slot |
| bool TabSupervisor::switchToGameTabIfAlreadyExists | ( | const int | gameId | ) |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |