diff options
author | dodoradio <dodoradio@outlook.com> | 2023-07-20 23:48:37 +0100 |
---|---|---|
committer | dodoradio <dodoradio@outlook.com> | 2023-07-21 00:09:58 +0100 |
commit | 69ee975bf761578f59ba41b21575f7c0764b3681 (patch) | |
tree | e8b3284dfcca5951888030599f028a9db64e9b24 /src/stepCounter/StepsDetailPage.qml | |
parent | c2632dc90160ad4457fbe65eb1dae5157254cbc7 (diff) |
Add steps detail page
Currently this is a direct clone of the heartrate detail page, and isn't specialised for steps in any way
Diffstat (limited to '')
-rw-r--r-- | src/stepCounter/StepsDetailPage.qml | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/src/stepCounter/StepsDetailPage.qml b/src/stepCounter/StepsDetailPage.qml new file mode 100644 index 0000000..9d141dd --- /dev/null +++ b/src/stepCounter/StepsDetailPage.qml @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2023 Arseniy Movshev <dodoradio@outlook.com> + * 2019 Florent Revest <revestflo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +import QtQuick 2.15 +import org.asteroid.controls 1.0 + +import org.asteroid.sensorlogd 1.0 + +import "../graphs" + +Item { + Flickable { + anchors.fill: parent + contentHeight: contentColumn.implicitHeight + Column { + id: contentColumn + width: parent.width + + Item { width: parent.width; height: parent.width*0.2} + + StepsLineGraph { + id: graph + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width*0.9 + height: app.height*2/3 + startTime: new Date() + endTime: new Date() + } + Row { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width*0.9 + height: width/6 + MouseArea { + height: parent.height + width: parent.width/3 + Label { + anchors.centerIn: parent + text: "3 weeks" + } + onClicked: { + var d = graph.endTime + d.setDate(d.getDate() - 20) + graph.startTime = d + } + } + MouseArea { + height: parent.height + width: parent.width/3 + Label { + anchors.centerIn: parent + text: "week" + } + onClicked: { + var d = graph.endTime + d.setDate(d.getDate() - 6) + graph.startTime = d + } + } + MouseArea { + height: parent.height + width: parent.width/3 + Label { + anchors.centerIn: parent + text: "day" + } + onClicked: { + graph.startTime = graph.endTime + } + } + } + + Item { width: parent.width; height: parent.width*0.2} + } + } + PageHeader { + text: "Steps" + } +} |