Index: leahi.qrc =================================================================== diff -u -rc4a72b20ccc74172b5c5cc6f440f53dc5693908f -r2fc811482a7453b22c2a1d650b06e83869f35670 --- leahi.qrc (.../leahi.qrc) (revision c4a72b20ccc74172b5c5cc6f440f53dc5693908f) +++ leahi.qrc (.../leahi.qrc) (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -31,7 +31,12 @@ sources/gui/qml/pages/settings/SettingsFeatureConfigurations.qml sources/gui/qml/pages/settings/SettingsAdvancedInstitutional.qml sources/gui/qml/pages/settings/SettingsCalibrationSettings.qml + sources/gui/qml/pages/settings/SettingsServiceModeStack.qml + + sources/gui/qml/pages/settings/servicemode/ServiceModeHydraulics.qml + sources/gui/qml/pages/settings/servicemode/ServiceModeMainMenu.qml + sources/gui/qml/dialogs/ConfirmDialog.qml sources/gui/qml/dialogs/AutoHideInfo.qml Index: sources/gui/qml/compounds/AutoStepController.qml =================================================================== diff -u -r8f6ecb60abf6d47d4554cfd3019ca496d79b6f69 -r2fc811482a7453b22c2a1d650b06e83869f35670 --- sources/gui/qml/compounds/AutoStepController.qml (.../AutoStepController.qml) (revision 8f6ecb60abf6d47d4554cfd3019ca496d79b6f69) +++ sources/gui/qml/compounds/AutoStepController.qml (.../AutoStepController.qml) (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -5,7 +5,7 @@ Item { id: _root property int interval : 5000 - property bool isPlaying : true + property bool isPlaying : false property string color : _colorMode.modeAutoStepColor height : 35 Index: sources/gui/qml/compounds/InstructionView.qml =================================================================== diff -u -r8f6ecb60abf6d47d4554cfd3019ca496d79b6f69 -r2fc811482a7453b22c2a1d650b06e83869f35670 --- sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision 8f6ecb60abf6d47d4554cfd3019ca496d79b6f69) +++ sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -27,22 +27,22 @@ property var stepNames : [] property var stepImages : [] property int currentIndex : 0 + property bool showAutoStep : true + property bool darkModeOnly : false - color : _colorMode.modeBackgroundColor + color : _root.darkModeOnly ? Colors.transparent : _colorMode.modeBackgroundColor radius : Variables.alarmDialogRadius clip : true - onVisibleChanged: if (visible) { _autoStepController.isPlaying = true } - Text { id: _title anchors { left : parent.left leftMargin : Variables.defaultMargin * 3 // with current resolution this makes the screen look nice top : parent.top - topMargin : Variables.defaultMargin * 2 // with current resolution this makes the screen look nice + topMargin : _root.showAutoStep ? Variables.defaultMargin * 2 : 0 // with current resolution this makes the screen look nice } text : _root.title - color : _colorMode.modeTextColor + color : _root.darkModeOnly ? Colors.offWhite : _colorMode.modeTextColor font.pixelSize : Fonts.fontPixelInstructionTitle font.weight : Font.Medium } @@ -61,15 +61,16 @@ top : parent.top topMargin : Variables.defaultMargin * 2 } - width : parent.width / 2 + width : parent.width / 2 + visible : _root.showAutoStep onTriggered : _root.currentIndex = (_root.currentIndex + 1) % _instrutionSteps.count } Column { id: _contentColumn anchors { - top : _autoStepController.bottom - topMargin : Variables.defaultMargin * 2.5 + top : _root.showAutoStep ? _autoStepController.bottom : parent.top + topMargin : _root.showAutoStep ? Variables.defaultMargin * 2.5 : Variables.defaultMargin } spacing : 5 @@ -89,16 +90,17 @@ height : 50 width : height radius : height - color : index === _root.currentIndex ? _colorMode.modeButtonColor : _colorMode.modeBackgroundColor + color : index === _root.currentIndex ? _root.darkModeOnly ? Colors.borderButton : + _colorMode.modeButtonColor : Colors.transparent border { - color: _colorMode.modeButtonColor + color: _root.darkModeOnly ? Colors.borderButton : _colorMode.modeButtonColor width: 2 } Text { id: _stepNumberRect anchors.centerIn: parent text : index + 1 - color : vSettings.darkMode ? Colors.offWhite : index === _root.currentIndex ? _colorMode.modeBackgroundColor : _colorMode.modeButtonColor + color : vSettings.darkMode || _root.darkModeOnly ? Colors.offWhite : index === _root.currentIndex ? _colorMode.modeBackgroundColor : _colorMode.modeButtonColor font.pixelSize : 28 font.weight : Font.Medium } @@ -113,7 +115,8 @@ } text : _root.stepNames.length ? _root.stepNames[index] : "" font.weight : index === _root.currentIndex ? Font.Medium : Font.Normal - color : index === _root.currentIndex ? _colorMode.modeSelctedColor : _colorMode.modeTextColor + color : index === _root.currentIndex ? _root.darkModeOnly ? Colors.darkModeSelect : _colorMode.modeSelctedColor : + _root.darkModeOnly ? Colors.offWhite : _colorMode.modeTextColor wrapMode : Text.WordWrap font.pixelSize : Fonts.fontPixelInstructionStep } Index: sources/gui/qml/pages/settings/SettingsBase.qml =================================================================== diff -u -r320972a712c31e94413056591634859b4b3d564e -r2fc811482a7453b22c2a1d650b06e83869f35670 --- sources/gui/qml/pages/settings/SettingsBase.qml (.../SettingsBase.qml) (revision 320972a712c31e94413056591634859b4b3d564e) +++ sources/gui/qml/pages/settings/SettingsBase.qml (.../SettingsBase.qml) (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -47,7 +47,7 @@ property alias confirmEnabled : _confirmButton.enabled property alias confirmText : _confirmButton.text - headerTitle : itemsText[itemIndex] + headerTitle : itemsText[itemIndex] ?? "" signal backClicked() signal confirmClicked() Index: sources/gui/qml/pages/settings/SettingsHome.qml =================================================================== diff -u -re49c956894f999f6539b0c404dd1c9b18a76bb4b -r2fc811482a7453b22c2a1d650b06e83869f35670 --- sources/gui/qml/pages/settings/SettingsHome.qml (.../SettingsHome.qml) (revision e49c956894f999f6539b0c404dd1c9b18a76bb4b) +++ sources/gui/qml/pages/settings/SettingsHome.qml (.../SettingsHome.qml) (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -27,6 +27,7 @@ */ SettingsBase { id: _root objectName: "_SettingsHome" + itemIndex : SettingsStack.Home property alias itemsText : _settingItems.itemsText property alias itemsVisible : _settingItems.itemsVisible Index: sources/gui/qml/pages/settings/SettingsServiceModeStack.qml =================================================================== diff -u --- sources/gui/qml/pages/settings/SettingsServiceModeStack.qml (revision 0) +++ sources/gui/qml/pages/settings/SettingsServiceModeStack.qml (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -0,0 +1,28 @@ +// Qt +import QtQuick 2.15 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/settings/servicemode" + +StackItem { id : _root + stackView.initialItem : _serviceModeMainMenu + + signal backClicked() + + ServiceModeMainMenu { id: _serviceModeMainMenu + onBackClicked: _root.backClicked() + } + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = true + _headerBar.activeStack = stackView + } + else { + stackView.initialItem = null + } + } +} + Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r9b81b18319ff46f1e48d5637a6a8938d2f7735c9 -r2fc811482a7453b22c2a1d650b06e83869f35670 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 9b81b18319ff46f1e48d5637a6a8938d2f7735c9) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -75,6 +75,7 @@ readonly property bool visibleLocalization : loggedIn readonly property bool visibleAdvancedModes : loggedIn readonly property bool visibleCalibrationSettings : loggedIn + readonly property bool visibleServiceMode : true// loggedIn readonly property string settingsTitle : _GuiView.manufactSetup ? qsTr("Manufacturing Setup") : _GuiView.updateSetup ? qsTr("Software Update") : qsTr("Device Settings") @@ -102,8 +103,10 @@ FeatureConfigurations , AdvancedMode , CalibrationSettings , + ServiceMode , Home } + property var itemsText : [ qsTr("Device Information" ), // Device Information qsTr("Display and Volume" ), // VolumeBrightness @@ -127,6 +130,7 @@ qsTr("Feature Configurations" ), // FeatureConfigurations qsTr("Advanced Mode" ), // Advanced Modes qsTr("Calibration Settings" ), // Calibration Settings + qsTr("Service Mode Calibrations" ), // Service Mode Calibrations settingsTitle , // settings home ] @@ -153,14 +157,14 @@ visibleFeatureConfigurations , // FeatureConfigurations visibleAdvancedModes , // Advanced Modes visibleCalibrationSettings , // Calibration Settings + visibleServiceMode , // Service Mode false , // leave last and false align with settings home ] // TODO: SRS 405/406 Test Mode instead add Q_PROPERTY to monitor state??? onServiceModeChanged: _headerBar.userMode = serviceMode ? "Service" : "" SettingsHome { id : _settingsHome - itemIndex : SettingsStack.Home 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, @@ -268,33 +272,43 @@ push( _settingCalibrationSettings ) break + case SettingsStack.ServiceMode: + push(_settingServiceMode) + break + default: console.debug("Unknown Index", vIndex) break } } } - SettingsInformation { id: _settingsInformation } - SettingsVolumeBrightness { id: _settingsVolumeBrightness } - SettingsWiFi { id: _settingsWiFi } - SettingsDGCleaning { id: _settingsDGCleaning } - SettingsDGScheduling { id: _settingsDGScheduling } - SettingsServicePassword { id: _servicePassword } - SettingsDateTime { id: _settingsDateTime } - SettingsExportLogs { id: _settingsExportLogs } - SettingsROInput { id: _settingsRoInput } - SettingsManufacturingSetup { id: _settingsDeviceConfiguration } - SettingsDeviceRegistration { id: _settingsDeviceRegistration } - SettingsRootSSHAccess { id: _SettingsRootSSHAccess } - SettingsFactoryReset { id: _serviceFactoryReset } - SettingsDecommission { id: _serviceDecommission } - SettingsInstitutionalRecord { id: _settingsInstitutionalRecord } - SettingsAdvancedInstitutional { id: _settingsAdvancedInstitutional} - SettingsLocalization { id: _settingLocalization } - SettingsFeatureConfigurations { id: _settingsFeatureConfigurations} - SettingsAdvancedMode { id: _settingAdvancedMode } - SettingsCalibrationSettings { id: _settingCalibrationSettings } + SettingsInformation { id: _settingsInformation } + SettingsVolumeBrightness { id: _settingsVolumeBrightness } + SettingsWiFi { id: _settingsWiFi } + SettingsDGCleaning { id: _settingsDGCleaning } + SettingsDGScheduling { id: _settingsDGScheduling } + SettingsServicePassword { id: _servicePassword } + SettingsDateTime { id: _settingsDateTime } + SettingsExportLogs { id: _settingsExportLogs } + SettingsROInput { id: _settingsRoInput } + SettingsManufacturingSetup { id: _settingsDeviceConfiguration } + SettingsDeviceRegistration { id: _settingsDeviceRegistration } + SettingsRootSSHAccess { id: _SettingsRootSSHAccess } + SettingsFactoryReset { id: _serviceFactoryReset } + SettingsDecommission { id: _serviceDecommission } + SettingsInstitutionalRecord { id: _settingsInstitutionalRecord } + SettingsAdvancedInstitutional { id: _settingsAdvancedInstitutional } + SettingsLocalization { id: _settingLocalization } + SettingsFeatureConfigurations { id: _settingsFeatureConfigurations } + SettingsAdvancedMode { id: _settingAdvancedMode } + SettingsCalibrationSettings { id: _settingCalibrationSettings } + SettingsServiceModeStack { id: _settingServiceMode; + onBackClicked: { + _root.pop() + _headerBar.activeStack = _root.stackView + } + } function gotoServiceMode( vservice ) { //DEBUG console.log (" 0 ---------- ", _GuiView.manufactMode, _GuiView.manufactSetup, vservice, stackView.initialItem, stackView.currentItem, stackView.depth) Index: sources/gui/qml/pages/settings/servicemode/ServiceModeHydraulics.qml =================================================================== diff -u --- sources/gui/qml/pages/settings/servicemode/ServiceModeHydraulics.qml (revision 0) +++ sources/gui/qml/pages/settings/servicemode/ServiceModeHydraulics.qml (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -0,0 +1,130 @@ +// Qt +import QtQuick 2.12 + +// Qml imports +import "qrc:/globals" +import "qrc:/compounds" +import "qrc:/components" +import "qrc:/pages/settings" + + +SettingsBase { id: _root + itemIndex : ServiceModeMainMenu.CalibrateHydraulics + confirmVisible : false + property int currentIndex : ServiceModeHydraulics.DeaerationPressure + property string instructionTitle : "" + property var instructionStepNames : [] + property var instructionStepImages : [] + + property var options : [ + qsTr("Deaeration Pressure" ), + qsTr("Flow Pressure" ), + qsTr("Balance Chamber" ), + qsTr("Acid Pump Volume" ), + qsTr("Bic Pump Volume" ), + qsTr("UF Pump Volume" ), + ] + + enum OptionsIndex { + DeaerationPressure , + FlowPressure , + BalanceChamber , + AcidPumpVolume , + BicPumpVolume , + UFPumpVolume + } + + onCurrentIndexChanged: updateModel () +// onCurrentIndexChanged: { +// switch (currentIndex) { +// case ServiceModeHydraulics.DeaerationPressure : +// print("Deaeration Pressure") +// break + +// case ServiceModeHydraulics.FlowPressure : +// print("Flow Pressure") +// break + +// case ServiceModeHydraulics.BalanceChamber : +// print("Balance Chamber") +// break + +// case ServiceModeHydraulics.AcidPumpVolume : +// print("Acid Pump Volume") +// break + +// case ServiceModeHydraulics.BicPumpVolume : +// print("Bic Pump Volume") +// break + +// case ServiceModeHydraulics.UFPumpVolume : +// print("UF Pump Volume") +// break +// } +// } + + function updateModel () { + let stepName = _root.options[_root.currentIndex] ?? "" + let group = vSettings.groupFormat(stepName) + let instructionsGroup = vSettings.instructions[group] + + if ( ! instructionsGroup ) { return } + + instructionTitle = instructionsGroup.title + instructionStepNames = instructionsGroup.keys + instructionStepImages = instructionsGroup.values + } + + contentItem: Row { id: _row + anchors.fill : parent + anchors.topMargin : Variables.defaultMargin + spacing : Variables.defaultMargin * 2 + + Column { id: _optionsColumn + width : _row.width * 0.2 + height : _row.height + spacing : Variables.defaultMargin + + Repeater { id: _repeater + + model : _root.options + + delegate : Rectangle { id: _delegate + color : Colors.panelBackgroundColor + width : _optionsColumn.width + height : Variables.adjustmentLabelUnitContainerHeight + radius : Variables.touchRectRadius + + border { + width : 2 + color : _root.currentIndex === index ? Colors.backgroundButtonSelect : + Colors.panelBorderColor + } + + Text { + text : modelData + anchors.centerIn: parent + color : Colors.offWhite + font.pixelSize : Fonts.fontPixelDefaultButton + font.weight : Font.Medium + } + + MouseArea { + anchors.fill: parent + onClicked : _root.currentIndex = index + } + } + } + } + + InstructionView { id: _instructionView + title : "test" //_root.instructionTitle + stepNames : _root.options//_root.instructionStepNames +// stepImages : _root.instructionStepImages + width : _row.width * 0.8 - _row.spacing + height : _row.height + showAutoStep : false + darkModeOnly : true + } + } +} Index: sources/gui/qml/pages/settings/servicemode/ServiceModeMainMenu.qml =================================================================== diff -u --- sources/gui/qml/pages/settings/servicemode/ServiceModeMainMenu.qml (revision 0) +++ sources/gui/qml/pages/settings/servicemode/ServiceModeMainMenu.qml (revision 2fc811482a7453b22c2a1d650b06e83869f35670) @@ -0,0 +1,99 @@ +// Qt +import QtQuick 2.15 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" +import "qrc:/pages/settings" +import "qrc:/pages/settings/servicemode" + +SettingsBase { id: _root + + readonly property int delegateWidth : parent.width / 2.5 + readonly property int delegateHeight: 80 + + property var itemsText : [ + qsTr("Calibrate Hydraulics" ), + qsTr("Calibrate Sensors" ), + qsTr("Maintenance" ), + qsTr("Test BP Module" ), + qsTr("Flush Filters" ), + qsTr("Options" ), + qsTr("Service Mode Calibrations" ), + ] + + enum ItemsIndex { + CalibrateHydraulics , + CalibrateSensors , + Maintenance , + TestBPModule , + FlushFilters , + Options , + Home + } + + property var itemsVisible : [ + true , // CalibrateHydraulics + true , // CalibrateSensors + true , // Maintenance + true , // TestBPModule + true , // FlushFilters + true , // Options + false , // leave last and false align with settings home + ] + + confirmVisible : false + backVisible : true + itemIndex : ServiceModeMainMenu.Home + + contentArea.anchors.topMargin: Variables.defaultMargin * -2 + + ServiceModeHydraulics { id: _serviceModeHydraulics } + + contentItem: TouchGrid { id: _serviceModeItems + itemsText : _root.itemsText + colCount : 2 + rowCount : 3 + itemWidth : _root.delegateWidth + itemHeight : _root.delegateHeight + itemsVisible : _root.itemsVisible + + 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 + + onItemClicked :{ + switch (vIndex) { + case ServiceModeMainMenu.CalibrateHydraulics : + push(_serviceModeHydraulics) + break + + case ServiceModeMainMenu.CalibrateSensors : + print("Calibrate Sensors") + break + + case ServiceModeMainMenu.Maintenance : + print("Maintenance") + break + + case ServiceModeMainMenu.TestBPModule : + print("Test BP Module") + break + + case ServiceModeMainMenu.FlushFilters : + print("Flush Filters") + break + + case ServiceModeMainMenu.Options : + print("Options") + break + } + } + } +}