summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveSummary.qml
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-06 23:29:26 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-08 10:29:36 -0800
commitf7c73f1987a7069489d66316383b31b3248810b3 (patch)
tree1ec405daeef82b040c09b7c5135e14c79b13476f /mobile-widgets/qml/DiveSummary.qml
parent988ccba7105442f34d85ed81e13fd69162eb2b87 (diff)
downloadsubsurface-f7c73f1987a7069489d66316383b31b3248810b3.tar.gz
mobile/summary: implement firstDiveDate and lastDiveDate
Instead of transporting the global first and last dive date in the dive summary, calculate it in an external function. Since we already have time and date functions in qthelper.cpp implement those functions there. Provide a stub in QMLInterface so that QML can access these standalone functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qml/DiveSummary.qml')
-rw-r--r--mobile-widgets/qml/DiveSummary.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveSummary.qml b/mobile-widgets/qml/DiveSummary.qml
index ad6d30372..e827d4f42 100644
--- a/mobile-widgets/qml/DiveSummary.qml
+++ b/mobile-widgets/qml/DiveSummary.qml
@@ -8,6 +8,10 @@ import org.subsurfacedivelog.mobile 1.0
import org.kde.kirigami 2.4 as Kirigami
Kirigami.ScrollablePage {
+ id: summary
+ property string firstDive: ""
+ property string lastDive: ""
+
background: Rectangle { color: subsurfaceTheme.backgroundColor }
title: qsTr("Dive summary")
@@ -54,10 +58,10 @@ Kirigami.ScrollablePage {
font.bold: true
}
TemplateLabel {
- text: Backend.diveSummaryText[0]
+ text: summary.firstDive
}
TemplateLabel {
- text: Backend.diveSummaryText[1]
+ text: summary.lastDive
}
TemplateLabel {