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 // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
18 onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
22 // Tell SilicaFlickable the height of its content.
23 contentHeight: column.height
25 // Place our content in a Column. The PageHeader is always placed at the top
26 // of the page, followed by our content.
31 spacing: Theme.paddingLarge
41 anchors.horizontalCenter: parent.horizontalCenter
42 text: currentStatus.cycling ? qsTr("Finish") : qsTr("Start a journey")
44 if (currentStatus.cycling) {
45 var dialog = pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"), {title: "Finish journey", start: journeymodel.epochToDateTime(currentStatus.startTime), duration: currentStatus.getDuration()})
47 dialog.accepted.connect(function() {
48 currentStatus.cycling = false
52 currentStatus.startJourney()
58 text: qsTr("Add a journey")
62 anchors.horizontalCenter: parent.horizontalCenter
63 text: qsTr("Enter journey")
64 onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml"))
68 text: qsTr("Latest stats")
72 anchors.horizontalCenter: parent.horizontalCenter
73 text: qsTr("View stats")
74 onClicked: pageStack.push(Qt.resolvedUrl("Stats.qml"))
78 text: qsTr("Previous journeys")
82 anchors.horizontalCenter: parent.horizontalCenter
83 text: qsTr("View journeys")
84 onClicked: pageStack.push(Qt.resolvedUrl("JourneyList.qml"))