2 import Sailfish.Silica 1.0
6 property string title: "Journey info"
7 property var start: new Date()
8 property int duration: 0
9 property int overtook: -1
10 property int overtakenby: -1
11 property int index: -1
14 var structured = new Date(0, 0, 0, 0, parseInt(duration / 60))
15 durationTime.value = Qt.formatTime(structured, 'hh:mm')
16 endTime.time = new Date(0, 0, 0, start.getHours() + structured.getHours(), start.getMinutes() + structured.getMinutes())
20 startDate.value = Qt.formatDate(start, 'd MMM yyyy')
21 startTime.value = Qt.formatTime(start, 'hh:mm')
23 var structured = new Date(0, 0, 0, 0, parseInt(duration / 60))
24 endTime.time = new Date(0, 0, 0, start.getHours() + structured.getHours(), start.getMinutes() + structured.getMinutes())
27 // The effective value will be restricted by ApplicationWindow.allowedOrientations
28 allowedOrientations: Orientation.All
33 contentHeight: journeyEditColumn.implicitHeight
35 VerticalScrollDecorator {}
39 spacing: Theme.paddingMedium
43 title: journeyInfoPage.title
49 value: Qt.formatDate(start, 'd MMM yyyy')
56 label: qsTr("Start time")
57 value: Qt.formatTime(start, 'hh:mm')
64 property date time: new Date()
65 label: qsTr("End time")
66 value: Qt.formatTime(time, 'hh:mm')
70 value = Qt.formatTime(time, 'hh:mm')
76 label: qsTr("Duration")
77 value: Qt.formatTime(new Date(0, 0, 0, 0, parseInt(duration / 60)), 'hh:mm')
85 inputMethodHints: Qt.ImhDigitsOnly
86 label: qsTr("Cycles which you overtook")
87 placeholderText: label
88 text: overtook >= 0 ? "" + overtook : ""
89 horizontalAlignment: TextInput.AlignLeft
90 EnterKey.iconSource: "image://theme/icon-m-enter-next"
97 inputMethodHints: Qt.ImhDigitsOnly
98 label: qsTr("Cycles which overtook you")
99 placeholderText: label
100 text: overtakenby >= 0 ? "" + overtakenby : ""
101 horizontalAlignment: TextInput.AlignLeft
102 EnterKey.iconSource: "image://theme/icon-m-enter-next"