mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 00:55:09 -07:00
* [VDE] Add a new setting to determine initial tab (Context/Deck/Database) Took 16 minutes Took 4 seconds * Adjust tooltip Took 4 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
59 lines
2.3 KiB
C++
59 lines
2.3 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,
|
|
};
|
|
|
|
enum VdeStartupTab
|
|
{
|
|
VdeStartupTabContext, ///< Match the opened deck: new decks show the database display, existing decks the deck view
|
|
VdeStartupTabDeckDisplay, ///< Always open the Visual Deck View
|
|
VdeStartupTabDatabaseDisplay, ///< Always open the Visual Database Display
|
|
};
|
|
|
|
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 getVdeStartupTab() const;
|
|
[[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 setVdeStartupTab(int _vdeStartupTab);
|
|
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);
|
|
void vdeStartupTabChanged(int vdeStartupTab);
|
|
|
|
public:
|
|
explicit DeckEditorSettings(const QString &settingPath, QObject *parent = nullptr);
|
|
|
|
private:
|
|
DeckEditorSettings(const DeckEditorSettings & /*other*/);
|
|
};
|
|
|
|
#endif // DECK_EDITOR_SETTINGS_H
|