summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/settings/qPref_private.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/core/settings/qPref_private.h b/core/settings/qPref_private.h
index e2e8f350c..ebe266581 100644
--- a/core/settings/qPref_private.h
+++ b/core/settings/qPref_private.h
@@ -101,4 +101,36 @@ void qPref ## class::disk_ ## field(bool doSync) \
{ \
LOADSYNC_TXT(name, field); \
}
+
+
+//******* Macros to generate get function
+#define GET_PREFERENCE_BOOL(class, field) \
+bool qPref ## class::field () const \
+{ \
+ return prefs.field; \
+}
+
+#define GET_PREFERENCE_DOUBLE(class, field) \
+double qPref ## class::field () const \
+{ \
+ return prefs.field; \
+}
+
+#define GET_PREFERENCE_ENUM(class, type, field) \
+struct type qPref ## class:: ## field () const \
+{ \
+ return prefs.field; \
+}
+
+#define GET_PREFERENCE_INT(class, field) \
+int qPref ## class::field () const \
+{ \
+ return prefs.field; \
+}
+
+#define GET_PREFERENCE_TXT(class, field) \
+const QString qPref ## class::field () const \
+{ \
+ return prefs.field; \
+}
#endif