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
81 anchors.left: isPortrait ? statsColumn.left : statsColumn.right
84 y: (isPortrait ? (statsPage.height / 2.0) : statsColumn.y)
87 console.log("Model changed");
93 width: graphsView.itemWidth
94 height: graphsView.height
104 width: parent.width - Theme.horizontalPageMargin
105 anchors.top: sectionHeaderItem.bottom
106 height: (isPortrait ? (statsPage.height / 2.0) - Theme.paddingLarge : statsPage.height - Theme.paddingLarge - headerItem.height) - sectionHeaderItem.height
107 anchors.left: parent.left
110 //labelsy: ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]
112 primary: Theme.primaryColor
113 secondary: Theme.highlightColor
114 highlight: Theme.highlightColor
119 fontsize: Theme.fontSizeExtraSmall
121 PropertyAnimation on animate {
124 easing.type: Easing.InOutExpo
137 spacing: Theme.paddingLarge
138 width: isPortrait ? parent.width : parent.width * 0.5
139 y: (isPortrait ? (statsPage.height / 2.0) : statsColumn.y)
140 anchors.left: isPortrait ? statsColumn.left : statsColumn.right
141 anchors.leftMargin: Theme.horizontalPageMargin
146 width: parent.width - 2 * Theme.horizontalPageMargin
147 height: isPortrait ? (statsPage.height / 2.0) - Theme.paddingLarge : statsPage.height - Theme.paddingLarge - headerItem.height
148 model: currentStatus.getGraphData()
149 labelsx: ["M", "T", "W", "Th", "F", "S", "Su", "A", "B", "C"]
150 //labelsy: ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]
152 primary: Theme.primaryColor
153 secondary: Theme.highlightColor
154 highlight: Theme.highlightColor
159 fontsize: Theme.fontSizeExtraSmall
160 PropertyAnimation on animate {
162 easing.type: Easing.InOutExpo