summaryrefslogtreecommitdiffstats
path: root/src/client/util/util.h
diff options
context:
space:
mode:
authorsr2013-02-04 19:50:31 +0100
committersr2013-02-04 19:50:31 +0100
commit1a5709501f94014d41987b956338bb6424b9f90c (patch)
treed3b93fe8dc406bca56aff147ef5cc4cbf9ed6be0 /src/client/util/util.h
parentTest (diff)
downloadpvs2-1a5709501f94014d41987b956338bb6424b9f90c.tar.gz
pvs2-1a5709501f94014d41987b956338bb6424b9f90c.tar.xz
pvs2-1a5709501f94014d41987b956338bb6424b9f90c.zip
Initial commit
Diffstat (limited to 'src/client/util/util.h')
-rw-r--r--src/client/util/util.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/client/util/util.h b/src/client/util/util.h
new file mode 100644
index 0000000..82248c0
--- /dev/null
+++ b/src/client/util/util.h
@@ -0,0 +1,23 @@
+#ifndef UTIL_H_
+#define UTIL_H_
+
+// Helper for getting a settings object in various places, so if you ever change the organization, location,
+// file format or anything, you won't have to edit in 100 places.
+// Use like this:
+// USER_SETTINGS(settings)
+// settings.value("somekey")
+#define USER_SETTINGS(name) QSettings name (QSettings::IniFormat, QSettings::UserScope, "openslx", "pvs2client")
+#define SYSTEM_SETTINGS(name) QSettings name (QSettings::IniFormat, QSettings::SystemScope, "openslx", "pvs2client")
+
+#include <QDir>
+
+namespace Util
+{
+//#
+//#
+QDir settingsDir();
+//#
+//#
+}
+
+#endif /* UTIL_H_ */