8 static Settings *theInstance;
10 Settings::Settings(): QObject(0)
14 Settings *Settings::instance()
17 theInstance = new Settings();
22 void Settings::close()
28 void Settings::setValue(const QString &key, const QVariant &value)
31 s.setValue(QString("settings/") + key, value);
32 emit valueChanged(key);
35 QVariant Settings::value(const QString &key, const QVariant &defaultValue) const
38 return s.value(QString("settings/") + key, defaultValue);
41 void Settings::apply()
45 foreach (QString key, s.allKeys()) {
46 if (key.startsWith("settings/")) {
48 setValue(key, value(key));