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' 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>
49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
#ifndef DECK_EDITOR_SETTINGS_H
|
|
#define DECK_EDITOR_SETTINGS_H
|
|
|
|
#include "settings_manager.h"
|
|
|
|
#include <libcockatrice/interfaces/interface_deck_editor_settings_provider.h>
|
|
|
|
enum commanderSpellbookIntegrationEnabledIndex
|
|
{
|
|
commanderSpellbookIntegrationEnabledIndexDisabled,
|
|
commanderSpellbookIntegrationEnabledIndexEnabled,
|
|
commanderSpellbookIntegrationEnabledIndexAutomatic,
|
|
commanderSpellbookIntegrationEnabledIndexUnprompted,
|
|
};
|
|
|
|
class DeckEditorSettings : public SettingsManager, public IDeckEditorSettingsProvider
|
|
{
|
|
Q_OBJECT
|
|
friend class SettingsCache;
|
|
|
|
public:
|
|
[[nodiscard]] bool getOpenDeckInNewTab() const override;
|
|
[[nodiscard]] bool getBannerCardComboBoxVisible() const override;
|
|
[[nodiscard]] bool getTagsWidgetVisible() const override;
|
|
[[nodiscard]] int getDefaultDeckEditorType() const override;
|
|
[[nodiscard]] int getCommanderSpellbookIntegrationEnabled() const;
|
|
[[nodiscard]] bool getCommanderSpellbookIntegrationUseOfficialBracketNames() const;
|
|
|
|
void setOpenDeckInNewTab(bool _openDeckInNewTab);
|
|
void setBannerCardComboBoxVisible(bool _bannerCardComboBoxVisible);
|
|
void setTagsWidgetVisible(bool _tagsWidgetVisible);
|
|
void setDefaultDeckEditorType(int _defaultDeckEditorType);
|
|
void setCommanderSpellbookIntegrationEnabled(int _commanderSpellbookIntegrationEnabled);
|
|
void setCommanderSpellbookIntegrationUseOfficialBracketNames(bool _useOfficialBracketNames);
|
|
|
|
signals:
|
|
void bannerCardComboBoxVisibleChanged(bool visible);
|
|
void tagsWidgetVisibleChanged(bool visible);
|
|
void commanderSpellbookIntegrationEnabledChanged(int enabled);
|
|
void commanderSpellbookIntegrationUseOfficialBracketNamesChanged(bool useOfficialBracketNames);
|
|
|
|
public:
|
|
explicit DeckEditorSettings(const QString &settingPath, QObject *parent = nullptr);
|
|
|
|
private:
|
|
DeckEditorSettings(const DeckEditorSettings & /*other*/);
|
|
};
|
|
|
|
#endif // DECK_EDITOR_SETTINGS_H
|