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) - 4 * Theme.paddingLarge
17 spacing: Theme.paddingLarge
18 height: implicitHeight + Theme.paddingLarge
22 title: qsTr("Journey list")
26 spacing: Theme.paddingLarge
27 x: Theme.horizontalPageMargin
31 width: columnwidth * 0.34
33 color: Theme.secondaryColor
36 width: columnwidth * 0.18
38 color: Theme.secondaryColor
41 width: columnwidth * 0.18
43 color: Theme.secondaryColor
46 width: columnwidth * 0.15
48 color: Theme.secondaryColor
49 horizontalAlignment: Text.AlignRight
52 width: columnwidth * 0.15
54 color: Theme.secondaryColor
55 horizontalAlignment: Text.AlignRight
62 menu: journeyMenuComponent
65 spacing: Theme.paddingLarge
66 x: Theme.horizontalPageMargin
69 width: columnwidth * 0.34
70 text: Qt.formatDate(journeymodel.epochToDate(start), "d MMM yyyy")
71 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
74 width: columnwidth * 0.18
75 text: Qt.formatTime(journeymodel.epochToTime(start), "hh:mm")
76 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
79 width: columnwidth * 0.18
80 text: Qt.formatTime(new Date(0, 0, 0, 0, 0, duration), 'hh:mm')
81 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
84 width: columnwidth * 0.15
86 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
87 horizontalAlignment: Text.AlignRight
90 width: columnwidth * 0.15
92 color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
93 horizontalAlignment: Text.AlignRight
96 onClicked: pageStack.push(Qt.resolvedUrl("JourneyInfo.qml"), {title: "Journey info", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby})
99 id: journeyMenuComponent
103 onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Edit journey", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby})
107 onClicked: remove(index)
112 function remove(index) {
113 remorseAction(qsTr("Deleting journey"), function() {
114 onClicked: journeymodel.deleteJourney(index)
118 VerticalScrollDecorator {}