![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <window_main.h>
Public Slots | |
| void | actCheckCardUpdates () |
| void | actCheckCardUpdatesBackground () |
| void | actCheckServerUpdates () |
| void | actCheckClientUpdates () |
| void | actConnect () |
| void | actExit () |
| void | handleCockatriceLink (const QString &url) |
Signals | |
| void | cardDatabaseUpdateFinished (bool success) |
| Emitted after the card-database update subprocess exits. | |
| void | cardDatabaseUpdateProgress (const CardUpdateProgress &progress) |
Emitted while the card-database update subprocess runs. progress.done/ byte counts for the first two stages and set indices for "import". | |
Public Member Functions | |
| MainWindow (QWidget *parent=nullptr) | |
| void | setConnectTo (QString url) |
| void | setSkipStartupAutoConnect (bool skip) |
| ~MainWindow () override | |
| RemoteClient * | getRemoteClient () const |
| TabSupervisor * | getTabSupervisor () const |
| bool | closeForUpdate () |
| Closes the window so an update installer can replace the running binaries. Returns true only if the shutdown actually ran (settings flushed, tabs shut down); false if the close was vetoed by the user or is already in progress. | |
Protected Member Functions | |
| void | closeEvent (QCloseEvent *event) override |
| void | changeEvent (QEvent *event) override |
Private Member Functions | |
| void | retranslateUi () |
| void | createActions () |
| void | createMenus () |
| void | createTrayIcon () |
| int | getNextCustomSetPrefix (QDir dataDir) |
| void | runFirstRunWizard (bool firstRun=false) |
| QString | getCardUpdaterBinaryName () |
| void | createCardUpdateProcess (bool background=false) |
| void | exitCardDatabaseUpdate (bool doReload) |
| void | reloadCardDatabaseAndCheckSets () |
| Reloads the card database on a worker thread and runs checkUnknownSets() once the finished snapshot has been swapped in. | |
| bool | requestCardUpdateRaise () |
| Tries to bring the open card database updater window to the front. | |
| void | announceCardUpdateRunning () |
| Tells the user an update is running without blocking, honoring a hidden status bar. | |
| void | notifyCardUpdateFinishedFromTray (bool success) |
| Posts a tray notification when the status bar cannot show progress. | |
| void | startLocalGame (const LocalGameOptions &options) |
Private Attributes | |
| QList< QMenu * > | tabMenus |
| QMenu * | cockatriceMenu |
| QMenu * | dbMenu |
| QMenu * | tabsMenu |
| QMenu * | helpMenu |
| QMenu * | trayIconMenu |
| QAction * | aAbout |
| QAction * | aSettings |
| QAction * | aShow |
| QAction * | aExit |
| QToolButton * | settingsButton = nullptr |
| QAction * | aConnect |
| QAction * | aDisconnect |
| QAction * | aRegister |
| QAction * | aForgotPassword |
| QAction * | aSinglePlayer |
| QAction * | aWatchReplay |
| QAction * | aFullScreen |
| QAction * | aManageSets |
| QAction * | aEditTokens |
| QAction * | aOpenCustomFolder |
| QAction * | aOpenCustomsetsFolder |
| QAction * | aAddCustomSet |
| QAction * | aReloadCardDatabase |
| QAction * | aTips |
| QAction * | aUpdate |
| QAction * | aCheckCardUpdates |
| QAction * | aCheckCardUpdatesBackground |
| QAction * | aFirstRunWizard |
| QAction * | aStatusBar |
| QAction * | aViewLog |
| QAction * | aOpenSettingsFolder |
| TabSupervisor * | tabSupervisor |
| IntentUrlParser * | urlParser |
| WndSets * | wndSets |
| ConnectionController * | connectionController |
| LocalServer * | localServer |
| LagMonitor | lagMonitor |
| watches the main thread for event loop stalls | |
| LatencyStatusWidget * | latencyStatus = nullptr |
| status bar widget with live round-trip stats and history graph | |
| bool | bHasActivated |
| bool | askedForDbUpdater |
| bool | bClosingDown = false |
| guards closeEvent() against re-entrancy | |
| bool | skipStartupAutoConnect = false |
| bool | startupAutoConnectAttempted = false |
| bool | firstRunWizardActive = false |
| QProcess * | cardUpdateProcess |
| QByteArray | cardUpdateOutputBuffer |
| QByteArray | cardUpdateErrorOutput |
| diagnostic output collected from the updater's stderr | |
| QByteArray | cardUpdateErrorPartial |
| incomplete trailing stderr line, kept for line-based logging | |
| CardUpdateStage | cardUpdateLoggedStage = CardUpdateStage::Unknown |
| stage of the last logged progress update | |
| QElapsedTimer | cardUpdateProgressLogTimer |
| throttles progress logging to the running stage | |
| CardDatabaseUpdateStatusBar * | cardUpdateStatusBar = nullptr |
| status bar widget tracking the card database update | |
| DlgViewLog * | logviewDialog |
| GameReplay * | replay |
| DlgTipOfTheDay * | tip |
| QUrl | connectTo |
Static Private Attributes | |
| static const QString | appName = "Cockatrice" |
| static const QStringList | fileNameFilters |
|
explicit |
|
override |
|
privateslot |
|
privateslot |
|
slot |
|
slot |
|
slot |
|
privateslot |
|
slot |
|
slot |
|
privateslot |
|
privateslot |
|
slot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
private |
Tells the user an update is running without blocking, honoring a hidden status bar.
|
privateslot |
Drives the server-based startup destinations (Server lobby, Server Room) through the intent system: fetch saved credentials, connect to the configured server, then land on the Lobby or join the configured room by name.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
signal |
Emitted after the card-database update subprocess exits.
|
signal |
Emitted while the card-database update subprocess runs. progress.done/ byte counts for the first two stages and set indices for "import". progress.total are
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
overrideprotected |
|
privateslot |
|
overrideprotected |
| bool MainWindow::closeForUpdate | ( | ) |
Closes the window so an update installer can replace the running binaries. Returns true only if the shutdown actually ran (settings flushed, tabs shut down); false if the close was vetoed by the user or is already in progress.
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlineprivate |
|
private |
|
inline |
|
inline |
|
slot |
|
privateslot |
|
private |
Posts a tray notification when the status bar cannot show progress.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
private |
Reloads the card database on a worker thread and runs checkUnknownSets() once the finished snapshot has been swapped in.
The loader never runs checkUnknownSets() itself (see main.cpp); post-update loads that can introduce new sets must own the check, and it has to run after the queued snapshot swap, not on the worker.
|
private |
Tries to bring the open card database updater window to the front.
|
private |
|
private |
|
inline |
|
inline |
|
privateslot |
|
private |
|
privateslot |
|
nodiscardprivateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Replaces the tab-specific menus that are shown in the menuBar.
| newMenuList | The tab-specific menus to show in the menuBar |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
guards closeEvent() against re-entrancy
|
private |
|
private |
diagnostic output collected from the updater's stderr
|
private |
incomplete trailing stderr line, kept for line-based logging
|
private |
stage of the last logged progress update
|
private |
|
private |
|
private |
throttles progress logging to the running stage
|
private |
status bar widget tracking the card database update
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
watches the main thread for event loop stalls
|
private |
status bar widget with live round-trip stats and history graph
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |