diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-06 12:48:47 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-10 09:25:57 -0700 |
commit | c34b7857fcc03d2ede0d40063b49a36e1ad7d9dd (patch) | |
tree | 4c6b30a3ecf8de4ff098ed5a9080645be29d814d /subsurface-helper.cpp | |
parent | 71b378aa82296c76c504c8f6b7f765601c7ae821 (diff) | |
download | subsurface-c34b7857fcc03d2ede0d40063b49a36e1ad7d9dd.tar.gz |
mobile/divelist: implement model that shows all dives in trip-order
MobileSwipeModel is probably not an ideal name, but all I could come up with.
One of the main complications here is that our list is reversed with respect to
the source model. We should change that one day. Probably by moving the
sorting down to the core-model.
Since looking up the source row is somewhat expensive, the lookup is cached for
a single entry because accesses come in bursts for a single dive. This should
be a good compromise and avoids keeping track of a full row-to-dive array.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-helper.cpp')
-rw-r--r-- | subsurface-helper.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index 44676eb74..d76e4b52c 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -105,6 +105,7 @@ void run_ui() QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("gpsModel", gpsSortModel); ctxt->setContextProperty("vendorList", vendorList); + ctxt->setContextProperty("swipeModel", MobileModels::instance()->swipeModel()); ctxt->setContextProperty("diveModel", MobileModels::instance()->listModel()); set_non_bt_addresses(); |