Cockatrice 2026-06-01-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
MainWindow Class Reference

#include <window_main.h>

Inheritance diagram for MainWindow:
[legend]
Collaboration diagram for MainWindow:
[legend]

Public Slots

void actCheckCardUpdates ()
void actCheckCardUpdatesBackground ()
void actCheckServerUpdates ()
void actCheckClientUpdates ()
void actConnect ()
void actExit ()

Public Member Functions

 MainWindow (QWidget *parent=nullptr)
void setConnectTo (QString url)
 ~MainWindow () override
TabSupervisorgetTabSupervisor () const

Protected Member Functions

void closeEvent (QCloseEvent *event) override
void changeEvent (QEvent *event) override

Private Slots

void updateTabMenu (const QList< QMenu * > &newMenuList)
void statusChanged (ClientStatus _status)
void localGameEnded ()
void pixmapCacheSizeChanged (int newSizeInMBs)
void actDisconnect ()
void actSinglePlayer ()
void actWatchReplay ()
void actFullScreen (bool checked)
void actSettings ()
void actAbout ()
void actTips ()
void actUpdate ()
void actViewLog ()
void actOpenSettingsFolder ()
void actShow ()
void showWindowIfHidden ()
void cardUpdateError (QProcess::ProcessError err)
void cardUpdateFinished (int exitCode, QProcess::ExitStatus exitStatus)
void refreshShortcuts ()
void cardDatabaseLoadingFailed ()
void cardDatabaseNewSetsFound (int numUnknownSets, QStringList unknownSetsNames)
void cardDatabaseAllNewSetsEnabled ()
void checkClientUpdatesFinished (bool needToUpdate, bool isCompatible, Release *release)
void actOpenCustomFolder ()
void actOpenCustomsetsFolder ()
void actAddCustomSet ()
void actReloadCardDatabase ()
void actManageSets ()
void actEditTokens ()
void startupConfigCheck ()
void alertForcedOracleRun (const QString &version, bool isUpdate)

Private Member Functions

void retranslateUi ()
void createActions ()
void createMenus ()
void createTrayIcon ()
int getNextCustomSetPrefix (QDir dataDir)
QString getCardUpdaterBinaryName ()
void createCardUpdateProcess (bool background=false)
void exitCardDatabaseUpdate ()
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
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 * aStatusBar
QAction * aViewLog
QAction * aOpenSettingsFolder
TabSupervisortabSupervisor
WndSetswndSets
ConnectionControllerconnectionController
LocalServerlocalServer
bool bHasActivated
bool askedForDbUpdater
QProcess * cardUpdateProcess
DlgViewLoglogviewDialog
GameReplay * replay
DlgTipOfTheDaytip
QUrl connectTo

Static Private Attributes

static const QString appName = "Cockatrice"
static const QStringList fileNameFilters

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( QWidget * parent = nullptr)
explicit
Here is the call graph for this function:

◆ ~MainWindow()

MainWindow::~MainWindow ( )
override

Member Function Documentation

◆ actAbout

void MainWindow::actAbout ( )
privateslot
Here is the caller graph for this function:

◆ actAddCustomSet

void MainWindow::actAddCustomSet ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actCheckCardUpdates

void MainWindow::actCheckCardUpdates ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actCheckCardUpdatesBackground

void MainWindow::actCheckCardUpdatesBackground ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actCheckClientUpdates

void MainWindow::actCheckClientUpdates ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actCheckServerUpdates

void MainWindow::actCheckServerUpdates ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actConnect

void MainWindow::actConnect ( )
slot
Here is the caller graph for this function:

◆ actDisconnect

void MainWindow::actDisconnect ( )
privateslot
Here is the caller graph for this function:

◆ actEditTokens

void MainWindow::actEditTokens ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actExit

void MainWindow::actExit ( )
slot
Here is the caller graph for this function:

◆ actFullScreen

void MainWindow::actFullScreen ( bool checked)
privateslot
Here is the caller graph for this function:

