-// bool Settings::isCached(const QString &group, const QString &key) {
-// return settingsCache.contains(group) && settingsCache[group].contains(key);
-// }
+
+void Settings::setLocalValue(const QString &key, const QVariant &data)
+{
+ QString normKey = normalizedKey(group, key);
+ create_qsettings;
+ s.setValue(normKey, data);
+ setCacheValue(normKey, data);
+ if (hasNotifier(normKey)) {
+ emit notifier(normKey)->valueChanged(data);
+ }
+}
+
+
+const QVariant &Settings::localValue(const QString &key, const QVariant &def)
+{
+ QString normKey = normalizedKey(group, key);
+ if (!isCached(normKey)) {
+ create_qsettings;
+ setCacheValue(normKey, s.value(normKey, def));
+ }
+ return cacheValue(normKey);
+}
+
+
+void Settings::removeLocalKey(const QString &key)
+{
+ create_qsettings;
+ s.beginGroup(group);
+ s.remove(key);
+ s.endGroup();
+ QString normKey = normalizedKey(group, key);
+ if (isCached(normKey))
+ settingsCache.remove(normKey);
+}