Index: sources/gui/qml/pages/settings/servicemode/ServiceModeHydraulics.qml =================================================================== diff -u -r2fc811482a7453b22c2a1d650b06e83869f35670 -r3082da7333694567052cdf407765e0e409328a5b --- sources/gui/qml/pages/settings/servicemode/ServiceModeHydraulics.qml (.../ServiceModeHydraulics.qml) (revision 2fc811482a7453b22c2a1d650b06e83869f35670) +++ sources/gui/qml/pages/settings/servicemode/ServiceModeHydraulics.qml (.../ServiceModeHydraulics.qml) (revision 3082da7333694567052cdf407765e0e409328a5b) @@ -16,6 +16,8 @@ property var instructionStepNames : [] property var instructionStepImages : [] + property bool deaerationInProgress : false + property var options : [ qsTr("Deaeration Pressure" ), qsTr("Flow Pressure" ), @@ -34,35 +36,9 @@ UFPumpVolume } - onCurrentIndexChanged: updateModel () -// onCurrentIndexChanged: { -// switch (currentIndex) { -// case ServiceModeHydraulics.DeaerationPressure : -// print("Deaeration Pressure") -// break + onVisibleChanged : if ( visible) updateModel () + onCurrentIndexChanged : updateModel () -// 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) @@ -77,13 +53,15 @@ contentItem: Row { id: _row anchors.fill : parent - anchors.topMargin : Variables.defaultMargin - spacing : Variables.defaultMargin * 2 + anchors.topMargin : Variables.defaultMargin * -4 + anchors.bottomMargin: Variables.defaultMargin * 5 + spacing : Variables.defaultMargin Column { id: _optionsColumn - width : _row.width * 0.2 - height : _row.height - spacing : Variables.defaultMargin + width : _row.width * 0.2 + height : _row.height + spacing : Variables.defaultMargin + topPadding: Variables.defaultMargin * 4 Repeater { id: _repeater @@ -118,13 +96,144 @@ } InstructionView { id: _instructionView - title : "test" //_root.instructionTitle - stepNames : _root.options//_root.instructionStepNames -// stepImages : _root.instructionStepImages + title : _root.instructionTitle + stepNames : _root.instructionStepNames + stepImages : _root.instructionStepImages width : _row.width * 0.8 - _row.spacing height : _row.height showAutoStep : false darkModeOnly : true } } + + Row { id: _dataRow + anchors { + bottom : _adjustPumpRate.top + bottomMargin : Variables.defaultMargin * 4 + horizontalCenter: parent.horizontalCenter + } + spacing : Variables.defaultMargin + visible : _root.currentIndex === ServiceModeHydraulics.DeaerationPressure + + LabelUnitText { id: _d9Pressure + width : _root.width / 6 + height : Variables.createRxLabelUnitContainerHeight + label : qsTr("D9 Pressure") + unit : Variables.unitPressure + value : vDDPressures.d9Pressure.toFixed(Variables.psiPrecision) + valueColor : Colors.offWhite + color : Colors.calibrationData + border.width: 0 + } + + LabelUnitText { id: _d18Pressure + width : _root.width / 6 + height : Variables.createRxLabelUnitContainerHeight + label : qsTr("D18 Pressure") + unit : Variables.unitPressure + value : vDDPressures.d18Pressure.toFixed(Variables.psiPrecision) + valueColor : Colors.offWhite + color : Colors.calibrationData + border.width: 0 + } + + LabelUnitText { id: _d4Temp + width : _root.width / 6 + height : Variables.createRxLabelUnitContainerHeight + label : qsTr("D4 Temperature") + unit : Variables.unitPressure + value : vDDTemperatures.d4Temperature.toFixed(Variables.psiPrecision) + valueColor : Colors.offWhite + color : Colors.calibrationData + border.width: 0 + } + } + + LabelUnitContainer { id: _adjustPumpRate + anchors { + bottom : _buttonRow.top + bottomMargin : Variables.settingsContentBottomMargin + horizontalCenter: parent.horizontalCenter + } + text : qsTr("Current Pump Rate") + unitText : qsTr("D-to-A") + showEdit : true + width : _root.width / 3 + visible : _root.currentIndex === ServiceModeHydraulics.DeaerationPressure + + + contentItem : TextEntry { id: _pretreatmentPatientIDEntry + clip : true + textInput.width : parent.width - Variables.defaultMargin * 4 + text : vTreatmentCreate.patientID + anchors.centerIn : parent + textInput.maximumLength : 20 // LEAHI-PRS-236 + textInput.rightPadding : Variables.defaultMargin + textInput.leftPadding : Variables.defaultMargin * 14 + textInput.inputMethodHints : Qt.ImhPreferLowercase + textInput.echoMode : TextInput.Normal + textInput.validator : RegExpValidator { regExp: Variables.regExp_PatientID } + line.visible : false + textInput.onTextChanged : vTreatmentCreate.patientID = textInput.text + + Text { id: _placeHolderText + text : Variables.emptyEntry + anchors.fill : parent + rightPadding : 125 + horizontalAlignment : Text.AlignRight + font.pixelSize : Fonts.fontPixelValueControl + color : Colors.offWhite + visible : _pretreatmentPatientIDEntry.textInput.text.length === 0 && + ! _pretreatmentPatientIDEntry.textInput.activeFocus + } + } + } + + Row { id: _buttonRow + anchors { + bottom : parent.bottom + bottomMargin : Variables.settingsContentBottomMargin + horizontalCenter: parent.horizontalCenter + } + spacing : Variables.defaultMargin * 3 + visible : _root.currentIndex === ServiceModeHydraulics.DeaerationPressure + + TouchRect { id : _startCalibrationButton + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + textString : qsTr("Start Calibration" ) + isDefault : true + visible : ! _root.deaerationInProgress && _root.currentIndex === ServiceModeHydraulics.DeaerationPressure + + onClicked : { + + print("Start Calibration" ) + _root.deaerationInProgress = !_root.deaerationInProgress + } + } + + TouchRect { id : _cancelButton + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + textString : qsTr("Cancel" ) + isDefault : true + visible : _root.deaerationInProgress && _root.currentIndex === ServiceModeHydraulics.DeaerationPressure + + onClicked : { + + print("Cancel" ) + _root.deaerationInProgress = !_root.deaerationInProgress + } + } + + TouchRect { id : _setPumpRateButton + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + textString : qsTr("Set Pump Rate" ) + isDefault : true + visible : _root.deaerationInProgress && _root.currentIndex === ServiceModeHydraulics.DeaerationPressure + + onClicked : print("Set Pump Rate" ) + } + } }