aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseniy Movshev <dodoradio@outlook.com>2023-06-02 00:51:46 +0100
committerArseniy Movshev <dodoradio@outlook.com>2023-06-02 17:12:14 +0100
commit016bc05247854fc832ae3b2e82d5cb2698173b17 (patch)
tree4706bf8a77dd3df7a9bb767ae5d507607c3f8a75
parentd6b14767bd7a4de6a29337e0acda9d7beb6f1a19 (diff)
Settings: add interval settings for heartrate and step counter
Diffstat (limited to '')
-rw-r--r--src/SettingsPage.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/SettingsPage.qml b/src/SettingsPage.qml
index 567b5e0..993381f 100644
--- a/src/SettingsPage.qml
+++ b/src/SettingsPage.qml
@@ -45,6 +45,16 @@ Item {
text: "Log step count"
Component.onCompleted: checked = loggerSettings.stepCounterEnabled
}
+ IntSelector {
+ id: stepsIntervalSelector
+ width: parent.width
+ height: width*0.25
+ value: loggerSettings.stepCounterInterval/60000
+ min: 5
+ max: 60
+ stepSize: 1
+ unitMarker: "m"
+ }
LabeledSwitch {
id: hrEnableSwitch
width: parent.width
@@ -52,6 +62,16 @@ Item {
text: "Log heart rate"
Component.onCompleted: checked = loggerSettings.heartrateSensorEnabled
}
+ IntSelector {
+ id: hrIntervalSelector
+ width: parent.width
+ height: width*0.25
+ value: loggerSettings.heartrateSensorInterval/60000
+ min: 5
+ max: 60
+ stepSize: 1
+ unitMarker: "m"
+ }
IconButton {
iconName: "ios-checkmark-circle-outline"
height: parent.width*0.2
@@ -59,7 +79,9 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
loggerSettings.stepCounterEnabled = stepsEnableSwitch.checked
+ loggerSettings.stepCounterInterval = stepsIntervalSelector.value*60000
loggerSettings.heartrateSensorEnabled = hrEnableSwitch.checked
+ loggerSettings.heartrateSensorInterval = hrIntervalSelector.value*60000
loggerSettings.reInitLogger()
pageStack.pop(pageStack.currentLayer)
}