2 import Sailfish.Silica 1.0
7 // The effective value will be restricted by ApplicationWindow.allowedOrientations
8 allowedOrientations: Orientation.All
10 // To enable PullDownMenu, place our content in a SilicaFlickable
14 VerticalScrollDecorator {}
16 // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
20 onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
24 // Tell SilicaFlickable the height of its content.
25 contentHeight: column.implicitHeight + Theme.paddingLarge
27 // Place our content in a Column. The PageHeader is always placed at the top
28 // of the page, followed by our content.
33 spacing: Theme.paddingLarge
43 anchors.horizontalCenter: parent.horizontalCenter
44 text: currentStatus.cycling ? qsTr("Finish") : qsTr("Start a journey")
46 if (currentStatus.cycling) {
47 var dialog = pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Finish journey", start: journeymodel.epochToDateTime(currentStatus.startTime), duration: currentStatus.getDuration()})
49 dialog.accepted.connect(function() {
50 currentStatus.cycling = false
54 currentStatus.startJourney()
60 text: qsTr("Add a journey")
64 anchors.horizontalCenter: parent.horizontalCenter
65 text: qsTr("Enter journey")
66 onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"))
70 text: qsTr("Latest stats")
74 anchors.horizontalCenter: parent.horizontalCenter
75 text: qsTr("View stats")
76 onClicked: pageStack.push(Qt.resolvedUrl("Stats.qml"))
80 text: qsTr("Previous journeys")
84 anchors.horizontalCenter: parent.horizontalCenter
85 text: qsTr("View journeys")
86 onClicked: pageStack.push(Qt.resolvedUrl("JourneyList.qml"))