mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
32 lines
No EOL
870 B
C++
32 lines
No EOL
870 B
C++
#include "debug_settings.h"
|
|
|
|
#include <QtCore/QFile>
|
|
|
|
DebugSettings::DebugSettings(const QString &settingPath, QObject *parent)
|
|
: SettingsManager(settingPath + "debug.ini", "debug", QString(), parent)
|
|
{
|
|
// Create the default debug.ini if it doesn't exist yet
|
|
if (!QFile(settingPath + "debug.ini").exists()) {
|
|
QFile::copy(":/resources/config/debug.ini", settingPath + "debug.ini");
|
|
}
|
|
}
|
|
|
|
bool DebugSettings::getShowCardId() const
|
|
{
|
|
return getValue("showCardId").toBool();
|
|
}
|
|
|
|
bool DebugSettings::getLocalGameOnStartup() const
|
|
{
|
|
return getValue("onStartup", "localgame").toBool();
|
|
}
|
|
|
|
int DebugSettings::getLocalGamePlayerCount() const
|
|
{
|
|
return getValue("playerCount", "localgame").toInt();
|
|
}
|
|
|
|
QString DebugSettings::getDeckPathForPlayer(const QString &playerName) const
|
|
{
|
|
return getValue(playerName, "localgame", "deck").toString();
|
|
} |