aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseniy Movshev <dodoradio@outlook.com>2023-07-01 01:01:37 +0100
committerArseniy Movshev <dodoradio@outlook.com>2023-07-02 10:20:57 +0100
commitdeb5c14eed66b5e0d819136959345f43f7f925d0 (patch)
tree591adff50dde2c0865fcc25eb30a5cce77cec68b
parent7038315f5f4df4e53fd065d5253a5d4cf81f0b81 (diff)
Add settings for step goal
-rw-r--r--src/SettingsPage.qml19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/SettingsPage.qml b/src/SettingsPage.qml
index e184d88..c2f6d2e 100644
--- a/src/SettingsPage.qml
+++ b/src/SettingsPage.qml
@@ -53,6 +53,23 @@ Item {
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
height: width*0.25
@@ -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()