summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mapwidget.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-16 03:16:13 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit99c2bf6290170bfef40a258fcf21e2e498bcc7c8 (patch)
treea9254685ec45446d23e0bfb5b58445e616f3e4ac /desktop-widgets/mapwidget.cpp
parent0d75dec0fa84a5e026448739031b402ee7b0d73a (diff)
downloadsubsurface-99c2bf6290170bfef40a258fcf21e2e498bcc7c8.tar.gz
mapwidget.cpp: obtain a reference of the MapWidgetHelper from QML
Use findChild() to obtain the only MapWidgetHelper object created in the MapWidget.qml. Store the reference as a member variable - m_mapHelper. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'desktop-widgets/mapwidget.cpp')
-rw-r--r--desktop-widgets/mapwidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-widgets/mapwidget.cpp b/desktop-widgets/mapwidget.cpp
index f5424bb0b..1646b7f51 100644
--- a/desktop-widgets/mapwidget.cpp
+++ b/desktop-widgets/mapwidget.cpp
@@ -18,6 +18,7 @@ MapWidget::MapWidget(QWidget *parent) : QQuickWidget(parent)
setResizeMode(QQuickWidget::SizeRootObjectToView);
m_rootItem = qobject_cast<QQuickItem *>(rootObject());
+ m_mapHelper = rootObject()->findChild<MapWidgetHelper *>();
}
void MapWidget::centerOnDiveSite(struct dive_site *ds)