summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmapwidgethelper.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-16 02:51:08 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commitf5882362d3a8a6de03208c6aa899d075a3b17f28 (patch)
treef8f8ad96bf555b178939e2d01984d52378627057 /mobile-widgets/qmlmapwidgethelper.h
parentccaaff42a39d65328e43c812ec4b2d0d68a651bd (diff)
downloadsubsurface-f5882362d3a8a6de03208c6aa899d075a3b17f28.tar.gz
mobile-widgets: add the helper class MapWidgetHelper
The idea with this class is that it should be used by both the mobile and desktop version. TODO STEPS: 1) the class should be registered in both the mobile and desktop version with qmlRegisterType<MapWidgetHelper>... 2) the MapWidget.qml should create an instance of this class. 3) this way the helper will be part of the QML and both the desktop and mobile version can have access to it. 4) the desktop version as a first implementation can just use findChild() in desktop-widgets/mapwidget.cpp. 5) desktop-widgets/mapwidget.cpp on the desktop should just translate calls from the rest of the desktop-widgets to this helper class. 6) the mobile version access to this object would be easy but is off the scope for now. 7) the idea, when implementing the desktop support is to make it so that when implementing the mobile version later, no or only minimal changes would be required to the MapWidgetHelper class. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmapwidgethelper.h')
-rw-r--r--mobile-widgets/qmlmapwidgethelper.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.h b/mobile-widgets/qmlmapwidgethelper.h
new file mode 100644
index 000000000..c7e532c3c
--- /dev/null
+++ b/mobile-widgets/qmlmapwidgethelper.h
@@ -0,0 +1,16 @@
+#ifndef QMLMAPWIDGETHELPER_H
+#define QMLMAPWIDGETHELPER_H
+
+#include <QObject>
+
+class MapWidgetHelper : public QObject {
+
+ Q_OBJECT
+
+public:
+ explicit MapWidgetHelper(QObject *parent = NULL);
+
+ void test();
+};
+
+#endif