mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-29 04:10:23 -07:00
* [Settings] Split cache_settings into multiple files Took 9 minutes Took 4 minutes * [Settings] Fwd declare settings classes in cache_settings Took 15 minutes * Fix oracle includes. Took 8 minutes * Address comments, fix windows CI Took 8 minutes * fix copy constructor visibility Took 3 minutes * lint Took 2 minutes * Fix native format tests. Took 5 minutes * Remove test header guard Took 4 seconds * Remove tests invalid in CI environ Took 24 seconds * Adjust to rebase. Took 11 minutes * Change settings file name. Took 8 minutes --------- Co-authored-by: Lukas Brübach <lukas.bruebach@bdosecurity.de> Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
120 lines
2.6 KiB
C++
120 lines
2.6 KiB
C++
#include "paths_settings.h"
|
|
|
|
#include <QDir>
|
|
#include <QFile>
|
|
|
|
PathsSettings::PathsSettings(const QString &settingPath, QObject *parent)
|
|
: SettingsManager(settingPath + "paths.ini", "paths", QString(), parent)
|
|
{
|
|
}
|
|
|
|
QString PathsSettings::getDeckPath() const
|
|
{
|
|
return getValue("decks").toString();
|
|
}
|
|
|
|
QString PathsSettings::getFiltersPath() const
|
|
{
|
|
return getValue("filters").toString();
|
|
}
|
|
|
|
QString PathsSettings::getReplaysPath() const
|
|
{
|
|
return getValue("replays").toString();
|
|
}
|
|
|
|
QString PathsSettings::getPicsPath() const
|
|
{
|
|
return getValue("pics").toString();
|
|
}
|
|
|
|
QString PathsSettings::getCustomPicsPath() const
|
|
{
|
|
return getValue("custompics").toString();
|
|
}
|
|
|
|
QString PathsSettings::getThemesPath() const
|
|
{
|
|
return getValue("themes").toString();
|
|
}
|
|
|
|
QString PathsSettings::getCardDatabasePath() const
|
|
{
|
|
return getValue("carddatabase").toString();
|
|
}
|
|
|
|
QString PathsSettings::getCustomCardDatabasePath() const
|
|
{
|
|
return getValue("customsets").toString();
|
|
}
|
|
|
|
QString PathsSettings::getTokenDatabasePath() const
|
|
{
|
|
return getValue("tokendatabase").toString();
|
|
}
|
|
|
|
QString PathsSettings::getSpoilerCardDatabasePath() const
|
|
{
|
|
return getValue("spoilerdatabase").toString();
|
|
}
|
|
|
|
QString PathsSettings::getRedirectCachePath() const
|
|
{
|
|
return getValue("redirects").toString();
|
|
}
|
|
|
|
void PathsSettings::setDeckPath(const QString &_deckPath)
|
|
{
|
|
setValue(_deckPath, "decks");
|
|
}
|
|
|
|
void PathsSettings::setFiltersPath(const QString &_filtersPath)
|
|
{
|
|
setValue(_filtersPath, "filters");
|
|
}
|
|
|
|
void PathsSettings::setReplaysPath(const QString &_replaysPath)
|
|
{
|
|
setValue(_replaysPath, "replays");
|
|
}
|
|
|
|
void PathsSettings::setPicsPath(const QString &_picsPath)
|
|
{
|
|
setValue(_picsPath, "pics");
|
|
emit picsPathChanged();
|
|
}
|
|
|
|
void PathsSettings::setCustomPicsPath(const QString &_customPicsPath)
|
|
{
|
|
setValue(_customPicsPath, "custompics");
|
|
}
|
|
|
|
void PathsSettings::setThemesPath(const QString &_themesPath)
|
|
{
|
|
setValue(_themesPath, "themes");
|
|
emit themeChanged();
|
|
}
|
|
|
|
void PathsSettings::setCardDatabasePath(const QString &_cardDatabasePath)
|
|
{
|
|
setValue(_cardDatabasePath, "carddatabase");
|
|
emit cardDatabasePathChanged();
|
|
}
|
|
|
|
void PathsSettings::setCustomCardDatabasePath(const QString &_customCardDatabasePath)
|
|
{
|
|
setValue(_customCardDatabasePath, "customsets");
|
|
emit cardDatabasePathChanged();
|
|
}
|
|
|
|
void PathsSettings::setTokenDatabasePath(const QString &_tokenDatabasePath)
|
|
{
|
|
setValue(_tokenDatabasePath, "tokendatabase");
|
|
emit cardDatabasePathChanged();
|
|
}
|
|
|
|
void PathsSettings::setSpoilerDatabasePath(const QString &_spoilerDatabasePath)
|
|
{
|
|
setValue(_spoilerDatabasePath, "spoilerdatabase");
|
|
emit cardDatabasePathChanged();
|
|
}
|