-Settings::Settings(QString g, QString applicationName)
-
-#ifdef Q_WS_MAC
- : QSettings(QCoreApplication::organizationDomain(), applicationName),
-#else
- : QSettings(QCoreApplication::organizationName(), applicationName),
-#endif
- group(g)
-{
-
-/* we need to call the constructor immediately in order to set the path...
-#ifndef Q_WS_QWS
- QSettings(QCoreApplication::organizationName(), applicationName);
-#else
- // FIXME sandboxDir() is not currently working correctly...
- //if(Qtopia::sandboxDir().isEmpty()) QSettings();
- //else QSettings(Qtopia::sandboxDir() + "/etc/QuasselIRC.conf", QSettings::NativeFormat);
- // ...so we have to use a workaround:
- QString appPath = QCoreApplication::applicationFilePath();
- if(appPath.startsWith(Qtopia::packagePath())) {
- QString sandboxPath = appPath.left(Qtopia::packagePath().length() + 32);
- QSettings(sandboxPath + "/etc/QuasselIRC.conf", QSettings::IniFormat);
- qDebug() << sandboxPath + "/etc/QuasselIRC.conf";
- } else {
- QSettings(QCoreApplication::organizationName(), applicationName);
- }
-#endif
-*/
-}
-
-Settings::~Settings() {
-
-}
-
-void Settings::setGroup(QString g) {
- group = g;
-
+QHash<QString, QHash<QString, QVariant> > Settings::settingsCache;
+QHash<QString, QHash<QString, SettingsChangeNotifier *> > Settings::settingsChangeNotifier;
+
+// Settings::Settings(QString group_, QString appName_)
+// : group(group_),
+// appName(appName_)
+// {
+
+// /* we need to call the constructor immediately in order to set the path...
+// #ifndef Q_WS_QWS
+// QSettings(QCoreApplication::organizationName(), applicationName);
+// #else
+// // FIXME sandboxDir() is not currently working correctly...
+// //if(Qtopia::sandboxDir().isEmpty()) QSettings();
+// //else QSettings(Qtopia::sandboxDir() + "/etc/QuasselIRC.conf", QSettings::NativeFormat);
+// // ...so we have to use a workaround:
+// QString appPath = QCoreApplication::applicationFilePath();
+// if(appPath.startsWith(Qtopia::packagePath())) {
+// QString sandboxPath = appPath.left(Qtopia::packagePath().length() + 32);
+// QSettings(sandboxPath + "/etc/QuasselIRC.conf", QSettings::IniFormat);
+// qDebug() << sandboxPath + "/etc/QuasselIRC.conf";
+// } else {
+// QSettings(QCoreApplication::organizationName(), applicationName);
+// }
+// #endif
+// */
+// }
+
+void Settings::notify(const QString &key, QObject *receiver, const char *slot) {
+ QObject::connect(notifier(group, key), SIGNAL(valueChanged(const QVariant &)),
+ receiver, slot);