2 import Sailfish.Silica 1.0
7 // The effective value will be restricted by ApplicationWindow.allowedOrientations
8 allowedOrientations: Orientation.All
9 property int columnwidth: page.width - 2 * Theme.horizontalPageMargin
16 title: qsTr("Journey list")
20 menu: journeyMenuComponent
23 spacing: Theme.paddingLarge
24 x: Theme.horizontalPageMargin
27 width: columnwidth / 3.0
28 text: Qt.formatDate(journeymodel.epochToDate(start), "d MMM yyyy")
29 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
32 width: columnwidth / 3.0
33 text: Qt.formatTime(journeymodel.epochToTime(start), "hh:mm")
34 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
37 width: columnwidth / 3.0
38 text: Qt.formatTime(new Date(0, 0, 0, 0, 0, duration), 'hh:mm')
39 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
42 onClicked: pageStack.push(Qt.resolvedUrl("JourneyInfo.qml"), {title: "Journey info", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby})
45 id: journeyMenuComponent
49 onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Edit journey", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby})
53 onClicked: remove(index)
58 function remove(index) {
59 remorseAction(qsTr("Deleting journey"), function() {
60 onClicked: journeymodel.deleteJourney(index)
64 VerticalScrollDecorator {}