Convert json data holder to structs, rename variables, extract widget

- Extract bracket estimation UI from DeckEditorDeckDockWidget into a
  new CommanderBracketWidget
- Move CommanderSpellbook integration settings from CardsDisplaySettings
  to DeckEditorSettings (matching the settings refactor on master)
- Rename CommanderSpellbook integration variables to drop the redundant
  'DeckEditor' prefix

Took 4 minutes

# Commit time for manual adjustment:
# Took 6 minutes

# Commit time for manual adjustment:
# Took 8 minutes
This commit is contained in:
Lukas Brübach 2026-08-08 23:19:58 +02:00
parent b0035d41cb
commit 375898c565
30 changed files with 575 additions and 568 deletions

View file

@ -214,29 +214,3 @@ void CardsDisplaySettings::setSampleHandSize(int _sampleHandSize)
setValue(_sampleHandSize, "sampleHandSize", "cards", "cardSize");
emit sampleHandSizeChanged(_sampleHandSize);
}
int CardsDisplaySettings::getDeckEditorCommanderSpellbookIntegrationEnabled() const
{
return getValue("deckeditorcommanderspellbookintegrationenabled", "interface", QString(),
deckEditorCommanderSpellbookIntegrationEnabledIndexUnprompted)
.toInt();
}
bool CardsDisplaySettings::getDeckEditorCommanderSpellbookIntegrationUseOfficialBracketNames() const
{
return getValue("deckeditorcommanderspellbookintegrationuseofficialbracketnames", "interface", QString(), false)
.toBool();
}
void CardsDisplaySettings::setDeckEditorCommanderSpellbookIntegrationEnabled(int _enabled)
{
setValue(_enabled, "deckeditorcommanderspellbookintegrationenabled", "interface");
emit deckEditorCommanderSpellbookIntegrationEnabledChanged(_enabled);
}
void CardsDisplaySettings::setDeckEditorCommanderSpellbookIntegrationUseOfficialBracketNames(
bool _useOfficialBracketNames)
{
setValue(_useOfficialBracketNames, "deckeditorcommanderspellbookintegrationuseofficialbracketnames", "interface");
emit deckEditorCommanderSpellbookIntegrationUseOfficialBracketNamesChanged(_useOfficialBracketNames);
}