Index: sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml =================================================================== diff -u -rfb43510552969e9fb3c3f10ae693ba81ea7e8d52 -r0f833ab55f35770484d35e375b0abb4a9a97b9eb --- sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision fb43510552969e9fb3c3f10ae693ba81ea7e8d52) +++ sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision 0f833ab55f35770484d35e375b0abb4a9a97b9eb) @@ -5,7 +5,7 @@ * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * - * \file SettingsRootSSH.qml + * \file SettingsRootSSHAccess.qml * \author (last) Behrouz NematiPour * \date (last) 11-May-2023 * \author (original) Behrouz NematiPour @@ -22,28 +22,28 @@ import "qrc:/globals" /*! - * \brief SettingsRootSSH is the screen + * \brief SettingsRootSSHAccess is the screen * which enables the Ro Water Input */ SettingsBase { id: _root itemIndex : SettingsStack.RootSSHAccess confirmVisible : false - Row { id: _settingsRootSSHRow + Row { id: _settingsRootSSHAccessRow anchors.centerIn: parent - Text { id : _settingsRootSSHLabel + Text { id : _settingsRootSSHAccessLabel text : qsTr("Root SSH Login") width : 300 - height : _settingsRootSSHSwitch.height + height : _settingsRootSSHAccessSwitch.height color : Colors.white font.pixelSize: Fonts.fontPixelButton verticalAlignment : Text.AlignVCenter horizontalAlignment : Text.AlignLeft } - Switch { id: _settingsRootSSHSwitch + Switch { id: _settingsRootSSHAccessSwitch property bool active: true checked : vDuetRoWaterDG.status @@ -56,16 +56,16 @@ implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight anchors.centerIn: parent - color : _settingsRootSSHSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive - border.color : _settingsRootSSHSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive + color : _settingsRootSSHAccessSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive + border.color : _settingsRootSSHAccessSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive Rectangle { property real diameter : Variables.sliderCircleDiameter - x: _settingsRootSSHSwitch.checked ? parent.width - width : 0 + x: _settingsRootSSHAccessSwitch.checked ? parent.width - width : 0 anchors.verticalCenter: parent.verticalCenter width : diameter height : diameter radius : diameter - color : _settingsRootSSHSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive + color : _settingsRootSSHAccessSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive border { width: Variables.progressbarHandlerBorderWidth color: Colors.textMain @@ -76,25 +76,25 @@ contentItem: Text { width : parent.width height : parent.height - // text : qsTr("Enabled")// _settingsRootSSHSwitch.checked ? qsTr("ON") : qsTr("OFF") + // text : qsTr("Enabled")// _settingsRootSSHAccessSwitch.checked ? qsTr("ON") : qsTr("OFF") font.pixelSize: Fonts.fontPixelButton - color : _settingsRootSSHSwitch.active ? Colors.textMain : Colors.textDisableButton + color : _settingsRootSSHAccessSwitch.active ? Colors.textMain : Colors.textDisableButton verticalAlignment : Text.AlignTop horizontalAlignment : Text.AlignHCenter } } } - Connections { target: _settingsRootSSHSwitch + Connections { target: _settingsRootSSHAccessSwitch function onClicked() { - vDevice.rootSSHAccess = _settingsRootSSHSwitch.checked + vDevice.rootSSHAccess = _settingsRootSSHAccessSwitch.checked } } Connections { target: vDevice // in case the value is rejecte it will be set to the previous value // also the init value shall be set when navigate to the screen - function onRootSSHAccessChanged ( vValue ) { _settingsRootSSHSwitch.checked = vValue } - function onStatusChanged ( vValue ) { _root.notificationText = vValue } + function onRootSSHAccessChanged ( vValue ) { _settingsRootSSHAccessSwitch.checked = vValue } + function onStatusChanged ( vValue ) { _root.notificationText = vValue } } }