From 4de0f35b44edc69732bb34d8250db7b0aaf38f0b Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Sun, 2 Jul 2023 11:50:08 +0100 Subject: Add settings for preview display to UI settings page --- src/settings/UiSettingsPage.qml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/settings') diff --git a/src/settings/UiSettingsPage.qml b/src/settings/UiSettingsPage.qml index 8abea6c..2009ec6 100644 --- a/src/settings/UiSettingsPage.qml +++ b/src/settings/UiSettingsPage.qml @@ -18,6 +18,7 @@ import QtQuick 2.15 import org.asteroid.controls 1.0 +import Nemo.Configuration 1.0 import org.asteroid.sensorlogd 1.0 @@ -34,6 +35,31 @@ Item { anchors.fill: parent Item { width: parent.width; height: parent.width*0.2} + LabeledSwitch { + width: parent.width + height: width*0.25 + text: "Show step count preview" + checked: stepsPreviewVisible.value + onCheckedChanged: stepsPreviewVisible.value = checked + } + LabeledSwitch { + width: parent.width + height: width*0.25 + text: "Show heartrate preview" + checked: hrPreviewVisible.value + onCheckedChanged: hrPreviewVisible.value = checked + } } } + + ConfigurationValue { + id: stepsPreviewVisible + key: "/org/asteroidos/health/ui/stepCounter/showpreview" + defaultValue: true + } + ConfigurationValue { + id: hrPreviewVisible + key: "/org/asteroidos/health/ui/heartrate/showpreview" + defaultValue: true + } } -- cgit v1.2.3-70-g09d2