Index: leahi.qrc
===================================================================
diff -u -r88a09dc4b26cfdd5fd111d20adfb9cb60697186c -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- leahi.qrc (.../leahi.qrc) (revision 88a09dc4b26cfdd5fd111d20adfb9cb60697186c)
+++ leahi.qrc (.../leahi.qrc) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -165,6 +165,7 @@
sources/gui/qml/components/BaseComboBox.qml
sources/gui/qml/components/VitalsButton.qml
sources/gui/qml/components/PasswordRequirements.qml
+ sources/gui/qml/components/BaseSwitch.qml
sources/gui/qml/compounds/PressureRangeSlider.qml
Index: sources/bluetooth/BluetoothInterface.cpp
===================================================================
diff -u -rf2e4eba6e85c5d36537be782926f23cc9dc01037 -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/bluetooth/BluetoothInterface.cpp (.../BluetoothInterface.cpp) (revision f2e4eba6e85c5d36537be782926f23cc9dc01037)
+++ sources/bluetooth/BluetoothInterface.cpp (.../BluetoothInterface.cpp) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -299,8 +299,8 @@
connect(this , SIGNAL(didDeviceSelect (BluetoothDeviceData )),
this , SLOT( onDeviceSelect (BluetoothDeviceData )));
- connect(&_ApplicationController, SIGNAL(didAttributeResponse(const DeviceBluetoothPairedQueryResponseData &)),
- this , SLOT( onAttributeResponse(const DeviceBluetoothPairedQueryResponseData &)));
+// connect(&_ApplicationController, SIGNAL(didAttributeResponse(const DeviceBluetoothPairedQueryResponseData &)),
+// this , SLOT( onAttributeResponse(const DeviceBluetoothPairedQueryResponseData &)));
}
Index: sources/gui/qml/components/BaseSwitch.qml
===================================================================
diff -u
--- sources/gui/qml/components/BaseSwitch.qml (revision 0)
+++ sources/gui/qml/components/BaseSwitch.qml (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -0,0 +1,45 @@
+/*!
+ *
+ * Copyright (c) 2021-2025 Diality Inc. - All Rights Reserved.
+ * \copyright
+ * 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 BaseSwitch.qml
+ * \author (last) Nico Ramirez
+ * \date (last) 27-Oct-2025
+ * \author (original) Nico Ramirez
+ * \date (original) 27-Oct-2025
+ *
+ */
+
+import QtQuick 2.12
+import QtQuick.Controls 2.12 // Switch
+
+// Qml imports
+import "qrc:/globals"
+
+Switch { id: _root
+ property bool active : true
+ property real diameter : Variables.sliderCircleDiameter
+ property int margin : 4
+
+ indicator: Rectangle {
+ implicitWidth : Variables.sliderCircleDiameter * 2.5
+ implicitHeight : Variables.sliderCircleDiameter + ( _root.margin * 2 )
+ radius : implicitHeight
+ anchors.centerIn: parent
+ color : _root.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive
+ border.color : _root.checked ? Colors.borderButton : Colors.createTreatmentInactive
+
+ Rectangle {
+ x: _root.checked ? parent.width - width - _root.margin : _root.margin
+ anchors.verticalCenter: parent.verticalCenter
+ width : _root.diameter
+ height : _root.diameter
+ radius : _root.diameter
+ color : _root.active ? Colors.textMain : Colors.borderDisableButton
+ Behavior on x { NumberAnimation { duration: 150; easing.type: Easing.InOutQuad } }
+ }
+ }
+}
Index: sources/gui/qml/components/PasswordRequirements.qml
===================================================================
diff -u -r88a09dc4b26cfdd5fd111d20adfb9cb60697186c -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/gui/qml/components/PasswordRequirements.qml (.../PasswordRequirements.qml) (revision 88a09dc4b26cfdd5fd111d20adfb9cb60697186c)
+++ sources/gui/qml/components/PasswordRequirements.qml (.../PasswordRequirements.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -22,7 +22,7 @@
verticalAlignment : Text.AlignVCenter
wrapMode : Text.Wrap
color : Colors.textMain
- text : qsTr("The password must contain at least the following:")
+ text : qsTr("The password must contain the following:")
}
Column { id: contentColumn
Index: sources/gui/qml/compounds/TouchGrid.qml
===================================================================
diff -u -r21041955990385205ec1aca17ef51fc1fd9a4b29 -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
+++ sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -46,8 +46,14 @@
property color lineColor : Colors.borderButtonHalfDarker
property color textColor : Colors.textButton
property real lineThickness : 1.5
- property real itemsValueLeftMargin : itemWidth / 2
- property real itemsUnitLeftMargin : itemWidth / 4
+ property real itemsValueLeftMargin: itemWidth / 2
+ property real itemsUnitLeftMargin : itemWidth / 4
+ property int arrowWidth : Variables.arrowWidth
+ property int arrowHeight : Variables.arrowHeight
+ property int arrowRightMargin : 0
+ property color delegateColor : Colors.backgroundButtonNormal
+ property int delegateBorderWidth : 0
+ property color delegateBorderColor : Colors.borderButton
property bool alignCenter : true
@@ -63,7 +69,6 @@
property int itemsVisibleCount : 0
}
-
height: parent.height
onItemsVisibleChanged: {
@@ -92,7 +97,7 @@
rows : _root.rowCount
rowSpacing : 25
columnSpacing : itemsVisibleCount > rowCount ? 50 : 0
- Repeater {
+ Repeater { id: _repeater
model : _root.itemsText
TouchRect { id: _touchItem
readonly property int indentMargin : (undef( _root.itemsHasIndent[index], false ) ? 20 : 0)
@@ -101,10 +106,12 @@
text.anchors.horizontalCenter: undefined
text.leftPadding : Variables.minVGap + indentMargin
text.text : modelData
- border.width : 0
+ border.width : _root.delegateBorderWidth
height : _root.itemHeight
width : _root.itemWidth
textColor : _root.textColor
+ borderColor : _root.delegateBorderColor
+ backgroundColor : _root.delegateColor
radius : Variables.dialogRadius
enabled : undef( _root.itemsEnabled[index], true )
visible : undef( _root.itemsVisible[index], true )
@@ -132,9 +139,10 @@
&& ! _touchItem.isPressed
&& _root.itemsText[index]
anchors.right : _touchItem.right
+ anchors.rightMargin : _root.arrowRightMargin
anchors.verticalCenter : _touchItem.verticalCenter
- width : Variables.arrowWidth
- height : Variables.arrowHeight
+ width : _root.arrowWidth
+ height : _root.arrowHeight
source : "qrc:/images/iArrowRight"
}
Line { id: _line
Index: sources/gui/qml/pages/settings/SettingsHome.qml
===================================================================
diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/gui/qml/pages/settings/SettingsHome.qml (.../SettingsHome.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f)
+++ sources/gui/qml/pages/settings/SettingsHome.qml (.../SettingsHome.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -14,7 +14,7 @@
*/
// Qt
-import QtQuick 2.12
+import QtQuick 2.15
// Qml imports
import "qrc:/globals"
@@ -29,21 +29,32 @@
objectName: "_SettingsHome"
property alias itemsText : _settingItems.itemsText
- property alias itemsEnabled : _settingItems.itemsEnabled
property alias itemsVisible : _settingItems.itemsVisible
- readonly property int rowCount : 6
- readonly property int colCount : itemsText.length > rowCount ? Math.ceil(itemsText.length / rowCount) : 1
+ readonly property int rowCount : _settingItems.itemsVisible.filter(value => value).length / 2
+ readonly property int colCount : 2
+ readonly property int delegateWidth : parent.width / 2.5
+ readonly property int delegateHeight: 80
+
signal itemClicked(int vIndex)
- contentArea.anchors.topMargin: Variables.defaultMargin * 4 * -1
+ contentArea.anchors.topMargin: Variables.defaultMargin * 4
contentItem: TouchGrid { id: _settingItems
- onItemClicked : _root.itemClicked(vIndex)
- rowCount : _root.rowCount
- colCount : _root.colCount
- itemWidth : 325
+ onItemClicked : _root.itemClicked(vIndex)
+ rowCount : _root.rowCount
+ colCount : _root.colCount
+ itemWidth : _root.delegateWidth
+ itemHeight : _root.delegateHeight
+ lineThickness : 0
+ arrowWidth : Variables.iconButtonSize
+ arrowHeight : Variables.iconButtonSize
+ arrowRightMargin : Variables.defaultMargin
+ delegateColor : Colors.panelBackgroundColor
+ delegateBorderWidth : 1
+ delegateBorderColor : Colors.panelBorderColor
+ itemsHasIndent : Array(itemsText.length).fill(true) // sets all to true
}
// The Main menu need to hide in case we have any alarm, if not the menu is covered by keyboard but the alram does not.
Index: sources/gui/qml/pages/settings/SettingsLocalization.qml
===================================================================
diff -u -r88a09dc4b26cfdd5fd111d20adfb9cb60697186c -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/gui/qml/pages/settings/SettingsLocalization.qml (.../SettingsLocalization.qml) (revision 88a09dc4b26cfdd5fd111d20adfb9cb60697186c)
+++ sources/gui/qml/pages/settings/SettingsLocalization.qml (.../SettingsLocalization.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -15,9 +15,7 @@
// Qt
import QtQuick 2.12
-import QtQuick.Controls 2.12 // Switch
-
// Qml imports
import "qrc:/globals"
import "qrc:/components"
Index: sources/gui/qml/pages/settings/SettingsROInput.qml
===================================================================
diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/gui/qml/pages/settings/SettingsROInput.qml (.../SettingsROInput.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f)
+++ sources/gui/qml/pages/settings/SettingsROInput.qml (.../SettingsROInput.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -15,11 +15,10 @@
// Qt
import QtQuick 2.12
-import QtQuick.Controls 2.12 // Switch
-
// Qml imports
import "qrc:/globals"
+import "qrc:/components"
/*!
* \brief SettingsROInput is the screen
@@ -43,56 +42,20 @@
anchors.horizontalCenter: parent.horizontalCenter
}
- Switch { id: _settingsRoInputSwitch
- property bool active: true
- anchors.left : _settingsRoInputLabel.right
-
+ BaseSwitch { id: _settingsRoInputSwitch
checked : vDuetRoWaterDG.status
- 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
- }
- }
+ onClicked: {
+ vDuetRoWaterDG.doAdjustment ( _settingsRoInputSwitch.checked )
}
- 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
- }
}
}
- Connections { target: _settingsRoInputSwitch
- function onClicked() {
- vDuetRoWaterDG.doAdjustment ( _settingsRoInputSwitch.checked )
- }
- }
Connections { target: vDuetRoWaterDG
function onAdjustmentTriggered(vValue) {
+ print("**** vDuetRoWaterDG " + vValue )
+
if ( vDuetRoWaterDG.adjustment_Accepted ) {
_settingsRoInput.notificationText = ""
}
Index: sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml
===================================================================
diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f)
+++ sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -15,11 +15,11 @@
// Qt
import QtQuick 2.12
-import QtQuick.Controls 2.12 // Switch
// Qml imports
import "qrc:/globals"
+import "qrc:/components"
/*!
* \brief SettingsRootSSHAccess is the screen
@@ -33,6 +33,7 @@
confirmVisible : false
contentItem: Column {
+ spacing : 20
Row { id: _settingsRootSSHAccess_SSHDRow
anchors.horizontalCenter: parent.horizontalCenter
@@ -47,42 +48,10 @@
horizontalAlignment : Text.AlignLeft
}
- Switch { id: _settingsRootSSHAccess_SSHDSwitch
- property bool active : true
-
- width : _root.diameter
- height : _root.diameter
-
- indicator : Rectangle {
- implicitWidth : Variables.sliderCircleDiameter * 1.7
- implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 )
- radius : implicitHeight
- anchors.centerIn : parent
- color : _settingsRootSSHAccess_SSHDSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive
- border.color : _settingsRootSSHAccess_SSHDSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive
- Rectangle {
- property real diameter : Variables.sliderCircleDiameter
- x : _settingsRootSSHAccess_SSHDSwitch.checked ? parent.width - width : 0
- anchors.verticalCenter : parent.verticalCenter
- width : diameter
- height : diameter
- radius : diameter
- color : _settingsRootSSHAccess_SSHDSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive
- border {
- width : Variables.progressbarHandlerBorderWidth
- color : Colors.textMain
- }
- }
+ BaseSwitch { id: _settingsRootSSHAccess_SSHDSwitch
+ onClicked: {
+ vDevice.rootSSHAccess = toCheckState()
}
-
- contentItem : Text {
- width : parent.width
- height : parent.height
- font.pixelSize : Fonts.fontPixelButton
- color : _settingsRootSSHAccess_SSHDSwitch.active ? Colors.textMain : Colors.textDisableButton
- verticalAlignment : Text.AlignTop
- horizontalAlignment : Text.AlignHCenter
- }
}
}
@@ -99,42 +68,13 @@
horizontalAlignment : Text.AlignLeft
}
- Switch { id: _settingsRootSSHAccess_RootSwitch
- property bool active : _settingsRootSSHAccess_SSHDSwitch.checked
- enabled : _settingsRootSSHAccess_RootSwitch.active
- width : _root.diameter
- height : _root.diameter
+ BaseSwitch { id: _settingsRootSSHAccess_RootSwitch
+ active : _settingsRootSSHAccess_SSHDSwitch.checked
+ enabled : _settingsRootSSHAccess_RootSwitch.active
- indicator : Rectangle {
- implicitWidth : Variables.sliderCircleDiameter * 1.7
- implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 )
- radius : implicitHeight
- anchors.centerIn : parent
- color : _settingsRootSSHAccess_RootSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive
- border.color : _settingsRootSSHAccess_RootSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive
- Rectangle {
- property real diameter : Variables.sliderCircleDiameter
- x : _settingsRootSSHAccess_RootSwitch.checked ? parent.width - width : 0
- anchors.verticalCenter : parent.verticalCenter
- width : diameter
- height : diameter
- radius : diameter
- color : _settingsRootSSHAccess_RootSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive
- border {
- width : Variables.progressbarHandlerBorderWidth
- color : Colors.textMain
- }
- }
+ onClicked: {
+ vDevice.rootSSHAccess = toCheckState()
}
-
- contentItem : Text {
- width : parent.width
- height : parent.height
- font.pixelSize : Fonts.fontPixelButton
- color : _settingsRootSSHAccess_RootSwitch.active ? Colors.textMain : Colors.textDisableButton
- verticalAlignment : Text.AlignTop
- horizontalAlignment : Text.AlignHCenter
- }
}
}
}
@@ -166,16 +106,6 @@
_settingsRootSSHAccess_RootSwitch.checked = root
}
- Connections { target: _settingsRootSSHAccess_SSHDSwitch
- function onClicked() {
- vDevice.rootSSHAccess = toCheckState()
- }
- }
- Connections { target: _settingsRootSSHAccess_RootSwitch
- function onClicked() {
- vDevice.rootSSHAccess = toCheckState()
- }
- }
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
Index: sources/gui/qml/pages/settings/SettingsStack.qml
===================================================================
diff -u -r6bff7fae4c7b28a493b5824598c669fa8ab920b3 -r01a8c935f7d90ce3b168970765c0f20ea0c1a273
--- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 6bff7fae4c7b28a493b5824598c669fa8ab920b3)
+++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273)
@@ -69,7 +69,7 @@
readonly property bool visibleDeviceConfiguration : onlyManufacturing && loggedIn
readonly property bool visibleDeviceRegistration : onlyManufacturing && loggedIn
readonly property bool visibleInstitutionalRecord : true
- readonly property bool visibleLocalization : true // loggedIn TODO:
+ readonly property bool visibleLocalization : loggedIn
readonly property string settingsTitle : _GuiView.manufactSetup ? qsTr("Manufacturing Setup") : _GuiView.updateSetup
? qsTr("Software Update") : qsTr("Device Settings")
@@ -95,7 +95,7 @@
InstitutionalRecord
}
property var itemsText : [
- qsTr("Information" ), // Information
+ qsTr("Device Information" ), // Device Information
qsTr("Volume And Brightness" ), // VolumeBrightness
qsTr("Wi-Fi" ), // WiFi
qsTr("DG Cleaning" ), // DGCleaning
@@ -114,26 +114,7 @@
qsTr("Decommissioning" ), // Decommission
qsTr("Institutional Configurations" ), // Institutional Configurations
]
- property var itemsEnabled : [
- true , // Information
- true , // VolumeBrightness
- true , // WiFi
- true , // DGCleaning
- true , // DGScheduling
- true , // ServicePassword
- true , // SetDateTime
- true , // ExportLogs
- true , // Localization
- true , // RoInput
- true , // Calibration
- true , // Device Configuration
- true , // DeviceRegistration
- true , // SWUpdate
- true , // RootSSHAccess
- true , // FactoryReset
- true , // Decommission
- true , // Institutional Record
- ]
+
property var itemsVisible : [
visibleInformation , // Information
visibleVolumeBrightness , // VolumeBrightness
@@ -174,7 +155,6 @@
}
}
itemsText : _root.itemsText
- itemsEnabled : _root.itemsEnabled
itemsVisible : _root.itemsVisible
onItemClicked : {
vDevice.status = ""