2 import Sailfish.Silica 1.0
7 property string title: "Journey info"
8 property var start: new Date()
9 property int duration: 0
10 property int overtook: -1
11 property int overtakenby: -1
12 property int index: -1
14 property real shortlineRatio: 0.6
15 property real shortlineMin: Theme.fontSizeSmall * 10
16 property real shortlineMax: width
18 property real widelineRatio: 0.6
19 property real widelineMin: Theme.fontSizeSmall * 10
20 property real widelineMax: width
23 var structured = new Date(0, 0, 0, 0, parseInt(duration / 60))
24 durationTime.value = Qt.formatTime(structured, 'hh:mm')
25 endTime.time = new Date(0, 0, 0, start.getHours() + structured.getHours(), start.getMinutes() + structured.getMinutes())
29 startDate.value = Qt.formatDate(start, 'd MMM yyyy')
30 startTime.value = Qt.formatTime(start, 'hh:mm')
32 var structured = new Date(0, 0, 0, 0, parseInt(duration / 60))
33 endTime.time = new Date(0, 0, 0, start.getHours() + structured.getHours(), start.getMinutes() + structured.getMinutes())
36 // The effective value will be restricted by ApplicationWindow.allowedOrientations
37 allowedOrientations: Orientation.All
42 contentHeight: journeyEditColumn.implicitHeight
44 VerticalScrollDecorator {}
48 spacing: Theme.paddingLarge
52 title: journeyInfoPage.title
58 value: Qt.formatDate(start, 'd MMM yyyy')
61 midlineRatio: shortlineRatio
62 midlineMin: shortlineMin
63 midlineMax: shortlineMax
68 label: qsTr("Start time")
69 value: Qt.formatTime(start, 'hh:mm')
72 midlineRatio: shortlineRatio
73 midlineMin: shortlineMin
74 midlineMax: shortlineMax
79 property date time: new Date()
80 label: qsTr("End time")
81 value: Qt.formatTime(time, 'hh:mm')
85 value = Qt.formatTime(time, 'hh:mm')
88 midlineRatio: shortlineRatio
89 midlineMin: shortlineMin
90 midlineMax: shortlineMax
95 label: qsTr("Duration")
96 value: Qt.formatTime(new Date(0, 0, 0, 0, parseInt(duration / 60)), 'hh:mm')
100 midlineRatio: shortlineRatio
101 midlineMin: shortlineMin
102 midlineMax: shortlineMax
108 label: qsTr("Cycles which you overtook")
111 midlineRatio: widelineRatio
112 midlineMin: widelineMin
113 midlineMax: widelineMax
119 label: qsTr("Cycles which overtook you")
120 value: "" + overtakenby
122 midlineRatio: widelineRatio
123 midlineMin: widelineMin
124 midlineMax: widelineMax