From 86ac8fec062c9dfb6d695ac5c82bb06241f0ab13 Mon Sep 17 00:00:00 2001 From: dodoradio Date: Fri, 21 Jul 2023 15:54:21 +0100 Subject: Steps: Use new bar graph interactions to open detail page at different dates --- src/stepCounter/StepsDetailPage.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/stepCounter/StepsDetailPage.qml') diff --git a/src/stepCounter/StepsDetailPage.qml b/src/stepCounter/StepsDetailPage.qml index 9d141dd..978a411 100644 --- a/src/stepCounter/StepsDetailPage.qml +++ b/src/stepCounter/StepsDetailPage.qml @@ -24,6 +24,8 @@ import org.asteroid.sensorlogd 1.0 import "../graphs" Item { + id: root + property date currentDay: new Date() Flickable { anchors.fill: parent contentHeight: contentColumn.implicitHeight @@ -33,13 +35,21 @@ Item { Item { width: parent.width; height: parent.width*0.2} + Label { + anchors { + left: parent.left + margins: app.width*0.1 + } + text: graph.startTime.toLocaleDateString() + } + StepsLineGraph { id: graph anchors.horizontalCenter: parent.horizontalCenter width: parent.width*0.9 height: app.height*2/3 - startTime: new Date() - endTime: new Date() + startTime: root.currentDay + endTime: root.currentDay } Row { anchors.horizontalCenter: parent.horizontalCenter -- cgit v1.2.3-54-g00ecf