#include <QSettings>
+#include <QString>
+#include <QStringList>
#include "settings.h"
+#include "trace.h"
static Settings *theInstance;
-Settings::Settings(QObject *parent) :
- QObject(parent)
+Settings::Settings(): QObject(0)
{
}
QSettings s;
return s.value(QString("settings/") + key, defaultValue);
}
+
+void Settings::apply()
+{
+ TRACE;
+ QSettings s;
+ foreach (QString key, s.allKeys()) {
+ if (key.startsWith("settings/")) {
+ key = key.mid(9);
+ setValue(key, value(key));
+ }
+ }
+}