Highlight Custom Words

This commit is contained in:
Zach H 2015-07-11 20:45:37 -04:00
parent 9edacd7b3e
commit dc05a14f4c
5 changed files with 141 additions and 52 deletions

View file

@ -82,6 +82,8 @@ SettingsCache::SettingsCache()
masterVolume = settings->value("sound/mastervolume", 100).toInt();
cardInfoViewMode = settings->value("cards/cardinfoviewmode", 0).toInt();
highlightWords = settings->value("personal/highlightWords", QStringList()).toStringList();
}
void SettingsCache::setCardInfoViewMode(const int _viewMode) {
@ -89,6 +91,12 @@ void SettingsCache::setCardInfoViewMode(const int _viewMode) {
settings->setValue("cards/cardinfoviewmode", cardInfoViewMode);
}
void SettingsCache::setHighlightWords(const QString _highlightWords) {
// Words are seperated by a comma and you can not use spaces in words
highlightWords = _highlightWords.simplified().replace(" ", "").split(",");
settings->setValue("personal/highlightWords", highlightWords);
}
void SettingsCache::setMasterVolume(int _masterVolume) {
masterVolume = _masterVolume;
settings->setValue("sound/mastervolume", masterVolume);