mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-03-21 17:55:21 -05:00
* Give settings managers default groups instead of manually specifying them everywhere. Took 1 hour 2 minutes Took 41 seconds Took 32 seconds Took 5 minutes * Fix dbconverter mock. Took 2 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
#include "card_database_settings.h"
|
|
|
|
CardDatabaseSettings::CardDatabaseSettings(const QString &settingPath, QObject *parent)
|
|
: SettingsManager(settingPath + "cardDatabase.ini", QString(), QString(), parent)
|
|
{
|
|
}
|
|
|
|
void CardDatabaseSettings::setSortKey(QString shortName, unsigned int sortKey)
|
|
{
|
|
setValue(sortKey, "sortkey", "sets", std::move(shortName));
|
|
}
|
|
|
|
void CardDatabaseSettings::setEnabled(QString shortName, bool enabled)
|
|
{
|
|
setValue(enabled, "enabled", "sets", std::move(shortName));
|
|
}
|
|
|
|
void CardDatabaseSettings::setIsKnown(QString shortName, bool isknown)
|
|
{
|
|
setValue(isknown, "isknown", "sets", std::move(shortName));
|
|
}
|
|
|
|
unsigned int CardDatabaseSettings::getSortKey(QString shortName)
|
|
{
|
|
return getValue("sortkey", "sets", std::move(shortName)).toUInt();
|
|
}
|
|
|
|
bool CardDatabaseSettings::isEnabled(QString shortName)
|
|
{
|
|
return getValue("enabled", "sets", std::move(shortName)).toBool();
|
|
}
|
|
|
|
bool CardDatabaseSettings::isKnown(QString shortName)
|
|
{
|
|
return getValue("isknown", "sets", std::move(shortName)).toBool();
|
|
}
|