aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-helper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-12 17:53:38 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-13 11:39:36 -0800
commit46bb242c69c999575b4d67f262bb5676f243651f (patch)
treee080a575ebc027e4cc03ced43d7b77fffe76b31b /subsurface-helper.cpp
parente5c30e042b8257b54e0611695e58246f42825b13 (diff)
downloadsubsurface-46bb242c69c999575b4d67f262bb5676f243651f.tar.gz
mobile/statistics: export ChartListModel to QML
For QML, the roles have to be associated dynamically with name. Moreover, the model has to be registered as a QML type to make it accessible from QML. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'subsurface-helper.cpp')
-rw-r--r--subsurface-helper.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp
index 8fbb74b6a..c3249f03f 100644
--- a/subsurface-helper.cpp
+++ b/subsurface-helper.cpp
@@ -17,6 +17,7 @@
#include "mobile-widgets/qmlmanager.h"
#include "mobile-widgets/qmlinterface.h"
#include "mobile-widgets/statsmanager.h"
+#include "stats/chartlistmodel.h"
#include "qt-models/divesummarymodel.h"
#include "qt-models/gpslistmodel.h"
#include "qt-models/messagehandlermodel.h"
@@ -212,6 +213,7 @@ static void register_qml_types(QQmlEngine *engine)
register_qml_type<QMLProfile>("QMLProfile");
register_qml_type<DiveImportedModel>("DCImportModel");
register_qml_type<DiveSummaryModel>("DiveSummaryModel");
+ register_qml_type<ChartListModel>("ChartListModel");
#endif // not SUBSURFACE_MOBILE
register_qml_type<MapWidgetHelper>("MapWidgetHelper");