mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Turn Card, Settings and Utility into libraries.
Took 4 hours 3 minutes Took 2 minutes Took 38 seconds Took 5 minutes Took 5 minutes Took 9 minutes Took 15 minutes
This commit is contained in:
parent
30e6b52783
commit
53d80efab8
262 changed files with 1025 additions and 918 deletions
32
cockatrice/libs/settings/src/debug_settings.cpp
Normal file
32
cockatrice/libs/settings/src/debug_settings.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include "../include/settings/debug_settings.h"
|
||||
|
||||
#include <QtCore/QFile>
|
||||
|
||||
DebugSettings::DebugSettings(const QString &settingPath, QObject *parent)
|
||||
: SettingsManager(settingPath + "debug.ini", 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()
|
||||
{
|
||||
return getValue("showCardId", "debug").toBool();
|
||||
}
|
||||
|
||||
bool DebugSettings::getLocalGameOnStartup()
|
||||
{
|
||||
return getValue("onStartup", "localgame").toBool();
|
||||
}
|
||||
|
||||
int DebugSettings::getLocalGamePlayerCount()
|
||||
{
|
||||
return getValue("playerCount", "localgame").toInt();
|
||||
}
|
||||
|
||||
QString DebugSettings::getDeckPathForPlayer(const QString &playerName)
|
||||
{
|
||||
return getValue(playerName, "localgame", "deck").toString();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue