Add a new dialog that allows editing the default suggested tags. (#5979)

* Add a new dialog that allows editing the default suggested tags.

* Lint.

* Actually hand linting, lol.

* Fix Build

* Add dialog.

* Use show() instead of exec(), properly size hint list item widgets.

* Fix... something to do with the build?

* Cast to abstract tab deck editor instead of regular.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
This commit is contained in:
BruebachL 2025-06-13 15:16:57 +02:00 committed by GitHub
parent da2488f7d8
commit c388cee1fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 363 additions and 87 deletions

View file

@ -42,6 +42,86 @@ constexpr int NETWORK_CACHE_SIZE_MAX = 1024 * 1024; // 1 TB
#define DEFAULT_FONT_SIZE 12
inline QStringList defaultTags = {
// Strategies
"🏃️ Aggro",
"🧙‍️ Control",
"⚔️ Midrange",
"🌀 Combo",
"🪓 Mill",
"🔒 Stax",
"🗺️ Landfall",
"🛡️ Pillowfort",
"🌱 Ramp",
"⚡ Storm",
"💀 Aristocrats",
"☠️ Reanimator",
"👹 Sacrifice",
"🔥 Burn",
"🌟 Lifegain",
"🔮 Spellslinger",
"👥 Tokens",
"🎭 Blink",
"⏳ Time Manipulation",
"🌍 Domain",
"💫 Proliferate",
"📜 Saga",
"🎲 Chaos",
"🪄 Auras",
"🔫 Pingers",
// Themes
"👑 Monarch",
"🚀 Vehicles",
"💉 Infect",
"🩸 Madness",
"🌀 Morph",
// Card Types
"⚔️ Creature",
"💎 Artifact",
"🌔 Enchantment",
"📖 Sorcery",
"⚡ Instant",
"🌌 Planeswalker",
"🌏 Land",
"🪄 Aura",
// Kindred Types
"🐉 Kindred",
"🧙 Humans",
"⚔️ Soldiers",
"🛡️ Knights",
"🎻 Bards",
"🧝 Elves",
"🌲 Dryads",
"😇 Angels",
"🎩 Wizards",
"🧛 Vampires",
"🦴 Skeletons",
"💀 Zombies",
"👹 Demons",
"👾 Eldrazi",
"🐉 Dragons",
"🐠 Merfolk",
"🦁 Cats",
"🐺 Wolves",
"🐺 Werewolves",
"🦇 Bats",
"🐀 Rats",
"🦅 Birds",
"🦗 Insects",
"🍄 Fungus",
"🐚 Sea Creatures",
"🐗 Boars",
"🦊 Foxes",
"🦄 Unicorns",
"🐘 Elephants",
"🐻 Bears",
"🦏 Rhinos",
"🦂 Scorpions",
};
class QSettings;
class CardCounterSettings;
@ -66,6 +146,7 @@ signals:
void deckEditorBannerCardComboBoxVisibleChanged(bool _visible);
void deckEditorTagsWidgetVisibleChanged(bool _visible);
void visualDeckStorageShowTagFilterChanged(bool _visible);
void visualDeckStorageDefaultTagsListChanged();
void visualDeckStorageShowBannerCardComboBoxChanged(bool _visible);
void visualDeckStorageShowTagsOnDeckPreviewsChanged(bool _visible);
void visualDeckStorageCardSizeChanged();
@ -149,6 +230,8 @@ private:
bool visualDeckStorageShowBannerCardComboBox;
bool visualDeckStorageShowTagsOnDeckPreviews;
bool visualDeckStorageShowTagFilter;
QStringList visualDeckStorageDefaultTagsList;
bool visualDeckStorageSearchFolderNames;
int visualDeckStorageCardSize;
bool visualDeckStorageDrawUnusedColorIdentities;
int visualDeckStorageUnusedColorIdentitiesOpacity;
@ -460,6 +543,14 @@ public:
{
return visualDeckStorageShowTagFilter;
}
QStringList getVisualDeckStorageDefaultTagsList() const
{
return visualDeckStorageDefaultTagsList;
}
bool getVisualDeckStorageSearchFolderNames() const
{
return visualDeckStorageSearchFolderNames;
}
bool getVisualDeckStorageShowBannerCardComboBox() const
{
return visualDeckStorageShowBannerCardComboBox;
@ -857,6 +948,8 @@ public slots:
void setVisualDeckStorageSortingOrder(int _visualDeckStorageSortingOrder);
void setVisualDeckStorageShowFolders(QT_STATE_CHANGED_T value);
void setVisualDeckStorageShowTagFilter(QT_STATE_CHANGED_T _showTags);
void setVisualDeckStorageDefaultTagsList(QStringList _defaultTagsList);
void setVisualDeckStorageSearchFolderNames(QT_STATE_CHANGED_T value);
void setVisualDeckStorageShowBannerCardComboBox(QT_STATE_CHANGED_T _showBannerCardComboBox);
void setVisualDeckStorageShowTagsOnDeckPreviews(QT_STATE_CHANGED_T _showTags);
void setVisualDeckStorageCardSize(int _visualDeckStorageCardSize);