Address review findings

This commit is contained in:
Lukas Brübach 2026-11-08 14:43:20 +01:00
parent 178d392361
commit 7c90211247
13 changed files with 229 additions and 67 deletions

View file

@ -5,8 +5,6 @@
#include "libcockatrice/utility/playmat_params.h"
#include <QChar>
#include <QDir>
#include <QFileInfo>
#include <QList>
#include <QVariant>
#include <QtGlobal>
@ -253,6 +251,21 @@ bool InterfaceSettings::getTutorialCompleted() const
return getValue("tutorialCompleted", QString(), QString(), false).toBool();
}
bool InterfaceSettings::getHomeTutorialCompleted() const
{
return getValue("tutorialHomeCompleted", QString(), QString(), false).toBool();
}
bool InterfaceSettings::getDeckEditorTutorialCompleted() const
{
return getValue("tutorialDeckEditorCompleted", QString(), QString(), false).toBool();
}
bool InterfaceSettings::getGameTutorialCompleted() const
{
return getValue("tutorialGameCompleted", QString(), QString(), false).toBool();
}
void InterfaceSettings::setUseTearOffMenus(bool _useTearOffMenus)
{
setValue(_useTearOffMenus, "useTearOffMenus");
@ -481,3 +494,18 @@ void InterfaceSettings::setTutorialCompleted(bool value)
{
setValue(value, "tutorialCompleted");
}
void InterfaceSettings::setHomeTutorialCompleted(bool value)
{
setValue(value, "tutorialHomeCompleted");
}
void InterfaceSettings::setDeckEditorTutorialCompleted(bool value)
{
setValue(value, "tutorialDeckEditorCompleted");
}
void InterfaceSettings::setGameTutorialCompleted(bool value)
{
setValue(value, "tutorialGameCompleted");
}

View file

@ -58,6 +58,9 @@ public:
[[nodiscard]] bool getBattlefieldFlashEnabled() const override;
[[nodiscard]] QStringList getUserListExpandedSections() const override;
[[nodiscard]] bool getTutorialCompleted() const;
[[nodiscard]] bool getHomeTutorialCompleted() const;
[[nodiscard]] bool getDeckEditorTutorialCompleted() const;
[[nodiscard]] bool getGameTutorialCompleted() const;
void setUseTearOffMenus(bool _useTearOffMenus);
void setCardViewInitialRowsMax(int _cardViewInitialRowsMax);
@ -98,6 +101,9 @@ public:
void setBattlefieldFlashEnabled(bool _battlefieldFlashEnabled);
void setUserListExpandedSections(const QStringList &sections);
void setTutorialCompleted(bool value);
void setHomeTutorialCompleted(bool value);
void setDeckEditorTutorialCompleted(bool value);
void setGameTutorialCompleted(bool value);
signals:
void useTearOffMenusChanged(bool state);