mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
New visual deck storage (#5290)
* Add TabDeckStorageVisual * Visual Deck Storage * Add BannerCard to .cod format, use it in the visual deck storage widget. * Show filename instead of deckname if deck name is empty. * Lint. * Don't delint cmake list through hooks. * Add deck loading functionality. * Open Decks on double click, not single click. * Void event for now. * Fix build issue with overload? * Fix build issue with overload? * Include QDebug. * Turn the tab into a widget. * Move the signals down to the widget, move the connections and slots up to the parent widgets. * No banner card equals an empty CardInfoPtr. * Add an option to sort by filename or last modified. * Flip last modified comparison. * Lint. * Don't open decks twice in the storage tab. * Fix unload deck not working by showing/hiding widgets instead of adding/removing to layout. * Add a search bar. * Add a card size slider. * Lint. * Lint. * Lint. * Fix settings mocks. * No need to QDebug. * No need to QDebug. * Member variable. * Member variable. * Non-lambda. * Change set to list conversion. * Specify overload. * Include MouseEvent * Adjust font size dynamically. * Add an option to show the visual deck storage on database load. * Fix the close button not working on the tab, add an option to launch the visual deck storage tab to Cockatrice menu. * Override virtual functions. * Correct tab text. * Add a setting to remember last used sorting order for visual deck storage widget. * Update banner card combo box correctly. * Fix mocks. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: Zach H <zahalpern+github@gmail.com>
This commit is contained in:
parent
7496e79e8c
commit
62f7c7f9ce
30 changed files with 834 additions and 31 deletions
|
|
@ -290,6 +290,11 @@ void MainWindow::actDeckEditor()
|
|||
tabSupervisor->addDeckEditorTab(nullptr);
|
||||
}
|
||||
|
||||
void MainWindow::actVisualDeckStorage()
|
||||
{
|
||||
tabSupervisor->addVisualDeckStorageTab();
|
||||
}
|
||||
|
||||
void MainWindow::actFullScreen(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
|
|
@ -660,6 +665,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..."));
|
||||
|
|
@ -707,6 +713,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)));
|
||||
|
|
@ -794,6 +802,7 @@ void MainWindow::createMenus()
|
|||
cockatriceMenu->addAction(aWatchReplay);
|
||||
cockatriceMenu->addSeparator();
|
||||
cockatriceMenu->addAction(aDeckEditor);
|
||||
cockatriceMenu->addAction(aVisualDeckStorage);
|
||||
cockatriceMenu->addSeparator();
|
||||
cockatriceMenu->addAction(aFullScreen);
|
||||
cockatriceMenu->addSeparator();
|
||||
|
|
@ -881,6 +890,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
|
||||
if (SettingsCache::instance().getVisualDeckStorageShowOnLoad()) {
|
||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseLoadingFinished()), tabSupervisor,
|
||||
SLOT(addVisualDeckStorageTab()));
|
||||
}
|
||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseLoadingFailed()), this,
|
||||
SLOT(cardDatabaseLoadingFailed()));
|
||||
connect(CardDatabaseManager::getInstance(), SIGNAL(cardDatabaseNewSetsFound(int, QStringList)), this,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue