From 1a85b0e941b57f4f3c3406a42be78d4d6642d17a Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 8 Feb 2020 12:06:57 +0100 Subject: mobile/summary: create DiveSummaryModel Instead of passing the dive summary via a completely unstructured QStringList to QML, implement a dynamic model. For potential reuse on desktop (though somewhat unlikely) the model has two interfaces, one for QtWidgets and one for QML. The former is based on columns, whereas the later is based on roles. The number of columns is set dynamically. The roles currently support access to two columns. If more columns should be accessed from QML, more roles have to be added manually. This commit only creates the model and hooks it into QMLs global context, but does not yet change the QML page. Signed-off-by: Berthold Stoeger Signed-off-by: Dirk Hohndel --- packaging/ios/Subsurface-mobile.pro | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packaging/ios') diff --git a/packaging/ios/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile.pro index 15ae8ff88..5c2c9a84a 100644 --- a/packaging/ios/Subsurface-mobile.pro +++ b/packaging/ios/Subsurface-mobile.pro @@ -115,6 +115,7 @@ SOURCES += ../../subsurface-mobile-main.cpp \ ../../mobile-widgets/qmlmanager.cpp \ ../../mobile-widgets/themeinterface.cpp \ ../../qt-models/divelistmodel.cpp \ + ../../qt-models/divesummarymodel.cpp \ ../../qt-models/diveplotdatamodel.cpp \ ../../qt-models/gpslistmodel.cpp \ ../../qt-models/completionmodels.cpp \ @@ -251,6 +252,7 @@ HEADERS += \ ../../mobile-widgets/themeinterface.h \ ../../map-widget/qmlmapwidgethelper.h \ ../../qt-models/divelistmodel.h \ + ../../qt-models/divesummarymodel.h \ ../../qt-models/diveplotdatamodel.h \ ../../qt-models/gpslistmodel.h \ ../../qt-models/divelocationmodel.h \ -- cgit v1.2.3-70-g09d2