mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[DeckEditor] Use CommanderSpellbook.com to estimate bracket if format is 'commander' (#6415)
* [DeckEditor] Use CommanderSpellbook.com to estimate bracket if format is 'commander' Took 2 minutes Took 16 minutes * 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 --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
e9eab328a4
commit
827e44a4d3
35 changed files with 1642 additions and 8 deletions
|
|
@ -46,3 +46,27 @@ void DeckEditorSettings::setDefaultDeckEditorType(int _defaultDeckEditorType)
|
|||
{
|
||||
setValue(_defaultDeckEditorType, "defaultDeckEditorType");
|
||||
}
|
||||
|
||||
int DeckEditorSettings::getCommanderSpellbookIntegrationEnabled() const
|
||||
{
|
||||
return getValue("commanderspellbookintegrationenabled", QString(), QString(),
|
||||
commanderSpellbookIntegrationEnabledIndexUnprompted)
|
||||
.toInt();
|
||||
}
|
||||
|
||||
bool DeckEditorSettings::getCommanderSpellbookIntegrationUseOfficialBracketNames() const
|
||||
{
|
||||
return getValue("commanderspellbookintegrationuseofficialbracketnames", QString(), QString(), false).toBool();
|
||||
}
|
||||
|
||||
void DeckEditorSettings::setCommanderSpellbookIntegrationEnabled(int _commanderSpellbookIntegrationEnabled)
|
||||
{
|
||||
setValue(_commanderSpellbookIntegrationEnabled, "commanderspellbookintegrationenabled");
|
||||
emit commanderSpellbookIntegrationEnabledChanged(_commanderSpellbookIntegrationEnabled);
|
||||
}
|
||||
|
||||
void DeckEditorSettings::setCommanderSpellbookIntegrationUseOfficialBracketNames(bool _useOfficialBracketNames)
|
||||
{
|
||||
setValue(_useOfficialBracketNames, "commanderspellbookintegrationuseofficialbracketnames");
|
||||
emit commanderSpellbookIntegrationUseOfficialBracketNamesChanged(_useOfficialBracketNames);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue