Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r26433c42f2efa2cb18af95f523581c7eeeff049d -re1cbc3d1ccf5877a8dfed934e33964aaadbf5b39 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 26433c42f2efa2cb18af95f523581c7eeeff049d) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision e1cbc3d1ccf5877a8dfed934e33964aaadbf5b39) @@ -39,10 +39,11 @@ property bool serviceMode : false - readonly property bool normalMode : ! ( _GuiView.manufactSetup || _GuiView.updateSetup ) - readonly property bool setupMode : _GuiView.manufactSetup || _GuiView.updateSetup - readonly property bool onlyManufacturing : _GuiView.manufactMode && ! _GuiView.updateMode // <...>Mode is true if the POST passes - readonly property bool onlyUpdating : ! _GuiView.manufactMode && _GuiView.updateMode // <...>Mode is true if the POST passes + readonly property bool normalMode : ! ( _GuiView.manufactSetup || _GuiView.updateSetup || _GuiView.registerSetup ) + readonly property bool setupMode : _GuiView.manufactSetup || _GuiView.updateSetup || _GuiView.registerSetup + readonly property bool onlyManufacturing : _GuiView.manufactMode && ! _GuiView.updateMode || ! _GuiView.registerMode // <...>Mode is true if the POST passes + readonly property bool onlyUpdating : ! _GuiView.manufactMode && _GuiView.updateMode || ! _GuiView.registerMode // <...>Mode is true if the POST passes + readonly property bool onlyRegistration : ! _GuiView.manufactMode && ! _GuiView.updateMode || _GuiView.registerMode // <...>Mode is true if the POST passes readonly property bool loggedIn : serviceMode @@ -69,7 +70,7 @@ readonly property bool visibleDecommission : loggedIn readonly property bool visibleSetDateTime : loggedIn || onlyUpdating readonly property bool visibleDeviceConfiguration : onlyManufacturing && loggedIn - readonly property bool visibleDeviceRegistration : onlyManufacturing && loggedIn + readonly property bool visibleDeviceRegistration : onlyManufacturing && loggedIn || onlyRegistration readonly property bool visibleInstitutionalRecord : true @@ -159,15 +160,23 @@ ] SettingsHome { id : _settingsHome - title : _GuiView.manufactSetup ? qsTr("Manufacturing Setup") : serviceMode ? qsTr("Service") : _GuiView.updateSetup ? qsTr("Software Update") : qsTr("Device Settings") + title : _GuiView.manufactSetup + ? qsTr("Manufacturing Setup") + : serviceMode + ? qsTr("Service") + : _GuiView.updateSetup + ? qsTr("Software Update") + : _GuiView.registerSetup + ? qsTr("Device Registration ") + : qsTr("Device Settings") backVisible : false //TODO on graceful shutdown, the applicaiton quit shall be used for any applicaiton termination // and needs to be distinguished between the QUIT or SHUTDOWN touch, // to know whether to run the lockdown scropt or just quit the app. - confirmVisible : serviceMode || _GuiView.updateMode - confirmText.text: _GuiView.manufactMode || _GuiView.updateMode ? qsTr("COMPLETE") : qsTr("SHUTDOWN") + confirmVisible : serviceMode || _GuiView.updateMode || _GuiView.registerMode + confirmText.text: _GuiView.manufactMode || _GuiView.updateMode || _GuiView.registerMode ? qsTr("COMPLETE") : qsTr("SHUTDOWN") onConfirmClicked: { - if ( _GuiView.manufactSetup || _GuiView.updateSetup ) { + if ( _GuiView.manufactSetup || _GuiView.updateSetup || _GuiView.registerSetup ) { _GuiView.doQuitApplication() } else { @@ -280,7 +289,7 @@ SettingsInstitutionalRecord { id: _settingsInstitutionalRecord } function gotoServiceMode( vservice ) { - //DEBUG console.log (" 0 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, vservice, stackView.initialItem, stackView.currentItem, stackView.depth) + //DEBUG console.log (" 0 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, _GuiView.registerMode, _GuiView.registerSetup, vservice, stackView.initialItem, stackView.currentItem, stackView.depth) if ( ! _servicePassword.isPassword_Accepted ) return serviceMode = vservice if ( vservice ) @@ -328,7 +337,7 @@ } push(stackView.initialItem) - //DEBUG console.log (" 1 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, vPass, stackView.initialItem, stackView.currentItem, stackView.depth) + //DEBUG console.log (" 1 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, _GuiView.registerSetup, vPass, stackView.initialItem, stackView.currentItem, stackView.depth) if ( _GuiView.manufactSetup ) { _settingsHome.notificationText = vPass ? "" : qsTr("Application POST Failed, please shutdown and retry") } @@ -344,6 +353,17 @@ _settingsHome.notificationText = vPass ? "" : qsTr("Application POST Failed, please shutdown and retry") } } + function onRegisterModeChanged( vPass ) { + if ( _GuiView.registerMode ) { + stackView.initialItem = _settingsHome + } + push(stackView.initialItem) + + //DEBUG console.log (" 1 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, vPass, stackView.initialItem, stackView.currentItem, stackView.depth) + if ( _GuiView.registerSetup ) { + _settingsHome.notificationText = vPass ? "" : qsTr("Application POST Failed, please shutdown and retry") + } + } } onVisibleChanged: {