◆ actManageSets

void MainWindow::actManageSets ( )
privateslot
Here is the caller graph for this function:

◆ actOpenCustomFolder

void MainWindow::actOpenCustomFolder ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actOpenCustomsetsFolder

void MainWindow::actOpenCustomsetsFolder ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actOpenSettingsFolder

void MainWindow::actOpenSettingsFolder ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actReloadCardDatabase

void MainWindow::actReloadCardDatabase ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actSettings

void MainWindow::actSettings ( )
privateslot
Here is the caller graph for this function:

◆ actShow

void MainWindow::actShow ( )
privateslot
Here is the caller graph for this function:

◆ actSinglePlayer

void MainWindow::actSinglePlayer ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actTips

void MainWindow::actTips ( )
privateslot
Here is the caller graph for this function:

◆ actUpdate

void MainWindow::actUpdate ( )
privateslot
Here is the caller graph for this function:

◆ actViewLog

void MainWindow::actViewLog ( )
privateslot
Here is the caller graph for this function:

◆ actWatchReplay

void MainWindow::actWatchReplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ alertForcedOracleRun

void MainWindow::alertForcedOracleRun ( const QString & version,
bool isUpdate )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cardDatabaseAllNewSetsEnabled

void MainWindow::cardDatabaseAllNewSetsEnabled ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cardDatabaseLoadingFailed

void MainWindow::cardDatabaseLoadingFailed ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cardDatabaseNewSetsFound

void MainWindow::cardDatabaseNewSetsFound ( int numUnknownSets,
QStringList unknownSetsNames )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cardUpdateError

void MainWindow::cardUpdateError ( QProcess::ProcessError err)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cardUpdateFinished

void MainWindow::cardUpdateFinished ( int exitCode,
QProcess::ExitStatus exitStatus )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeEvent()

void MainWindow::changeEvent ( QEvent * event)
overrideprotected
Here is the call graph for this function:

◆ checkClientUpdatesFinished

void MainWindow::checkClientUpdatesFinished ( bool needToUpdate,
bool isCompatible,
Release * release )
privateslot
Here is the caller graph for this function:

◆ closeEvent()

