mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-23 10:52:16 -07:00
add debug settings; option to show cardIds
This commit is contained in:
parent
8c0093d453
commit
b650a359d2
7 changed files with 43 additions and 2 deletions
|
|
@ -181,6 +181,7 @@ SettingsCache::SettingsCache()
|
|||
downloadSettings = new DownloadSettings(settingsPath, this);
|
||||
recentsSettings = new RecentsSettings(settingsPath, this);
|
||||
cardOverrideSettings = new CardOverrideSettings(settingsPath, this);
|
||||
debugSettings = new DebugSettings(settingsPath, this);
|
||||
|
||||
if (!QFile(settingsPath + "global.ini").exists())
|
||||
translateLegacySettings();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "../utility/macros.h"
|
||||
#include "card_database_settings.h"
|
||||
#include "card_override_settings.h"
|
||||
#include "debug_settings.h"
|
||||
#include "download_settings.h"
|
||||
#include "game_filters_settings.h"
|
||||
#include "layouts_settings.h"
|
||||
|
|
@ -86,6 +87,7 @@ private:
|
|||
DownloadSettings *downloadSettings;
|
||||
RecentsSettings *recentsSettings;
|
||||
CardOverrideSettings *cardOverrideSettings;
|
||||
DebugSettings *debugSettings;
|
||||
|
||||
QByteArray mainWindowGeometry;
|
||||
QByteArray tokenDialogGeometry;
|
||||
|
|
@ -619,6 +621,10 @@ public:
|
|||
{
|
||||
return *cardOverrideSettings;
|
||||
}
|
||||
DebugSettings &debug() const
|
||||
{
|
||||
return *debugSettings;
|
||||
}
|
||||
bool getIsPortableBuild() const
|
||||
{
|
||||
return isPortableBuild;
|
||||
|
|
|
|||
10
cockatrice/src/settings/debug_settings.cpp
Normal file
10
cockatrice/src/settings/debug_settings.cpp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#include "debug_settings.h"
|
||||
|
||||
DebugSettings::DebugSettings(QString settingPath, QObject *parent) : SettingsManager(settingPath + "debug.ini", parent)
|
||||
{
|
||||
}
|
||||
|
||||
bool DebugSettings::getShowCardId()
|
||||
{
|
||||
return getValue("show", "cardId").toBool();
|
||||
}
|
||||
17
cockatrice/src/settings/debug_settings.h
Normal file
17
cockatrice/src/settings/debug_settings.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef DEBUG_SETTINGS_H
|
||||
#define DEBUG_SETTINGS_H
|
||||
#include "settings_manager.h"
|
||||
|
||||
class DebugSettings : public SettingsManager
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class SettingsCache;
|
||||
|
||||
explicit DebugSettings(QString settingPath, QObject *parent = nullptr);
|
||||
DebugSettings(const DebugSettings & /*other*/);
|
||||
|
||||
public:
|
||||
bool getShowCardId();
|
||||
};
|
||||
|
||||
#endif // DEBUG_SETTINGS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue