aboutsummaryrefslogtreecommitdiff
path: root/src/SettingsPage.qml
diff options
context:
space:
mode:
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)
}