Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -rab7ffd27ecea1277d8645a8b62ff48c0cb3f6ff4 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision ab7ffd27ecea1277d8645a8b62ff48c0cb3f6ff4) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * - * \file TreatmentHome.qml + * \file TreatmentHome.qml * \author (last) Behrouz NematiPour - * \date (last) 16-Apr-2021 + * \date (last) 10-Jan-2024 * \author (original) Behrouz NematiPour * \date (original) 27-Jan-2020 * @@ -31,24 +31,6 @@ property int bloodFlow_MeasuredFlow_Precision: 0 property int dialysateInletFlow_MeasuredFlow_Precision: 0 - property int areaWidth : 400 - property int areaHeightRow1 : 170 - property int areaHeightRow2 : 225 - property int areaHeightRow3 : 200 - - property int leftColumnX : 40 - property int rightColumnX : Variables.applicationWidth - leftColumnX - areaWidth - - property int row1Y : 100 - property int row2Y : 290 // 320 - property int row3Y : 540 // 570 - - property int lineLength : 450 - property int leftLinesX : 0 - property int rightLinesX : Variables.applicationWidth - lineLength - property int row1LineY : 275 - property int row2LineY : 525 - signal backClicked() signal sectionFlowClicked() @@ -59,72 +41,79 @@ // ---------- COLUMN LEFT TreatmentFlows { id: _flowsTouchArea - x : leftColumnX - y : row1Y - width : areaWidth - height : areaHeightRow1 + x : Variables.screenGridLeftColumnX + y : Variables.screenGridRow3Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow3 onClicked: { sectionFlowClicked() } } - Line { x: 0; y: row1LineY; length: lineLength } + Line { x: 0; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength } TreatmentVitals { id: _vitalsTouchArea - x : leftColumnX - y : row2Y - width : areaWidth - height : areaHeightRow2 + x : Variables.screenGridLeftColumnX + y : Variables.screenGridRow2Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow2 onClicked: { sectionVitalsClicked() } notification.text: qsTr("Interval:" ) - + " " + (vTreatmentVitals.interval ? (vTreatmentVitals.interval + qsTr("min")) : qsTr("off")) + + " " + (vTreatmentVitals.interval ? (vTreatmentVitals.interval + qsTr("min")) : qsTr("OFF")) + " , " + qsTr("Last Read:") + " " + vTreatmentVitals.lastRead + Text { id: _vitalCountdown + color : "gray" + anchors { + top : parent.top + right : parent.right + rightMargin : 50 + } + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + height : 15 + width : 100 + text : vTreatmentVitals.interval ? ( vTreatmentVitals.countdown ) : "" + font.pixelSize: 16 + } } - Line { x: 0; y: row2LineY; length: lineLength } - TreatmentPressures { id: _pressuresTouchArea - arterialMinimum : Variables.arterialValueMin - arterialMaximum : Variables.arterialValueMax - venousMinimum : Variables.venousValueMin - venousMaximum : Variables.venousValueMax - arterilPressure : vTreatmentPressureOcclusion.arterialPressure - venousPressure : vTreatmentPressureOcclusion.venousPressure + Line { x: 0; y: Variables.screenGridRow2LineY; length: Variables.screenGridLineLength } - x : leftColumnX - y : row3Y - width : areaWidth - height : areaHeightRow3 - + TreatmentPressures { id: _pressuresTouchArea + x : Variables.screenGridLeftColumnX + y : Variables.screenGridRow1Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow1 onClicked: { sectionPressuresClicked() } } // ---------- COLUMN RIGHT TreatmentUltrafiltration { id: _ultrafiltrationTouchArea; - x : rightColumnX - y : row1Y - width : areaWidth - height : areaHeightRow1 + x : Variables.screenGridRightColumnX + y : Variables.screenGridRow1Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow1 onClicked : { sectionUltrafiltrationClicked() } } - Line { x: rightLinesX; y: row1LineY; length: lineLength } + Line { x: Variables.screenGridRightLinesX; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength } TreatmentSaline { id: _salineTouchArea - x : rightColumnX - y : row2Y - width : areaWidth - height : areaHeightRow2 + x : Variables.screenGridRightColumnX + y : Variables.screenGridRow2Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow2 } - Line { x: rightLinesX; y: row2LineY; length: lineLength; } + Line { x: Variables.screenGridRightLinesX; y: Variables.screenGridRow2LineY; length: Variables.screenGridLineLength; } TreatmentHeparin { id: _heparinTouchArea - x : rightColumnX - y : row3Y - width : areaWidth - height : areaHeightRow3 + x : Variables.screenGridRightColumnX + y : Variables.screenGridRow3Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow3 } // ---------- Center @@ -135,33 +124,9 @@ } onVisibleChanged: { - vTreatmentVitals.enabled = visible - if (visible) { _mainMenu.hidden = true _treatmentMenu.hidden = false } } - - Connections { target: _pressuresTouchArea - Component.onCompleted: { // initial update of the pressure section - _pressuresTouchArea.setBounds( - vTreatmentAdjustmentPressuresLimits.arterialLimitLow , - vTreatmentAdjustmentPressuresLimits.arterialLimitHigh , - vTreatmentAdjustmentPressuresLimits.venousLimitLow , - vTreatmentAdjustmentPressuresLimits.venousLimitHigh ) - } - } - - Connections { target: vTreatmentAdjustmentPressuresLimits - onAdjustmentTriggered : { // updates the pressure section if only it has been accepted - if(vTreatmentAdjustmentPressuresLimits.adjustment_Accepted) { - _pressuresTouchArea.setBounds( - vTreatmentAdjustmentPressuresLimits.arterialLimitLow , - vTreatmentAdjustmentPressuresLimits.arterialLimitHigh , - vTreatmentAdjustmentPressuresLimits.venousLimitLow , - vTreatmentAdjustmentPressuresLimits.venousLimitHigh ) - } - } - } }