Index: denali.qrc
===================================================================
diff -u -rb7928a4d8056d00c11bf36b29ade9afb0840134a -r559dc64d12cf7647ec8c29ccbf4ca90f90e5e3a2
--- denali.qrc (.../denali.qrc) (revision b7928a4d8056d00c11bf36b29ade9afb0840134a)
+++ denali.qrc (.../denali.qrc) (revision 559dc64d12cf7647ec8c29ccbf4ca90f90e5e3a2)
@@ -16,6 +16,7 @@
sources/gui/qml/pages/settings/SettingsVolumeBrightness.qml
sources/gui/qml/pages/settings/SettingsBluetoothCuff.qml
sources/gui/qml/pages/settings/SettingsExportLogs.qml
+ sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml
sources/gui/qml/dialogs/PowerOff.qml
Index: sources/gui/qml/components/TextEntry.qml
===================================================================
diff -u -rd949be21f2a9badd0978dddaaf436f6805de28dc -r559dc64d12cf7647ec8c29ccbf4ca90f90e5e3a2
--- sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision d949be21f2a9badd0978dddaaf436f6805de28dc)
+++ sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 559dc64d12cf7647ec8c29ccbf4ca90f90e5e3a2)
@@ -30,6 +30,7 @@
property alias textInput : _input
property alias line : _line
property alias label : _label
+ property alias separator : _separator
property alias validator : _input.validator
property var nextInput : undefined
property alias text : _input.text
@@ -68,6 +69,18 @@
font.pixelSize : Fonts.fontPixelTextRectExtra
}
+ Text { id : _separator
+ visible : text
+ width : 0
+ text : ""
+ height : parent.height
+ anchors.left : _label.right
+ anchors.top : parent.top
+ color : Colors.textMain
+ font.pixelSize : Fonts.fontPixelTextRectExtra
+ horizontalAlignment: Text.AlignLeft
+ }
+
TextInput { id : _input
enabled : hasCursor
height : parent.height
@@ -77,7 +90,7 @@
color : acceptableInput ? Colors.textMain : Colors.red
selectionColor : Colors.borderButtonHalfDarker
selectedTextColor : acceptableInput ? Colors.textMain : Colors.red
- anchors.left : _label.right
+ anchors.left : _separator.right
horizontalAlignment : TextInput.AlignHCenter
inputMethodHints : Qt.ImhDigitsOnly
selectByMouse : true
Index: sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml
===================================================================
diff -u
--- sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml (revision 0)
+++ sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml (revision 559dc64d12cf7647ec8c29ccbf4ca90f90e5e3a2)
@@ -0,0 +1,145 @@
+/*!
+ *
+ * Copyright (c) 2021-2023 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 SettingsWiFi.qml
+ * \author (last) Behrouz NematiPour
+ * \date (last) 02-Apr-2023
+ * \author (original) Behrouz NematiPour
+ * \date (original) 06-May-2021
+ *
+ */
+
+// Qt
+import QtQuick 2.12
+
+// Project
+import Gui.Actions 0.1
+
+// Qml imports
+import "qrc:/globals"
+import "qrc:/components"
+import "qrc:/compounds"
+import "qrc:/pages"
+
+/*!
+ * \brief SettingsWiFi
+ * The settings screen to setup the WiFi connection
+ */
+SettingsBase { id: _root
+ itemIndex : SettingsStack.DeviceRegistration
+ confirmVisible : false
+
+ labelWidth : 150
+ entryWidth : 350
+
+ readonly property int spacing : 20
+ readonly property int leftMargin : 100
+ readonly property int rightMargin : 150
+ readonly property int topMargin : topMarginContent
+ readonly property int separatorGap : 40
+ readonly property string separatorText : ":"
+
+ property var ipValidator: RegExpValidator {
+ regExp:/^(([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))$/
+ }
+
+ Column { id : _column
+ spacing : _root.spacing
+ y : _root.topMargin
+ anchors.left : parent.left
+ anchors.leftMargin : _root.leftMargin
+
+ TextEntry { id : _version_UI
+ textInput.clip : true
+ hasCursor : false
+ textInput.text : Qt .application.version
+ textInput.horizontalAlignment: Text.AlignLeft
+ label.text : qsTr("UI Version")
+ separator.text : _root.separatorText
+ separator.width : _root.separatorGap
+ textInput.width : _root.entryWidth
+ label.width : _root.labelWidth
+ }
+
+ TextEntry { id : _serial_HD
+ textInput.clip : true
+ hasCursor : false
+ textInput.text : vAdjustmentVersions .hdSerial
+ textInput.horizontalAlignment: Text.AlignLeft
+ label.text : qsTr("HD Serial")
+ separator.text : _root.separatorText
+ separator.width : _root.separatorGap
+ textInput.width : _root.entryWidth
+ label.width : _root.labelWidth
+ }
+
+ TextEntry { id : _serial_DG
+ textInput.clip : true
+ hasCursor : false
+ textInput.text : vAdjustmentVersions .dgSerial
+ textInput.horizontalAlignment: Text.AlignLeft
+ label.text : qsTr("DG Serial")
+ separator.text : _root.separatorText
+ separator.width : _root.separatorGap
+ textInput.width : _root.entryWidth
+ label.width : _root.labelWidth
+ }
+
+ TextEntry { id : _ipAddress_wlan0
+ textInput.clip : true
+ hasCursor : false
+ textInput.text : vNetwork.wirelessIP
+ textInput.horizontalAlignment: Text.AlignLeft
+ label.text : qsTr("Wireless")
+ separator.text : _root.separatorText
+ separator.width : _root.separatorGap
+ textInput.width : _root.entryWidth
+ label.width : _root.labelWidth
+ validator : _root.ipValidator
+ }
+
+ TextEntry { id : _ipAddress_eth0
+ textInput.clip : true
+ hasCursor : false
+ textInput.text : vNetwork.ethernetIP
+ textInput.horizontalAlignment: Text.AlignLeft
+ label.text : qsTr("Ethernet")
+ separator.text : _root.separatorText
+ separator.width : _root.separatorGap
+ textInput.width : _root.entryWidth
+ label.width : _root.labelWidth
+ validator : _root.ipValidator
+ }
+ }
+
+ CheckListView { id: _checkListView
+ y : _root.topMargin
+ anchors.right : parent.right
+ anchors.rightMargin : _root.rightMargin
+
+ completeVisible : true
+ completeText : qsTr("Registration complete")
+ stepNames : [
+ qsTr("Cloud Service is running" ),
+ qsTr("Registering the device" )
+ ]
+ }
+ TouchRect { id : _scanButton
+ anchors.bottom : parent.bottom
+ anchors.bottomMargin : Variables.mainMenuHeight * 2 + Variables.minVGap * 2
+ anchors.horizontalCenter: parent.horizontalCenter
+ text.text : qsTr("START")
+ width : 350
+ isDefault : true
+ enabled : true // ! device device registered
+ onClicked : {
+ vAdjustmentVersions .doAdjustment()
+ } // start device registration
+ }
+
+ notificationText: ""
+}
Index: sources/gui/qml/pages/settings/SettingsStack.qml
===================================================================
diff -u -rd949be21f2a9badd0978dddaaf436f6805de28dc -r559dc64d12cf7647ec8c29ccbf4ca90f90e5e3a2
--- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision d949be21f2a9badd0978dddaaf436f6805de28dc)
+++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 559dc64d12cf7647ec8c29ccbf4ca90f90e5e3a2)
@@ -41,18 +41,19 @@
property bool serviceMode : false
enum ItemsIndex {
- Information ,
- VolumeBrightness,
- WiFi ,
- Bluetooth ,
- DGSettings ,
- Services ,
- SetDateTime ,
- ExportLogs ,
- RoInput ,
- Language ,
- Calibration ,
- SWUpdate ,
+ Information ,
+ VolumeBrightness ,
+ WiFi ,
+ Bluetooth ,
+ DGSettings ,
+ Services ,
+ SetDateTime ,
+ ExportLogs ,
+ RoInput ,
+ Language ,
+ Calibration ,
+ DeviceRegistration ,
+ SWUpdate ,
FactoryReset
}
property var itemsText : [
@@ -67,6 +68,7 @@
qsTr("Water Input Mode" ), // RoInput
qsTr("Set Language" ), // Language
qsTr("Calibration " ), // Calibration
+ qsTr("Device Registeration" ), // DeviceRegistration
qsTr("Software Update" ), // SWUpdate
qsTr("Factory Reset" ), // FactoryReset
]
@@ -82,6 +84,7 @@
true , // RoInput
false , // Language
false , // Calibration
+ true , // DeviceRegistration
false , // SWUpdate
false , // FactoryReset
]
@@ -97,6 +100,7 @@
true , // RoInput
false /* serviceMode phase 1 */ , // Language
false /* serviceMode phase 1 */ , // Calibration
+ true /* serviceMode */ , // DeviceRegistration // FIXME: On the normal setting menu for now for development.
false /* serviceMode phase 1 */ , // SWUpdate
false /* serviceMode phase 1 */ , // FactoryReset
]
@@ -154,6 +158,10 @@
push( _settingsRoInput )
break
+ case SettingsStack.DeviceRegistration:
+ push( _settingsDeviceRegistration )
+ break
+
default:
console.debug("Unknown Index", vIndex)
break
@@ -323,6 +331,8 @@
}
}
+ SettingsDeviceRegistration { id: _settingsDeviceRegistration }
+
UserConfirmation { id: _servicePassword
property bool isPassword_Accepted : false
property bool isDefaultPasswordSet : (vSettings.servicePass != "")