Index: sources/gui/qml/pages/TreatmentStart.qml =================================================================== diff -u -r2f7a4176a08ba884281b370d452f19c25501a4b4 -r442d1c4f53c96991d4103485ff5ff683ed00d4f7 --- sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision 2f7a4176a08ba884281b370d452f19c25501a4b4) +++ sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision 442d1c4f53c96991d4103485ff5ff683ed00d4f7) @@ -29,67 +29,154 @@ */ ScreenItem { id: _root - property int bloodFlow_MeasuredFlow_Precision: 2 + property int bloodFlow_MeasuredFlow_Precision: 0 - signal backPressed() + property int leftColumnX : 40 + property int rightColumnX : 875 - BackButton { id : _backButton - onPressed: backPressed() - } + property int row1Y : 100 + property int row2Y : 320 + property int row3Y : 570 - //Column { - // spacing: Variables.columnSpacing - // anchors.centerIn: parent - // TitleText { id: _titleText - // width: parent.width - // text: qsTr("Start Treatment Placeholder") - // } - //} + property int lineLength : 450 + property int leftLinesX : 0 + property int rightLinesX : Variables.applicationWidth - lineLength + property int row1LineY : 275 + property int row2LineY : 525 - USBButton { - x: 200 - anchors { - top : parent.top - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } - } - ExportButton { - x: 300 - width: 150 - height: 50 - anchors { - top : parent.top - topMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - rightMargin : (Variables.headerHeight - Variables.logoHeight) / 2 - } - } + signal backPressed() - TouchArea { - x: 46 // Hard Coded for now - y: 113 // Hard Coded for now + // ---------- COLUMN LEFT + TouchArea { id: _flowsTouchArea + x: leftColumnX + y: row1Y title: qsTr("FLOWS") components: [ TextRect { id: _bloodFlow title: qsTr("Blood") label: "600" // value - extra: "mL" // unit + extra: qsTr("mL") // unit + labelFont.weight: Font.ExtraLight } , TextRect { id: _dialysateFlow title: qsTr("Dialysate") label: "500" // value - extra: "mL" // unit + extra: qsTr("mL") // unit + labelFont.weight: Font.ExtraLight } ] } - Connections { - target: _GuiView + + Line { x: 0; y: row1LineY; length: lineLength } + + 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 + } + ] + } + + 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 RIGHT + TouchArea { id: _ultrafiltrationTouchArea + x: rightColumnX + y: row1Y + width: _flowsTouchArea.width + isTouchable: true + orientation: TouchArea.Orientation.Vertical + title: qsTr("ULTRAFILTRATION VOLUME") + " " + qsTr("(mL)") + } + + 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 + } + } + + 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 + } + } + + Connections { target: _GuiView onDidActionReceive: { if ( ! visible ) return; switch(vAction) { case GuiActions.BloodFlow: - _bloodFlow.label = vData[GuiActions.BloodFlow_MeasuredFlow ].toFixed(BloodFlow_MeasuredFlow_Precision); + _bloodFlow.label = vData[GuiActions.BloodFlow_MeasuredFlow].toFixed(bloodFlow_MeasuredFlow_Precision); } } } + Connections { target: _treatmentMenu + onItemPressed: { + // TEST CODE : 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() + } + } + + } }