Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -r9a0581274e4dc51af6d6f3e4dd932581e8dce445 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 9a0581274e4dc51af6d6f3e4dd932581e8dce445) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,15 +1,15 @@ /*! * - * 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 - * \author (last) Behrouz NematiPour - * \date (last) 18-May-2020 - * \author (original) Behrouz NematiPour - * \date (original) 27-Jan-2020 + * \file TreatmentHome.qml + * \author (last) Behrouz NematiPour + * \date (last) 10-Jan-2024 + * \author (original) Behrouz NematiPour + * \date (original) 27-Jan-2020 * */ @@ -21,46 +21,112 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/treatment/sections" /*! - * \brief TreatmentHome is the screen - * which is the default screen in the "Treatment" stack + * \brief ManagerHome is the screen + * which is the default screen in the "Manager" stack */ ScreenItem { id: _root - // exported items - property alias startTreatmentButton : _startTreatmentRect.button - property alias createTreatmentButton: _createTreatmentRect.button + property int bloodFlow_MeasuredFlow_Precision: 0 + property int dialysateInletFlow_MeasuredFlow_Precision: 0 - signal treatmentStarted() - signal treatmentCreated() + signal backClicked() - // 2 - Header - ImageLogoD { id: _headerLogo } + signal sectionFlowClicked() + signal sectionVitalsClicked() + signal sectionPressuresClicked() + signal sectionTimeClicked() + signal sectionUltrafiltrationClicked() - // Definitions - Column { - spacing: Variables.columnSpacing - anchors.centerIn: parent - TitleText { id: _titleText - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - text: qsTr("Good Morning") + // ---------- COLUMN LEFT + TreatmentFlows { id: _flowsTouchArea + x : Variables.screenGridLeftColumnX + y : Variables.screenGridRow3Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow3 + onClicked: { + sectionFlowClicked() } - TouchRect { id : _startTreatmentRect - anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("START TREATMENT") - button.onClicked: treatmentStarted() + } + Line { x: 0; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength } + TreatmentVitals { id: _vitalsTouchArea + x : Variables.screenGridLeftColumnX + y : Variables.screenGridRow2Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow2 + onClicked: { + sectionVitalsClicked() } - TouchRect { id : _createTreatmentRect - anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("CREATE TREATMENT") - button.onClicked: treatmentCreated() + notification.text: qsTr("Interval:" ) + + " " + (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: Variables.screenGridRow2LineY; length: Variables.screenGridLineLength } + + TreatmentPressures { id: _pressuresTouchArea + x : Variables.screenGridLeftColumnX + y : Variables.screenGridRow1Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow1 + onClicked: { + sectionPressuresClicked() + } + } + + // ---------- COLUMN RIGHT + TreatmentUltrafiltration { id: _ultrafiltrationTouchArea; + x : Variables.screenGridRightColumnX + y : Variables.screenGridRow1Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow1 + onClicked : { + sectionUltrafiltrationClicked() + } + } + Line { x: Variables.screenGridRightLinesX; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength } + TreatmentSaline { id: _salineTouchArea + x : Variables.screenGridRightColumnX + y : Variables.screenGridRow2Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow2 + } + Line { x: Variables.screenGridRightLinesX; y: Variables.screenGridRow2LineY; length: Variables.screenGridLineLength; } + TreatmentHeparin { id: _heparinTouchArea + x : Variables.screenGridRightColumnX + y : Variables.screenGridRow3Y + width : Variables.screenGridAreaWidth + height : Variables.screenGridAreaHeightRow3 + } + + // ---------- Center + TreatmentTime { id: _treatmentTime + onClicked: { + sectionTimeClicked() + } + } + onVisibleChanged: { if (visible) { - _mainMenu.hidden = false + _mainMenu.hidden = true + _treatmentMenu.hidden = false } } }