subsurface/mobile-widgets/qml
Berthold Stoeger 68414531ad Mobile: don't format trip heading for all dives
QML's ListView uses the "section" property to test if items belong to the
same section. Apparently, this must be a string and therefore we can't
pass e.g. a dive-trip object. Therefore a specially formatted string
was passed in, which was guaranteed to be unique (contained the dive-trip
pointer value) and the fully formatted trip-title and short-date.

The disadvantage of that approach is that the formatting is performed for
every dive and not every trip. Perhaps not a problem now, but it makes
it for example necessary to cache the number of filtered dives.

To be more flexible, pass in only the pointer value formatted as
hexadecimal string and provide a function to convert that string
back to a trip-pointer (in the form of a QVariant, so that it can
be passed to QML). Moreover provide two functions for formatting the
title and the short-date.

The three new functions are members of DiveListSortModel. This might not
be the perfect place, but it is easy to reach from the DiveListView.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-11-23 13:22:24 -08:00
..
icons Mobile/filtering: add icons for filter and sort 2018-10-23 22:45:29 +01:00
About.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
CloudCredentials.qml Mobile: factor out syncToCloud [3/3] 2018-10-09 10:03:21 -07:00
DiveDetails.qml Mobile: Allow multiple divemasters 2018-11-15 18:10:13 +08:00
DiveDetailsEdit.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
DiveDetailsView.qml Dive site: replace UUID by pointer in mobile code 2018-10-29 00:09:31 +00:00
DiveList.qml Mobile: don't format trip heading for all dives 2018-11-23 13:22:24 -08:00
DownloadedDiveDelegate.qml QML UI: set proper active background color for downloaded dives 2018-10-07 17:43:34 +03:00
DownloadFromDiveComputer.qml QML, cleanup: remove stackView 2018-10-12 08:22:26 -07:00
GpsList.qml QML UI, trivial: set proper background color GPS list 2018-10-07 17:43:34 +03:00
HintsTextEdit.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
Log.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
main.qml Mobile/filtering: make busy indicator smaller 2018-10-23 22:45:30 +01:00
MapPage.qml Dive site: replace UUID by pointer in mobile code 2018-10-29 00:09:31 +00:00
mobile-resources.qrc Support for copy-pasting specific fields on mobile 2018-11-18 06:31:44 +08:00
qtquickcontrols2.conf QML UI: Fully port dive edit to Kirigami2 2017-04-01 09:35:51 +02:00
Settings.qml Mobile/filtering: add Settings options for filtering 2018-10-23 22:45:30 +01:00
SsrfButton.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
SsrfCheckBox.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
SsrfSwitch.qml Mobile UI: make SsrfSwitch resizable 2018-10-21 14:43:41 -04:00
StartPage.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00
ThemeTest.qml Mobile QML UI: bump Kirigami imports to 2.4 2018-10-01 05:29:46 -07:00