2 import Sailfish.Silica 1.0
8 // The effective value will be restricted by ApplicationWindow.allowedOrientations
9 allowedOrientations: Orientation.All
11 // To enable PullDownMenu, place our content in a SilicaFlickable
15 VerticalScrollDecorator {}
17 // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
21 onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
25 // Tell SilicaFlickable the height of its content.
26 contentHeight: column.implicitHeight
31 width: isPortrait ? parent.width : parent.width / 2.0
32 height: isPortrait ? page.height / 2.0 : page.height
36 source: "image://theme/icon-launcher-component-gallery"
37 text: currentStatus.cycling ? qsTr("Finish your journey") : qsTr("Start a journey")
39 if (currentStatus.cycling) {
40 var dialog = pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Finish journey", start: journeymodel.epochToDateTime(currentStatus.startTime), duration: currentStatus.getDuration()})
42 dialog.accepted.connect(function() {
43 currentStatus.cycling = false
47 currentStatus.startJourney()
53 source: "image://theme/icon-launcher-component-gallery"
55 onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"))
62 width: isPortrait ? parent.width : parent.width / 2.0
63 height: isPortrait ? page.height / 2.0 : page.height
65 y: isPortrait ? page.height / 2: 0
66 x: isPortrait ? 0 : page.width / 2.0
69 source: "image://theme/icon-launcher-component-gallery"
70 text: "View latest stats"
71 onClicked: pageStack.push(Qt.resolvedUrl("Stats.qml"))
75 source: "image://theme/icon-launcher-component-gallery"
76 text: "Previous journeys"
77 onClicked: pageStack.push(Qt.resolvedUrl("JourneyList.qml"))