void MainWindow::closeEvent ( QCloseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ createActions()

void MainWindow::createActions ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createCardUpdateProcess()

void MainWindow::createCardUpdateProcess ( bool background = false)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMenus()

void MainWindow::createMenus ( )
private
Here is the caller graph for this function:

◆ createTrayIcon()

void MainWindow::createTrayIcon ( )
private
Here is the caller graph for this function:

◆ exitCardDatabaseUpdate()

void MainWindow::exitCardDatabaseUpdate ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCardUpdaterBinaryName()

QString MainWindow::getCardUpdaterBinaryName ( )
inlineprivate
Here is the caller graph for this function:

◆ getNextCustomSetPrefix()

int MainWindow::getNextCustomSetPrefix ( QDir dataDir)
private
Here is the caller graph for this function:

◆ getTabSupervisor()

TabSupervisor * MainWindow::getTabSupervisor ( ) const
inline

◆ localGameEnded

void MainWindow::localGameEnded ( )
privateslot
Here is the caller graph for this function:

◆ pixmapCacheSizeChanged

void MainWindow::pixmapCacheSizeChanged ( int newSizeInMBs)
privateslot
Here is the caller graph for this function:

◆ refreshShortcuts

void MainWindow::refreshShortcuts ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void MainWindow::retranslateUi ( )
private
Here is the caller graph for this function:

◆ setConnectTo()

void MainWindow::setConnectTo ( QString url)
inline
Here is the caller graph for this function:

◆ showWindowIfHidden

void MainWindow::showWindowIfHidden ( )
privateslot
Here is the caller graph for this function:

◆ startLocalGame()

void MainWindow::startLocalGame ( const LocalGameOptions & options)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startupConfigCheck

void MainWindow::startupConfigCheck ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ statusChanged

void MainWindow::statusChanged ( ClientStatus _status)
privateslot
Here is the caller graph for this function:

◆ updateTabMenu

void MainWindow::updateTabMenu ( const QList< QMenu * > & newMenuList)
privateslot

Replaces the tab-specific menus that are shown in the menuBar.

Parameters
newMenuListThe tab-specific menus to show in the menuBar
Here is the caller graph for this function:

Member Data Documentation

◆ aAbout

QAction* MainWindow::aAbout
private

◆ aAddCustomSet

QAction * MainWindow::aAddCustomSet
private

◆ aCheckCardUpdates

QAction * MainWindow::aCheckCardUpdates
private

◆ aCheckCardUpdatesBackground

QAction * MainWindow::aCheckCardUpdatesBackground
private

◆ aConnect

QAction* MainWindow::aConnect
private

◆ aDisconnect

QAction * MainWindow::aDisconnect
private

◆ aEditTokens

QAction * MainWindow::aEditTokens
private

◆ aExit

QAction * MainWindow::aExit
private

◆ aForgotPassword

QAction * MainWindow::aForgotPassword
private

◆ aFullScreen

QAction * MainWindow::aFullScreen
private

◆ aManageSets

QAction* MainWindow::aManageSets
private

◆ aOpenCustomFolder

QAction * MainWindow::aOpenCustomFolder
private

◆ aOpenCustomsetsFolder

QAction * MainWindow::aOpenCustomsetsFolder
private

◆ aOpenSettingsFolder

QAction * MainWindow::aOpenSettingsFolder
private

◆ appName

const QString MainWindow::appName = "Cockatrice"
staticprivate

◆ aRegister

QAction * MainWindow::aRegister
private

◆ aReloadCardDatabase

QAction * MainWindow::aReloadCardDatabase
private

◆ aSettings

QAction * MainWindow::aSettings
private

◆ aShow

QAction * MainWindow::aShow
private

◆ aSinglePlayer

QAction * MainWindow::aSinglePlayer
private

◆ askedForDbUpdater

bool MainWindow::askedForDbUpdater
private

◆ aStatusBar

QAction * MainWindow::aStatusBar
private

◆ aTips

QAction* MainWindow::aTips
private

◆ aUpdate

QAction * MainWindow::aUpdate
private

◆ aViewLog

QAction * MainWindow::aViewLog
private

◆ aWatchReplay

QAction * MainWindow::aWatchReplay
private

◆ bHasActivated

bool MainWindow::bHasActivated
private

◆ cardUpdateProcess

QProcess* MainWindow::cardUpdateProcess
private

◆ cockatriceMenu

QMenu* MainWindow::cockatriceMenu
private

◆ connectionController

ConnectionController* MainWindow::connectionController
private

◆ connectTo

QUrl MainWindow::connectTo
private

◆ dbMenu

QMenu * MainWindow::dbMenu
private

◆ fileNameFilters

const QStringList MainWindow::fileNameFilters
staticprivate
Initial value:
= QStringList() << QObject::tr("Cockatrice card database (*.xml)")
<< QObject::tr("All files (*.*)")

◆ helpMenu

QMenu * MainWindow::helpMenu
private

◆ localServer

LocalServer* MainWindow::localServer
private

◆ logviewDialog

DlgViewLog* MainWindow::logviewDialog
private

◆ replay

GameReplay* MainWindow::replay
private

◆ tabMenus

QList<QMenu *> MainWindow::tabMenus
private

◆ tabsMenu

QMenu * MainWindow::tabsMenu
private

◆ tabSupervisor

TabSupervisor* MainWindow::tabSupervisor
private

◆ tip

DlgTipOfTheDay* MainWindow::tip
private

◆ trayIconMenu

QMenu * MainWindow::trayIconMenu
private

◆ wndSets

WndSets* MainWindow::wndSets
private

The documentation for this class was generated from the following files: