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
11 property int showingindex: 0
16 contentHeight: statsColumn.implicitHeight + headerItem.height
18 VerticalScrollDecorator {}
27 spacing: Theme.paddingLarge
28 width: isPortrait ? parent.width : parent.width * 0.5
32 label: qsTr("Journeys:")
33 value: currentStatus.getJourneyCount()
35 midlineMin: Theme.fontSizeSmall * 10
36 midlineMax: Theme.fontSizeSmall * 20
37 pixelSize: Theme.fontSizeMedium
39 horizontalAlignment: Text.AlignRight
43 label: qsTr("Time spent cycling:")
44 value: currentStatus.getFormattedTime(currentStatus.getTimeSpentCycling(), 0, 5)
46 midlineMin: Theme.fontSizeSmall * 10
47 midlineMax: Theme.fontSizeSmall * 20
48 pixelSize: Theme.fontSizeMedium
50 horizontalAlignment: Text.AlignRight
54 label: qsTr("Average journey duration:")
55 value: currentStatus.getFormattedTime(currentStatus.getAverageDuration(), 1, 5)
57 midlineMin: Theme.fontSizeSmall * 10
58 midlineMax: Theme.fontSizeSmall * 20
59 pixelSize: Theme.fontSizeMedium
61 horizontalAlignment: Text.AlignRight
65 label: qsTr("Speed percentile:")
66 value: Math.round(100.0 - currentStatus.getSpeedPercentile() * 100) + "%"
68 midlineMin: Theme.fontSizeSmall * 10
69 midlineMax: Theme.fontSizeSmall * 20
70 pixelSize: Theme.fontSizeMedium
72 horizontalAlignment: Text.AlignRight
78 width: isPortrait ? parent.width : parent.width * 0.5
79 height: (isPortrait ? statsPage.height / 2.0 : statsPage.height) - Theme.paddingLarge
82 anchors.left: isPortrait ? statsColumn.left : statsColumn.right
85 y: (isPortrait ? (statsPage.height / 2.0) : statsColumn.y)
88 console.log("Model changed");
95 width: graphsView.itemWidth
96 height: graphsView.height
105 width: parent.width - Theme.horizontalPageMargin
106 anchors.top: sectionHeaderItem.bottom
107 height: (isPortrait ? (statsPage.height / 2.0) - Theme.paddingLarge : statsPage.height - Theme.paddingLarge - headerItem.height) - sectionHeaderItem.height
108 anchors.left: parent.left
110 //linedata: barvalues
112 //labelsy: ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]
114 primary: Theme.primaryColor
115 secondary: Theme.highlightColor
116 highlight: Theme.secondaryColor
121 fontsize: Theme.fontSizeExtraSmall
122 animate: (graphsView.currentItem === delegateItem) ? 1.0 : 0.0
124 Behavior on animate {
126 easing.type: Easing.OutExpo