fixed issue #37: add option to manually add token cards to the database

This commit is contained in:
Max-Wilhelm Bruker 2012-05-17 18:29:35 +02:00
parent d5a1032cf3
commit 3ba3952604
15 changed files with 434 additions and 93 deletions

View file

@ -5,13 +5,13 @@ SettingsCache::SettingsCache()
{
settings = new QSettings(this);
customTranslationFile = settings->value("personal/custom_translation").toString();
lang = settings->value("personal/lang").toString();
deckPath = settings->value("paths/decks").toString();
replaysPath = settings->value("paths/replays").toString();
picsPath = settings->value("paths/pics").toString();
cardDatabasePath = settings->value("paths/carddatabase").toString();
tokenDatabasePath = settings->value("paths/tokendatabase").toString();
handBgPath = settings->value("zonebg/hand").toString();
stackBgPath = settings->value("zonebg/stack").toString();
@ -41,13 +41,6 @@ SettingsCache::SettingsCache()
ignoreUnregisteredUsers = settings->value("chat/ignore_unregistered", false).toBool();
}
void SettingsCache::setCustomTranslationFile(const QString &_customTranslationFile)
{
customTranslationFile = _customTranslationFile;
settings->setValue("personal/custom_translation", customTranslationFile);
emit customTranslationFileChanged();
}
void SettingsCache::setLang(const QString &_lang)
{
lang = _lang;
@ -81,6 +74,13 @@ void SettingsCache::setCardDatabasePath(const QString &_cardDatabasePath)
emit cardDatabasePathChanged();
}
void SettingsCache::setTokenDatabasePath(const QString &_tokenDatabasePath)
{
tokenDatabasePath = _tokenDatabasePath;
settings->setValue("paths/tokendatabase", tokenDatabasePath);
emit tokenDatabasePathChanged();
}
void SettingsCache::setHandBgPath(const QString &_handBgPath)
{
handBgPath = _handBgPath;