forgotten appsettings files
authorpavelpa <pavelpa@localhost>
Fri, 22 Jan 2010 07:14:52 +0000 (07:14 +0000)
committerpavelpa <pavelpa@localhost>
Fri, 22 Jan 2010 07:14:52 +0000 (07:14 +0000)
src/app/appsettings.cpp [new file with mode: 0644]
src/app/appsettings.h [new file with mode: 0644]

diff --git a/src/app/appsettings.cpp b/src/app/appsettings.cpp
new file mode 100644 (file)
index 0000000..44341fc
--- /dev/null
@@ -0,0 +1,19 @@
+#include "appsettings.h"
+
+const QString CONF_ID_SETTING ("confId"); 
+
+QSettings AppSettings::mSettings("Ixonos", "FOSDEM");
+
+AppSettings::AppSettings()
+{ }
+
+int AppSettings::confId()
+{
+    return mSettings.value(CONF_ID_SETTING).toInt();
+}
+
+void AppSettings::setConfId(int aConfId)
+{
+    mSettings.setValue(CONF_ID_SETTING, aConfId);
+}
+
diff --git a/src/app/appsettings.h b/src/app/appsettings.h
new file mode 100644 (file)
index 0000000..70e8cb7
--- /dev/null
@@ -0,0 +1,20 @@
+
+#ifndef APPSETTINGS_H
+#define APPSETTINGS_H
+
+#include <QString>
+#include <QSettings>
+
+class AppSettings
+{
+    private:
+        AppSettings();
+        static QSettings mSettings;
+
+    public:
+        static int confId(); // conference Id
+        static void setConfId(int aConfId);
+};
+
+#endif /* APPSETTINGS_H */
+