import QtQuick 2.0 import Sailfish.Silica 1.0 import "../components" Page { id: statsPage // The effective value will be restricted by ApplicationWindow.allowedOrientations allowedOrientations: Orientation.All SilicaFlickable { id: statsView anchors.fill: parent contentHeight: statsColumn.implicitHeight + headerItem.height VerticalScrollDecorator {} PageHeader { id: headerItem title: qsTr("Stats") } Column { id: statsColumn spacing: Theme.paddingLarge width: isPortrait ? parent.width : parent.width * 0.5 y: headerItem.height InfoRow { label: qsTr("Journeys:") value: currentStatus.getJourneyCount() midlineRatio: 0.7 midlineMin: Theme.fontSizeSmall * 10 midlineMax: Theme.fontSizeSmall * 20 pixelSize: Theme.fontSizeMedium labelTextBold: true horizontalAlignment: Text.AlignRight } InfoRow { label: qsTr("Time spent cycling:") value: currentStatus.getFormattedTime(currentStatus.getTimeSpentCycling(), 0, 5) midlineRatio: 0.5 midlineMin: Theme.fontSizeSmall * 10 midlineMax: Theme.fontSizeSmall * 20 pixelSize: Theme.fontSizeMedium labelTextBold: true horizontalAlignment: Text.AlignRight } InfoRow { label: qsTr("Average journey duration:") value: currentStatus.getFormattedTime(currentStatus.getAverageDuration(), 1, 5) midlineRatio: 0.6 midlineMin: Theme.fontSizeSmall * 10 midlineMax: Theme.fontSizeSmall * 20 pixelSize: Theme.fontSizeMedium labelTextBold: true horizontalAlignment: Text.AlignRight } InfoRow { label: qsTr("Speed percentile:") value: Math.round(100.0 - currentStatus.getSpeedPercentile() * 100) + "%" midlineRatio: 0.7 midlineMin: Theme.fontSizeSmall * 10 midlineMax: Theme.fontSizeSmall * 20 pixelSize: Theme.fontSizeMedium labelTextBold: true horizontalAlignment: Text.AlignRight } } } }