From b3f7a6f1f54f6ab52f58b1fb77ea87115dd3531f Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Sun, 2 Jul 2023 11:37:45 +0100 Subject: Add settings for which previews are shown on main preview page --- src/main.qml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main.qml b/src/main.qml index 491d246..46090a2 100644 --- a/src/main.qml +++ b/src/main.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 @@ -32,8 +33,6 @@ Application { centerColor: "#0097A6" outerColor: "#00060C" - property var weekday: ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]; - LoggerSettings{ id: loggerSettings } @@ -56,16 +55,18 @@ Application { Column { id: contentColumn anchors.fill: parent - Item { width: parent.width; height: parent.width*0.2} + Item { width: parent.width; height: parent.width*0.2; visible: stepsPreviewVisible.value} StepCounterPreview { width: parent.width + visible: stepsPreviewVisible.value } - Item { width: parent.width; height: parent.width*0.1} + Item { width: parent.width; height: parent.width*0.1; visible: hrPreviewVisible.value} HeartratePreview { width: parent.width + visible: hrPreviewVisible.value } ListItem { @@ -80,6 +81,16 @@ Application { } } } + ConfigurationValue { + id: stepsPreviewVisible + key: "/org/asteroidos/health/ui/stepCounter/showpreview" + defaultValue: true + } + ConfigurationValue { + id: hrPreviewVisible + key: "/org/asteroidos/health/ui/heartrate/showpreview" + defaultValue: true + } Component { id: settingsPage RootSettingsPage { -- cgit v1.2.3-54-g00ecf