summaryrefslogtreecommitdiffstats
path: root/subsurface-mobile-helper.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-07 21:43:22 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-07 21:43:22 -0800
commit1eda61e1158de19a47acdfc5525f5f0df002052f (patch)
treefd981938b70fe20c20b3ea2ffc90abd9db74de9a /subsurface-mobile-helper.cpp
parentce3a78efcac2c9b6bd215bc191560a64c54fd628 (diff)
parentb6ae6979e530fa32dbdb472a2e9698cb719945a8 (diff)
downloadsubsurface-1eda61e1158de19a47acdfc5525f5f0df002052f.tar.gz
Merge branch 'gpsList'
Diffstat (limited to 'subsurface-mobile-helper.cpp')
-rw-r--r--subsurface-mobile-helper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp
index 9d9875ead..4956a112d 100644
--- a/subsurface-mobile-helper.cpp
+++ b/subsurface-mobile-helper.cpp
@@ -17,6 +17,7 @@
#include <QSortFilterProxyModel>
#include "qt-mobile/qmlmanager.h"
#include "qt-models/divelistmodel.h"
+#include "qt-models/gpslistmodel.h"
#include "qt-mobile/qmlprofile.h"
QObject *qqWindowObject = NULL;
@@ -51,8 +52,15 @@ void run_ui()
sortModel->setDynamicSortFilter(true);
sortModel->setSortRole(DiveListModel::DiveDateRole);
sortModel->sort(0, Qt::DescendingOrder);
+ GpsListModel gpsListModel;
+ QSortFilterProxyModel *gpsSortModel = new QSortFilterProxyModel(0);
+ gpsSortModel->setSourceModel(&gpsListModel);
+ gpsSortModel->setDynamicSortFilter(true);
+ gpsSortModel->setSortRole(GpsListModel::GpsDateRole);
+ gpsSortModel->sort(0, Qt::DescendingOrder);
QQmlContext *ctxt = engine.rootContext();
ctxt->setContextProperty("diveModel", sortModel);
+ ctxt->setContextProperty("gpsModel", gpsSortModel);
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
qqWindowObject = engine.rootObjects().value(0);
if (!qqWindowObject) {