mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
988ccba710
commit
f7c73f1987
4 changed files with 28 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue