Fix the close button not working on the tab, add an option to launch the visual deck storage tab to Cockatrice menu.

This commit is contained in:
Lukas Brübach 2025-01-03 14:06:40 +01:00
parent 8a95617688
commit b2674c9767
4 changed files with 22 additions and 4 deletions

View file

@ -290,6 +290,11 @@ void MainWindow::actDeckEditor()
tabSupervisor->addDeckEditorTab(nullptr);
}
void MainWindow::actVisualDeckStorage()
{
tabSupervisor->addVisualDeckStorageTab();
}
void MainWindow::actFullScreen(bool checked)
{
if (checked)
@ -654,6 +659,7 @@ void MainWindow::retranslateUi()
aSinglePlayer->setText(tr("Start &local game..."));
aWatchReplay->setText(tr("&Watch replay..."));
aDeckEditor->setText(tr("&Deck editor"));
aVisualDeckStorage->setText(tr("&Visual Deck storage"));
aFullScreen->setText(tr("&Full screen"));
aRegister->setText(tr("&Register to server..."));
aForgotPassword->setText(tr("&Restore password..."));
@ -700,6 +706,8 @@ void MainWindow::createActions()
connect(aWatchReplay, SIGNAL(triggered()), this, SLOT(actWatchReplay()));
aDeckEditor = new QAction(this);
connect(aDeckEditor, SIGNAL(triggered()), this, SLOT(actDeckEditor()));
aVisualDeckStorage = new QAction(this);
connect(aVisualDeckStorage, SIGNAL(triggered()), this, SLOT(actVisualDeckStorage()));
aFullScreen = new QAction(this);
aFullScreen->setCheckable(true);
connect(aFullScreen, SIGNAL(toggled(bool)), this, SLOT(actFullScreen(bool)));
@ -785,6 +793,7 @@ void MainWindow::createMenus()
cockatriceMenu->addAction(aWatchReplay);
cockatriceMenu->addSeparator();
cockatriceMenu->addAction(aDeckEditor);
cockatriceMenu->addAction(aVisualDeckStorage);
cockatriceMenu->addSeparator();
cockatriceMenu->addAction(aFullScreen);
cockatriceMenu->addSeparator();