From deb5c14eed66b5e0d819136959345f43f7f925d0 Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Sat, 1 Jul 2023 01:01:37 +0100 Subject: Add settings for step goal --- src/SettingsPage.qml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src') diff --git a/src/SettingsPage.qml b/src/SettingsPage.qml index e184d88..c2f6d2e 100644 --- a/src/SettingsPage.qml +++ b/src/SettingsPage.qml @@ -52,6 +52,23 @@ Item { stepSize: 1 unitMarker: "m" } + LabeledSwitch { + id: stepsGoalEnableSwitch + width: parent.width + height: width*0.25 + text: "Enable steps goal" + Component.onCompleted: checked = loggerSettings.heartrateSensorEnabled + } + IntSelector { + id: stepsGoalSelector + width: parent.width + height: width*0.25 + value: loggerSettings.stepGoalTarget + min: 500 + max: 50000 + stepSize: 500 + unitMarker: " steps" + } LabeledSwitch { id: hrEnableSwitch width: parent.width @@ -77,6 +94,8 @@ Item { onClicked: { loggerSettings.stepCounterEnabled = stepsEnableSwitch.checked loggerSettings.stepCounterInterval = stepsIntervalSelector.value*60000 + loggerSettings.stepGoalEnabled = stepsGoalEnableSwitch.checked + loggerSettings.stepGoalTarget = stepsGoalSelector.value loggerSettings.heartrateSensorEnabled = hrEnableSwitch.checked loggerSettings.heartrateSensorInterval = hrIntervalSelector.value*60000 loggerSettings.reInitLogger() -- cgit v1.2.3-70-g09d2