Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r4eecbe25c905517c495c69ad9524ffdc7ffe181a -r8ee8ce1e868b66dd0ae197ef7a947e0436037ef3 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 4eecbe25c905517c495c69ad9524ffdc7ffe181a) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 8ee8ce1e868b66dd0ae197ef7a947e0436037ef3) @@ -15,6 +15,7 @@ // Qt import QtQuick 2.12 +import QtQuick.Controls 2.12 // Switch // Project import Gui.Actions 0.1 @@ -48,6 +49,7 @@ Services , SetDateTime , ExportLogs , + RoInput , Language , Calibration , SWUpdate , @@ -62,6 +64,7 @@ qsTr("Service" ), // Service qsTr("Set Date And Time" ), // SetDateTime qsTr("Export Logs" ), // ExportLogs + qsTr("Water Input Mode" ), // RoInput qsTr("Set Language" ), // Language qsTr("Calibration " ), // Calibration qsTr("Software Update" ), // SWUpdate @@ -76,6 +79,7 @@ true , // Services true , // SetDateTime true , // ExportLogs + true , // RoInput false , // Language false , // Calibration false , // SWUpdate @@ -90,6 +94,7 @@ ! serviceMode , // Services serviceMode , // SetDateTime true , // ExportLogs + true , // RoInput false /* serviceMode phase 1 */ , // Language false /* serviceMode phase 1 */ , // Calibration false /* serviceMode phase 1 */ , // SWUpdate @@ -145,6 +150,10 @@ push( _settingsExportLogs ) break + case SettingsStack.RoInput: + push( _settingsRoInput ) + break + default: console.debug("Unknown Index", vIndex) break @@ -236,6 +245,73 @@ itemIndex : SettingsStack.ExportLogs } + SettingsBase { id: _settingsRoInput + confirmVisible : false + itemIndex : SettingsStack.RoInput + + + Row { id: _settingsRoInputRow + anchors.centerIn: parent + + Text { id : _settingsRoInputLabel + text : qsTr("Pure Water Mode") + width : 300 + height : _settingsRoInputSwitch.height + color : Colors.white + font.pixelSize: Fonts.fontPixelButton + verticalAlignment : Text.AlignVCenter + horizontalAlignment : Text.AlignLeft + } + + Switch { id: _settingsRoInputSwitch + property bool active: true + onCheckedChanged: { + if ( ! active ) active = true + vSettings.roWaterMode = checked + } + + checked : vSettings.roWaterMode + + width : 85 + height : 85 + + indicator: Rectangle { + implicitWidth : Variables.sliderCircleDiameter * 1.7 + implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) + radius : implicitHeight + anchors.centerIn: parent + color : _settingsRoInputSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive + border.color : _settingsRoInputSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive + Rectangle { + property real diameter : Variables.sliderCircleDiameter + x: _settingsRoInputSwitch.checked ? parent.width - width : 0 + anchors.verticalCenter: parent.verticalCenter + width : diameter + height : diameter + radius : diameter + color : _settingsRoInputSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive + border { + width: Variables.progressbarHandlerBorderWidth + color: Colors.textMain + } + } + } + + contentItem: Text { + width : parent.width + height : parent.height + text : _settingsRoInputSwitch.checked ? qsTr("ON") : qsTr("OFF") + font.pixelSize: Fonts.fontPixelButton + color : _settingsRoInputSwitch.active ? Colors.textMain : Colors.textDisableButton + verticalAlignment : Text.AlignTop + horizontalAlignment : Text.AlignHCenter + // anchors.bottom : parent.top + // anchors.verticalCenter : parent.verticalCenter + } + } + } + } + UserConfirmation { id: _servicePassword property bool isPassword_Accepted : false property bool isDefaultPasswordSet : (vSettings.servicePass != "")