summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/main.qml4
-rw-r--r--mobile-widgets/qmlprefs.cpp21
-rw-r--r--mobile-widgets/qmlprefs.h25
3 files changed, 50 insertions, 0 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index bd567894e..28f16a9b8 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -492,6 +492,10 @@ if you have network connectivity and want to sync your data to cloud storage."),
}
}
+ QMLPrefs {
+ id: prefs
+ }
+
QMLManager {
id: manager
}
diff --git a/mobile-widgets/qmlprefs.cpp b/mobile-widgets/qmlprefs.cpp
new file mode 100644
index 000000000..49a788708
--- /dev/null
+++ b/mobile-widgets/qmlprefs.cpp
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "qmlprefs.h"
+
+QMLPrefs *QMLPrefs::m_instance = NULL;
+
+
+QMLPrefs::QMLPrefs()
+{
+ if (!m_instance)
+ m_instance = this;
+}
+
+QMLPrefs::~QMLPrefs()
+{
+ m_instance = NULL;
+}
+
+QMLPrefs *QMLPrefs::instance()
+{
+ return m_instance;
+}
diff --git a/mobile-widgets/qmlprefs.h b/mobile-widgets/qmlprefs.h
new file mode 100644
index 000000000..2755014e8
--- /dev/null
+++ b/mobile-widgets/qmlprefs.h
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+#ifndef QMLPREFS_H
+#define QMLPREFS_H
+
+#include <QObject>
+
+
+class QMLPrefs : public QObject {
+ Q_OBJECT
+
+public:
+ QMLPrefs();
+ ~QMLPrefs();
+
+ static QMLPrefs *instance();
+
+public slots:
+
+private:
+ static QMLPrefs *m_instance;
+
+signals:
+};
+
+#endif