Index: sources/gui/qml/pages/TreatmentStart.qml =================================================================== diff -u -rb9c5b0b3afc3b34d4980ecc4f023f498f80dafbc -r0e87420e50dd94c37eb25f289ef3262e0e45d7f4 --- sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision b9c5b0b3afc3b34d4980ecc4f023f498f80dafbc) +++ sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision 0e87420e50dd94c37eb25f289ef3262e0e45d7f4) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright \n * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n * IN PART OR IN WHOLE, \n @@ -28,339 +28,155 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root + + property int bloodFlow_MeasuredFlow_Precision: 0 + + property int leftColumnX : 40 + property int rightColumnX : 875 + + property int row1Y : 100 + property int row2Y : 320 + property int row3Y : 570 + + property int lineLength : 450 + property int leftLinesX : 0 + property int rightLinesX : Variables.applicationWidth - lineLength + property int row1LineY : 275 + property int row2LineY : 525 + signal backPressed() - BackButton { id : _backButton - onPressed: backPressed() + + // ---------- COLUMN LEFT + TouchArea { id: _flowsTouchArea + x: leftColumnX + y: row1Y + title: qsTr("FLOWS") + components: [ + TextRect { id: _bloodFlow + title: qsTr("Blood") + label: "600" // value + extra: qsTr("mL") // unit + labelFont.weight: Font.ExtraLight + } , + TextRect { id: _dialysateFlow + title: qsTr("Dialysate") + label: "500" // value + extra: qsTr("mL") // unit + labelFont.weight: Font.ExtraLight + } + ] } - //Column { - // spacing: Variables.columnSpacing - // anchors.centerIn: parent - // TitleText { id: _titleText - // width: parent.width - // text: qsTr("Start Treatment Placeholder") - // } - //} + Line { x: 0; y: row1LineY; length: lineLength } - USBButton { - x: 200 - anchors { - top : parent.top - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } + TouchArea { id: _vitalsTouchArea + x: leftColumnX + y: row2Y + isTouchable: false + orientation: TouchArea.Orientation.Vertical + title: qsTr("VITALS") + components: [ + TextRect { id: _bloodPressure + labelHeight: 60 + labelFont.pixelSize: Fonts.fontPixelVitals + labelFont.weight: Font.ExtraLight + labelAutoSize: true + label: "120/80" // value + extra: qsTr("mmHg") // unit + } , + TextRect { id: _heartBeat + labelHeight: 40 + labelFont.pixelSize: Fonts.fontPixelVitals + labelFont.weight: Font.ExtraLight + labelAutoSize: true + label: "130" // value + extra: qsTr("BPM") // unit + } + ] } - ExportButton { - x: 300 - width: 150 - height: 50 - anchors { - top : parent.top - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } + + Line { x: 0; y: row2LineY; length: lineLength } + + TouchArea { id: _pressureTouchArea + x: leftColumnX + y: row3Y + width: _flowsTouchArea.width + isTouchable: true + orientation: TouchArea.Orientation.Vertical + title: qsTr("PRESSURE") + " " + qsTr("(mmHg)") } - Column { id: _BloodFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 10 - Text { - id: _BloodFlow_Title - text: qsTr(" Blood ") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignHCenter - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true - } - Text { - id: _BloodFlow_S32 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_1 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_2 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_3 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_4 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_5 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _BloodFlow_F32_6 - text: qsTr("") - width: _BloodFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } + // ---------- COLUMN RIGHT + TouchArea { id: _ultrafiltrationTouchArea + x: rightColumnX + y: row1Y + width: _flowsTouchArea.width + isTouchable: true + orientation: TouchArea.Orientation.Vertical + title: qsTr("ULTRAFILTRATION VOLUME") + " " + qsTr("(mL)") } - Column { id: _DialysateFlowColumn - width: 150 - spacing: 20 - topPadding: 100 - leftPadding: 180 - Text { - id: _DialysateFlow_Title - text: qsTr(" Dialysate ") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true + Line { x: rightLinesX; y: row1LineY; length: lineLength } + + TouchArea { id: _fluidManagementTouchArea + x: rightColumnX + y: row2Y + width: _flowsTouchArea.width + height: 200 + isTouchable: false + title: qsTr("FLUID MANAGEMENT") + titleVSpacing: 40 + TouchRect { + y : 60 + width : 340 + height : 55 + text.text: qsTr("START BOLUS (100 mL)") + text.font { + weight: Font.DemiBold + pixelSize : 20 + letterSpacing: 3 + } + animated: true + duration: 100 } - Text { - id: _DialysateFlow_S32 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_1 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_2 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_3 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_4 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_5 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - Text { - id: _DialysateFlow_F32_6 - text: qsTr("") - width: _DialysateFlowColumn.width - horizontalAlignment: Text.AlignRight - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } } - Column { id: _AlarmStatusColumn - width: 270 - spacing: 5 - topPadding: 100 - leftPadding: 400 - Text { - id: _AlarmStatus_Title - text: qsTr(" Alarm Status ") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - font.underline: true + Line { x: rightLinesX; y: row2LineY; length: lineLength } + + TouchArea { id: _solutionInfusionTouchArea + x: rightColumnX + y: row3Y + width: _flowsTouchArea.width + isTouchable: false + orientation: TouchArea.Orientation.Vertical + title: qsTr("SOLUTION INFUSION") + } + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = true + _treatmentMenu.hidden = false } - Text { - id: _AlarmStatus_Priority - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { - id: _AlarmStatus_ID - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { - id: _AlarmStatus_EsclateIn - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_MuteTimeout - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_systemFault - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_stop - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noClear - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noResume - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noRinseback - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noEndTreatment - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_noNewTreatment - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_bypassDialyzer - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_alarmsToEscalate - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } - Text { id: _AlarmStatus_alarmsSilenced - text: qsTr("") - width: _AlarmStatusColumn.width - horizontalAlignment: Text.AlignLeft - color: Colors.textMain - font.pixelSize: Fonts.fontPixelButton - } } - Connections { - target: _GuiView + + Connections { target: _GuiView onDidActionReceive: { if ( ! visible ) return; switch(vAction) { case GuiActions.BloodFlow: - _BloodFlow_S32 .text = vData[GuiActions.BloodFlow_FlowSetPoint ]; - _BloodFlow_F32_1.text = vData[GuiActions.BloodFlow_MeasuredFlow ].toFixed(2); - _BloodFlow_F32_2.text = vData[GuiActions.BloodFlow_RotorSpeed ].toFixed(2); - _BloodFlow_F32_3.text = vData[GuiActions.BloodFlow_MotorSpeed ].toFixed(2); - _BloodFlow_F32_4.text = vData[GuiActions.BloodFlow_MotorCtlSpeed ].toFixed(2); - _BloodFlow_F32_5.text = vData[GuiActions.BloodFlow_MotorCtlCurrent].toFixed(2); - _BloodFlow_F32_6.text = vData[GuiActions.BloodFlow_PWMDtCycle ].toFixed(2) + "%"; - break; - case GuiActions.BloodFlow: - _DialysateFlow_S32 .text = vData[GuiActions.DialysateFlow_FlowSetPoint ]; - _DialysateFlow_F32_1.text = vData[GuiActions.DialysateFlow_MeasuredFlow ].toFixed(2); - _DialysateFlow_F32_2.text = vData[GuiActions.DialysateFlow_RotorSpeed ].toFixed(2); - _DialysateFlow_F32_3.text = vData[GuiActions.DialysateFlow_MotorSpeed ].toFixed(2); - _DialysateFlow_F32_4.text = vData[GuiActions.DialysateFlow_MotorCtlSpeed ].toFixed(2); - _DialysateFlow_F32_5.text = vData[GuiActions.DialysateFlow_MotorCtlCurrent].toFixed(2); - _DialysateFlow_F32_6.text = vData[GuiActions.DialysateFlow_PWMDtCycle ].toFixed(2) + "%"; - break; - case GuiActions.AlarmStatus: - _AlarmStatus_Priority .text = _GuiView.alarmPriorityName(vData[GuiActions.AlarmStatus_Priority ]) - _AlarmStatus_ID .text = _GuiView.alarmIDName (vData[GuiActions.AlarmStatus_AlarmID ]) - _AlarmStatus_EsclateIn .text = "Escalates In : " + vData[GuiActions.AlarmStatus_EscalateIn ] - _AlarmStatus_MuteTimeout .text = "MuteTimeout : " + vData[GuiActions.AlarmStatus_MuteTimeout ] - _AlarmStatus_systemFault .text = (vData[GuiActions.AlarmStatus_Flag_systemFault ] ? "1" : "0" ) + " : systemFault " - _AlarmStatus_stop .text = (vData[GuiActions.AlarmStatus_Flag_stop ] ? "1" : "0" ) + " : stop " - _AlarmStatus_noClear .text = (vData[GuiActions.AlarmStatus_Flag_noClear ] ? "1" : "0" ) + " : noClear " - _AlarmStatus_noResume .text = (vData[GuiActions.AlarmStatus_Flag_noResume ] ? "1" : "0" ) + " : noResume " - _AlarmStatus_noRinseback .text = (vData[GuiActions.AlarmStatus_Flag_noRinseback ] ? "1" : "0" ) + " : noRinseback " - _AlarmStatus_noEndTreatment .text = (vData[GuiActions.AlarmStatus_Flag_noEndTreatment ] ? "1" : "0" ) + " : noEndTreatment " - _AlarmStatus_noNewTreatment .text = (vData[GuiActions.AlarmStatus_Flag_noNewTreatment ] ? "1" : "0" ) + " : noNewTreatment " - _AlarmStatus_bypassDialyzer .text = (vData[GuiActions.AlarmStatus_Flag_bypassDialyzer ] ? "1" : "0" ) + " : bypassDialyzer " - _AlarmStatus_alarmsToEscalate.text = (vData[GuiActions.AlarmStatus_Flag_alarmsToEscalate] ? "1" : "0" ) + " : alarmsToEscalate " - _AlarmStatus_alarmsSilenced .text = (vData[GuiActions.AlarmStatus_Flag_alarmsSilenced ] ? "1" : "0" ) + " : alarmsSilenced " - break; + _bloodFlow.label = vData[GuiActions.BloodFlow_MeasuredFlow].toFixed(bloodFlow_MeasuredFlow_Precision); } } } + Connections { target: _treatmentMenu + onItemPressed: { + // TEST : this is a test code since the back button has been removed + // and also we don't have Treatment complete yet. + if (vIndex == 0) { + _treatmentMenu.hidden = true + backPressed() + } + } + + } }