2 import Sailfish.Silica 1.0
3 import harbour.pedalo.graph 1.0
9 // The effective value will be restricted by ApplicationWindow.allowedOrientations
10 allowedOrientations: Orientation.All
15 contentHeight: statsColumn.implicitHeight + headerItem.height
17 VerticalScrollDecorator {}
26 spacing: Theme.paddingLarge
27 width: isPortrait ? parent.width : parent.width * 0.5
31 label: qsTr("Journeys:")
32 value: currentStatus.getJourneyCount()
34 midlineMin: Theme.fontSizeSmall * 10
35 midlineMax: Theme.fontSizeSmall * 20
36 pixelSize: Theme.fontSizeMedium
38 horizontalAlignment: Text.AlignRight
42 label: qsTr("Time spent cycling:")
43 value: currentStatus.getFormattedTime(currentStatus.getTimeSpentCycling(), 0, 5)
45 midlineMin: Theme.fontSizeSmall * 10
46 midlineMax: Theme.fontSizeSmall * 20
47 pixelSize: Theme.fontSizeMedium
49 horizontalAlignment: Text.AlignRight
53 label: qsTr("Average journey duration:")
54 value: currentStatus.getFormattedTime(currentStatus.getAverageDuration(), 1, 5)
56 midlineMin: Theme.fontSizeSmall * 10
57 midlineMax: Theme.fontSizeSmall * 20
58 pixelSize: Theme.fontSizeMedium
60 horizontalAlignment: Text.AlignRight
64 label: qsTr("Speed percentile:")
65 value: Math.round(100.0 - currentStatus.getSpeedPercentile() * 100) + "%"
67 midlineMin: Theme.fontSizeSmall * 10
68 midlineMax: Theme.fontSizeSmall * 20
69 pixelSize: Theme.fontSizeMedium
71 horizontalAlignment: Text.AlignRight
77 width: isPortrait ? parent.width : parent.width * 0.5
78 height: (isPortrait ? statsPage.height / 2.0 : statsPage.height) - Theme.paddingLarge
82 y: (isPortrait ? (statsPage.height / 2.0) : statsColumn.y)
86 width: graphsView.itemWidth
87 height: graphsView.height
97 width: parent.width - 2 * Theme.horizontalPageMargin
98 anchors.top: sectionHeaderItem.bottom
99 height: (isPortrait ? (statsPage.height / 2.0) - Theme.paddingLarge : statsPage.height - Theme.paddingLarge - headerItem.height) - sectionHeaderItem.height
100 anchors.horizontalCenter: parent.horizontalCenter
103 //labelsy: ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]
105 primary: Theme.primaryColor
106 secondary: Theme.highlightColor
107 highlight: Theme.highlightColor
112 fontsize: Theme.fontSizeExtraSmall
114 PropertyAnimation on animate {
117 easing.type: Easing.InOutExpo
130 spacing: Theme.paddingLarge
131 width: isPortrait ? parent.width : parent.width * 0.5
132 y: (isPortrait ? (statsPage.height / 2.0) : statsColumn.y)
133 anchors.left: isPortrait ? statsColumn.left : statsColumn.right
134 anchors.leftMargin: Theme.horizontalPageMargin
139 width: parent.width - 2 * Theme.horizontalPageMargin
140 height: isPortrait ? (statsPage.height / 2.0) - Theme.paddingLarge : statsPage.height - Theme.paddingLarge - headerItem.height
141 model: currentStatus.getGraphData()
142 labelsx: ["M", "T", "W", "Th", "F", "S", "Su", "A", "B", "C"]
143 //labelsy: ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]
145 primary: Theme.primaryColor
146 secondary: Theme.highlightColor
147 highlight: Theme.highlightColor
152 fontsize: Theme.fontSizeExtraSmall
153 PropertyAnimation on animate {
155 easing.type: Easing.InOutExpo