subsurface/mobile-widgets/qmlmapwidgethelper.cpp
Lubomir I. Ivanov f5882362d3 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>
2017-07-28 07:31:11 -07:00

11 lines
189 B
C++

#include <QDebug>
#include "qmlmapwidgethelper.h"
MapWidgetHelper::MapWidgetHelper(QObject *parent) : QObject(parent)
{
}
void MapWidgetHelper::test()
{
qDebug() << "test";
}