mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Visual deck storage v2 (#5427)
* Restore some button states (ready/sideboard locked) to sensible defaults when unloading a deck. * Update last loaded timestamp in decklist file and then restore original last modified timestamp if a user requests a deck load. * Add some todos. * Loading a deck from local file dialog should swap out scenes, enable unload button. * Lint. * Shuffle some classes and signals around. * More sort options, sort widgets directly. * Banner cards should respect providerIds. * Properly updateSortOrder on load. * Add the color identity to the Deck Preview Widget. * Properly set sort indices. * Change replace visualDeckStorageWidget with deckView to be in deckSelectFinished so that it also works on remote deck load. * Include settings for unused color identities display. * Change opacity scaling. * Overload for Qt. * Lint. * Lint. * Include QMouseEvent * Template because MacOs. * Include a quick filter for color identities. * Include a quick filter for color identities. * Save some space. * Refactor DeckPreviewWidgets to reside in their own folder. * Add Deck Loader logging category. * Introduce a tagging system. * Add some more default tags. * Even more default tags. * Lint. * Lint a comma. * Remove extra set of braces. * Lint some stuff. * Refresh banner cards when tags are added. * Lint. * Wrestle with Qt Checkboxes. * Lint. * Adjust some sizes, relayout. * Address comments. * Lint. * Reorder kindred types. * Add a search bar for tags. * Remove close button (for now) and change "Add tags ..." to "Edit tags ..." * Retranslate window title for Deck Tag Manager Dialog. * Style tag addition widget to be consistent. * Lint. * Override paintEvent. * Override sizeHint --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
9bd024d39f
commit
dd8ac14f99
46 changed files with 1899 additions and 153 deletions
|
|
@ -350,9 +350,26 @@ AppearanceSettingsPage::AppearanceSettingsPage()
|
|||
connect(&showVisualDeckStorageOnLoadCheckBox, &QCheckBox::QT_STATE_CHANGED, &settings,
|
||||
&SettingsCache::setVisualDeckStorageShowOnLoad);
|
||||
|
||||
visualDeckStorageDrawUnusedColorIdentitiesCheckBox.setChecked(
|
||||
settings.getVisualDeckStorageDrawUnusedColorIdentities());
|
||||
connect(&visualDeckStorageDrawUnusedColorIdentitiesCheckBox, &QCheckBox::QT_STATE_CHANGED, &settings,
|
||||
&SettingsCache::setVisualDeckStorageDrawUnusedColorIdentities);
|
||||
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setMinimum(0);
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setMaximum(100);
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setValue(
|
||||
settings.getVisualDeckStorageUnusedColorIdentitiesOpacity());
|
||||
connect(&visualDeckStorageUnusedColorIdentitiesOpacitySpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||
&settings, &SettingsCache::setVisualDeckStorageUnusedColorIdentitiesOpacity);
|
||||
|
||||
visualDeckStorageUnusedColorIdentitiesOpacityLabel.setBuddy(&visualDeckStorageUnusedColorIdentitiesOpacitySpinBox);
|
||||
|
||||
auto *menuGrid = new QGridLayout;
|
||||
menuGrid->addWidget(&showShortcutsCheckBox, 0, 0);
|
||||
menuGrid->addWidget(&showVisualDeckStorageOnLoadCheckBox, 1, 0);
|
||||
menuGrid->addWidget(&visualDeckStorageDrawUnusedColorIdentitiesCheckBox, 2, 0);
|
||||
menuGrid->addWidget(&visualDeckStorageUnusedColorIdentitiesOpacityLabel, 3, 0);
|
||||
menuGrid->addWidget(&visualDeckStorageUnusedColorIdentitiesOpacitySpinBox, 3, 1);
|
||||
|
||||
menuGroupBox = new QGroupBox;
|
||||
menuGroupBox->setLayout(menuGrid);
|
||||
|
|
@ -488,6 +505,10 @@ void AppearanceSettingsPage::retranslateUi()
|
|||
menuGroupBox->setTitle(tr("Menu settings"));
|
||||
showShortcutsCheckBox.setText(tr("Show keyboard shortcuts in right-click menus"));
|
||||
showVisualDeckStorageOnLoadCheckBox.setText(tr("Show visual deck storage on database load"));
|
||||
visualDeckStorageDrawUnusedColorIdentitiesCheckBox.setText(
|
||||
tr("Draw missing color identities in visual deck storage without color label"));
|
||||
visualDeckStorageUnusedColorIdentitiesOpacityLabel.setText(tr("Missing color identity opacity"));
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setSuffix("%");
|
||||
|
||||
cardsGroupBox->setTitle(tr("Card rendering"));
|
||||
displayCardNamesCheckBox.setText(tr("Display card names on cards having a picture"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue