From 1747034feba274292cc9acfde21a1576d59a11a9 Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Sun, 2 Jul 2023 16:12:55 +0100 Subject: Add weight graph and preview The weight data collection is manual, so we need a page for the user to input data, hence this commit isn't sufficient for a weight logging implementation on its own. Weight doesn't have a dataChanged signal in sensorlogd, so that's currently not implemented here either Because weight tracking isn't for everyone, the preview isn't shown by default. --- src/main.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main.qml') diff --git a/src/main.qml b/src/main.qml index 46090a2..39f83a1 100644 --- a/src/main.qml +++ b/src/main.qml @@ -26,6 +26,7 @@ import "graphs" import "settings" import "stepCounter" import "heartrate" +import "weight" Application { id: app @@ -69,6 +70,13 @@ Application { visible: hrPreviewVisible.value } + Item { width: parent.width; height: parent.width*0.1; visible: weightPreviewVisible.value} + + WeightPreview { + width: parent.width + visible: weightPreviewVisible.value + } + ListItem { title: "Settings" iconName: "ios-settings-outline" @@ -91,6 +99,11 @@ Application { key: "/org/asteroidos/health/ui/heartrate/showpreview" defaultValue: true } + ConfigurationValue { + id: weightPreviewVisible + key: "/org/asteroidos/health/ui/weight/showpreview" + defaultValue: false + } Component { id: settingsPage RootSettingsPage { -- cgit v1.2.3-54-g00ecf