mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
e5c30e042b
commit
46bb242c69
3 changed files with 15 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue