Index: denali.pro.user =================================================================== diff -u -reefe8acbe5b10deb379c5e4ceabeaa95d429410e -ra25dee6ed9a8cd343056d92bc3a78617eed66a6f --- denali.pro.user (.../denali.pro.user) (revision eefe8acbe5b10deb379c5e4ceabeaa95d429410e) +++ denali.pro.user (.../denali.pro.user) (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -reefe8acbe5b10deb379c5e4ceabeaa95d429410e -ra25dee6ed9a8cd343056d92bc3a78617eed66a6f --- denali.qrc (.../denali.qrc) (revision eefe8acbe5b10deb379c5e4ceabeaa95d429410e) +++ denali.qrc (.../denali.qrc) (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -70,7 +70,7 @@ sources/gui/qml/components/ConfirmTreatmentSubTable.qml sources/gui/qml/components/SliderDoubleCreateTreatment.qml sources/gui/qml/components/GridSelection.qml - sources/gui/qml/components/TopMenuBarCreateTreatment.qml + sources/gui/qml/components/TitleBarCreateTreatment.qml sources/gui/qml/components/ProgressBarEx.qml sources/gui/qml/components/CloseButton.qml sources/gui/qml/components/ConfirmButton.qml @@ -104,12 +104,15 @@ sources/gui/qml/pages/treatment/TreatmentHome.qml sources/gui/qml/pages/treatment/TreatmentStack.qml - sources/gui/qml/pages/treatment/TreatmentCreate.qml - sources/gui/qml/pages/treatment/TreatmentBegin.qml - sources/gui/qml/pages/treatment/TreatmentConfirm.qml - sources/gui/qml/pages/treatment/TreatmentPrime.qml sources/gui/qml/pages/treatment/TreatmentStart.qml + + sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml + sources/gui/qml/pages/pretreatment/create/PreTreatmentUltrafiltration.qml + sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml + sources/gui/qml/pages/pretreatment/create/PreTreatmentPrime.qml + sources/gui/qml/pages/pretreatment/create/PreTreatmentBase.qml + sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml sources/gui/qml/pages/treatment/sections/TreatmentVitals.qml Index: sources/gui/qml/components/TitleBarCreateTreatment.qml =================================================================== diff -u --- sources/gui/qml/components/TitleBarCreateTreatment.qml (revision 0) +++ sources/gui/qml/components/TitleBarCreateTreatment.qml (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -0,0 +1,55 @@ +/*! + * + * Copyright (c) 2019-2020 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 TitleBarCreateTreatment.qml + * \author (last) Behrouz NematiPour + * \date (last) 01-Jan-2021 + * \author (original) Peter Lucia + * \date (original) 03-Aug-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief TitleBarCreateTreatment - Contains a back button as well + * as the current progress in each of the pre-treatment steps. + */ +Rectangle { id: _root + property alias stepName : _stepIndicator.currentStepName + + height : Variables.topBarMenuHeight + color : Colors.backgroundMain + + signal backClicked() + + BackButton { id : _backButton + objectName: "_backButton" + width: parent.width / 10 + anchors.verticalCenter: parent.verticalCenter + anchors.top: parent.top + anchors.left: parent.left + anchors.margins: _root.height / 4 + onClicked: _root.backClicked() + } + + StepIndicator { id: _stepIndicator + anchors.centerIn: parent + stepNames: [ + Variables.preTreatmentStepLabelCreate , + Variables.preTreatmentStepLabelConfirm , + Variables.preTreatmentStepLabelPriming , + Variables.preTreatmentStepLabelUltrafiltration , + ] + } +} Fisheye: Tag a25dee6ed9a8cd343056d92bc3a78617eed66a6f refers to a dead (removed) revision in file `sources/gui/qml/components/TopMenuBarCreateTreatment.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentBase.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/create/PreTreatmentBase.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentBase.qml (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -0,0 +1,55 @@ +/*! + * + * Copyright (c) 2019-2020 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 PreTreatmentBase.qml + * \author (last) Behrouz NematiPour + * \date (last) 12-Jan-2021 + * \author (original) Behrouz NematiPour + * \date (original) 12-Jan-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the parent page of the pretreatment create screens + */ +ScreenItem { id: _root + objectName: "_PreTreatmentBase" + + property alias reasonText : _notification.text + property alias header : _titleBar + + signal backClicked () + + TitleBarCreateTreatment { id: _titleBar + stepName : "" + anchors.top : parent.top + anchors.horizontalCenter : parent.horizontalCenter + width : parent.width + onBackClicked : { + _root.backClicked(); + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentConfirm.qml (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -0,0 +1,88 @@ +/*! + * + * Copyright (c) 2019-2020 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 PreTreatmentConfirm.qml + * \author (last) Behrouz NematiPour + * \date (last) 12-Jan-2021 + * \author (original) Peter Lucia + * \date (original) 03-Aug-2020 + * + */ + +// Qt +import QtQuick 2.12 +import QtQuick.Controls 2.12 // ScrollBar + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief ManagerHome is the screen + * which is the default screen in the "Manager" stack + */ +PreTreatmentBase { id: _root + objectName: "_PreTreatmentConfirm" + + signal confirmClicked() + + header.stepName: Variables.preTreatmentStepLabelConfirm + + Flickable { id: _flickable + objectName: "_PreTreatmentConfirmFlickable" + anchors { + top : parent.top + topMargin : header.height + bottom : parent.bottom + bottomMargin : 75 + horizontalCenter: parent.horizontalCenter + } + width: parent.width + contentWidth: parent.width + contentHeight: _column.implicitHeight + clip: true + + ScrollBar.vertical: ScrollBar { id: _scrollBar + anchors.right: _flickable.right + anchors.rightMargin: 3 + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } + + Column { id: _column + spacing: Variables.treatmentSpacing + anchors.horizontalCenter: parent.horizontalCenter; + anchors.fill: parent; + + Text { id: _titleText + anchors.horizontalCenter: parent.horizontalCenter; + text: qsTr("Confirm Treatment") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + // insert the treatment information table here + ConfirmTreatmentTable { + anchors.horizontalCenter: parent.horizontalCenter + + } + + TouchRect { id : _continueRect + objectName: "_continueRect" + anchors.horizontalCenter: parent.horizontalCenter + text.text: qsTr("CONFIRM TREATMENT") + button.onClicked: { + _root.confirmClicked() + } + } + } + } +} Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -0,0 +1,660 @@ +/*! + * + * Copyright (c) 2019-2020 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 PreTreatmentCreate.qml + * \author (last) Behrouz NematiPour + * \date (last) 12-Jan-2021 + * \author (original) Behrouz NematiPour + * \date (original) 27-Jan-2020 + * + */ + +// Qt +import QtQuick 2.12 +import QtQuick.Controls 2.12 // ScrollBar + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief ManagerHome is the screen + * which is the default screen in the "Manager" stack + */ +PreTreatmentBase { id: _root + objectName: "_PreTreatmentCreate"; // SquishQt testability + + signal continueClicked() + + function setInteractive(isInteractive) { + _flickable.interactive = isInteractive + } + + header.stepName : Variables.preTreatmentStepLabelCreate + + Flickable { id: _flickable + objectName: "TreatmentCreateFlickable" + anchors { + top : parent.top + topMargin : header.height + bottom : parent.bottom + bottomMargin : 75 + horizontalCenter: parent.horizontalCenter + } + width: parent.width + contentWidth: parent.width + contentHeight: _column.implicitHeight + clip: true + flickDeceleration: Variables.createTreatmentFlickableDeceleration + + ScrollBar.vertical: ScrollBar { id: _scrollBar + anchors.right: _flickable.right + anchors.rightMargin: 3 + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } + + Column { id: _column + spacing: Variables.treatmentSpacing + anchors.horizontalCenter: parent.horizontalCenter; + anchors.fill: parent; + + Text { id: _titleText + anchors.horizontalCenter: parent.horizontalCenter; + text: qsTr("Create a Custom Treatment") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + + Text { id: _titleTextPrescription + anchors.horizontalCenter: parent.horizontalCenter; + text: qsTr("PRESCRIPTION"); + color: Colors.textMain; + font.pixelSize: Fonts.fontPixelButton + font.bold: true + } + + SliderCreateTreatment { id: _bloodFlowRate + objectName: "_bloodFlowRate" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + min: vTreatmentCreate.bloodFlowRateMin + max: vTreatmentCreate.bloodFlowRateMax + step: vTreatmentCreate.bloodFlowRateRes + text: qsTr("Blood Flow Rate") + units: qsTr("mL/min") + onPressed: { + setInteractive(false) + vTreatmentCreate.bloodFlowRate = value + } + onReleased: { + vTreatmentCreate.bloodFlowRate = value + setInteractive(true) + } + } + + SliderCreateTreatment { id: _dialysateFlowRate + objectName: "_dialysateFlowRate" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + min: vTreatmentCreate.dialysateFlowRateMin + max: vTreatmentCreate.dialysateFlowRateMax + step: vTreatmentCreate.dialysateFlowRateRes + text: qsTr("Dialysate Flow Rate") + units: qsTr("mL/min") + onPressed: { + setInteractive(false) + vTreatmentCreate.dialysateFlowRate = value; + } + onReleased: { + vTreatmentCreate.dialysateFlowRate = value; + setInteractive(true) + } + } + + SliderCreateTreatment { id: _duration + objectName: "_duration" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + min: vTreatmentCreate.durationMin + max: vTreatmentCreate.durationMax + step: vTreatmentCreate.durationRes + text: qsTr("Duration") + units: qsTr("min") + onPressed: { + setInteractive(false) + vTreatmentCreate.duration = value; + } + onReleased: { + vTreatmentCreate.duration = value; + setInteractive(true) + } + } + + SliderCreateTreatment { id: _heparinDispensingRate + objectName: "_heparinDispensingRate" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + min: vTreatmentCreate.heparinDispensingRateMin + max: vTreatmentCreate.heparinDispensingRateMax + step: vTreatmentCreate.heparinDispensingRateRes + text: qsTr("Heparin Dispensing Rate") + units: qsTr("mL/hr") + onPressed: { + setInteractive(false) + vTreatmentCreate.heparinDispensingRate = value + } + onReleased: { + vTreatmentCreate.heparinDispensingRate = value + setInteractive(true) + } + } + + SliderCreateTreatment { id: _heparinBolusVolume + objectName: "_heparinBolusVolume" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + min: vTreatmentCreate.heparinBolusVolumeMin + max: vTreatmentCreate.heparinBolusVolumeMax + step: vTreatmentCreate.heparinBolusVolumeRes + + text: qsTr("Heparin Bolus Volume") + units: qsTr("mL") + onPressed: { + setInteractive(false) + vTreatmentCreate.heparinBolusVolume = value + } + onReleased: { + vTreatmentCreate.heparinBolusVolume = value + setInteractive(true) + } + } + + SliderCreateTreatment { id: _heparinStopTime + objectName: "_heparinStopTime" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + min: vTreatmentCreate.heparinStopTimeMin + max: vTreatmentCreate.heparinStopTimeMax + step: vTreatmentCreate.heparinStopTimeRes + text: qsTr("Heparin Stop Time") + units: qsTr("min") + onPressed: { + setInteractive(false) + vTreatmentCreate.heparinStopTime = value + } + onReleased: { + vTreatmentCreate.heparinStopTime = value + setInteractive(true) + } + } + + SliderCreateTreatment { + id: _salineBolus + objectName: "_salineBolus" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + text: "Saline Bolus" + units: qsTr("mL") + min: vTreatmentCreate.salineBolusVolumeMin + max: vTreatmentCreate.salineBolusVolumeMax + step: vTreatmentCreate.salineBolusVolumeRes + onPressed: { + setInteractive(false) + vTreatmentCreate.salineBolusVolume = value + } + onReleased: { + vTreatmentCreate.salineBolusVolume = value + setInteractive(true) + } + } + + Text { id: _titleTextOperation + anchors.horizontalCenter: parent.horizontalCenter; + text: qsTr("OPERATING PARAMETERS"); + color: Colors.textMain; + font.pixelSize: Fonts.fontPixelButton + font.bold: true + } + + GridSelection { + id: _acidConcentrate + objectName: "_acidConcentrateRect" + name: qsTr("Acid Concentrate") + buttonNames: vTreatmentCreate.acidConcentrateOptions + onButtonClicked: { + vTreatmentCreate.acidConcentrate = selectedIndex + } + } + + GridSelection { id: _bicarbonateConcentrate + objectName: "_bicarbonateConcentrateRect" + name: qsTr("Bicarbonate Concentrate") + numRows: 1 + numCols: 2 + buttonNames: vTreatmentCreate.bicarbonateConcentrateOptions; + onButtonClicked: { + vTreatmentCreate.bicarbonateConcentrate = selectedIndex; + } + } + + GridSelection { id: _dialyzerType + objectName: "_dialyzerTypeRect" + name: qsTr("Dialyzer Type") + numRows: 3 + numCols: 2 + buttonNames: vTreatmentCreate.dialyzerTypeOptions; + onButtonClicked: { + vTreatmentCreate.dialyzerType = selectedIndex; + } + } + + SliderCreateTreatment { id: _dialysateTemperature + objectName: "_dialysateTemperature" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + min: vTreatmentCreate.dialysateTempMin + max: vTreatmentCreate.dialysateTempMax + step: vTreatmentCreate.dialysateTempRes + text: qsTr("Dialysate Temperature") + units: qsTr("C") + onPressed: { + setInteractive(false) + vTreatmentCreate.dialysateTemp = value + } + onReleased: { + vTreatmentCreate.dialysateTemp = value + setInteractive(true) + } + } + + Column { id: _arterialColumn + spacing: 45 + anchors.horizontalCenter: parent.horizontalCenter + Text { id: _arterialLabel + visible : true + color : "white" + text: qsTr("Arterial Pressure Limits") + " " + "(" + Variables.unitTextBloodPressure + ")" + font.pixelSize : Fonts.fontPixelFluidText + anchors.left : _arterialPressureLimits.left + } + RangeSlider { id: _arterialPressureLimits + // dimension + height : 5 + width : Variables.createTreatmentSliderWidth + diameter : Variables.sliderCircleDiameter + anchors.horizontalCenter: parent.horizontalCenter + ticks : true + stepSnap : true + hasAdjusted : true + + // Texts + lowerText.visible : true + lowerText.font.pixelSize : Fonts.fontPixelFluidText + lowerText.font.bold : false + lowerText.anchors.topMargin : -50 + lowerTextHorizontalCenter : true + + upperText.visible : true + upperText.font.pixelSize : Fonts.fontPixelFluidText + upperText.font.bold : false + upperText.anchors.topMargin : -50 + upperTextHorizontalCenter : true + + minText.visible : true + // minText.font.pixelSize : Fonts.fontPixelFluidText + minText.font.bold : false + minVerticalEdgeVisible : false + + maxText.visible : true + // maxText.font.pixelSize : Fonts.fontPixelFluidText + maxText.font.bold : false + maxVerticalEdgeVisible : false + + // Ranges + step : Variables.arterialLimitStep + gapValue : Variables.arterialLimitGap + minimum : vTreatmentCreate.arterialPressureLimitLowMin + maximum : vTreatmentCreate.arterialPressureLimitHighMax + minValue : vTreatmentCreate.arterialPressureLimitLowMin + maxValue : vTreatmentCreate.arterialPressureLimitHighMax + minValueLowerBound : vTreatmentCreate.arterialPressureLimitLowMin + minValueUpperBound : vTreatmentCreate.arterialPressureLimitLowMax + maxValueLowerBound : vTreatmentCreate.arterialPressureLimitHighMin + maxValueUpperBound : vTreatmentCreate.arterialPressureLimitHighMax + // scroll handling and value updates + onPressed : { setInteractive(false) } + onDragged : { setInteractive(false) } + onReleased: { setInteractive(true ) } + onMinValueChanged: if (minAdjusted) vTreatmentCreate.arterialPressureLimitLow = minValue + onMaxValueChanged: if (maxAdjusted) vTreatmentCreate.arterialPressureLimitHigh = maxValue + } + } + + Column { id: _venousColumn + spacing: 45 + anchors.horizontalCenter: parent.horizontalCenter + Text { id: _venousLabel + visible : true + color : "white" + text: qsTr("Venous Pressure Limits") + " " + "(" + Variables.unitTextBloodPressure + ")" + font.pixelSize : Fonts.fontPixelFluidText + anchors.left : _venousPressureLimits.left + } + RangeSlider { id: _venousPressureLimits + // dimension + height : 5 + width : Variables.createTreatmentSliderWidth + diameter : Variables.sliderCircleDiameter + anchors.horizontalCenter: parent.horizontalCenter + ticks : true + stepSnap : true + hasAdjusted : true + + // Texts + lowerText.visible : true + lowerText.font.pixelSize : Fonts.fontPixelFluidText + lowerText.font.bold : false + lowerText.anchors.topMargin : -50 + lowerTextHorizontalCenter : true + + upperText.visible : true + upperText.font.pixelSize : Fonts.fontPixelFluidText + upperText.font.bold : false + upperText.anchors.topMargin : -50 + upperTextHorizontalCenter : true + + minText.visible : true + // minText.font.pixelSize : Fonts.fontPixelFluidText + minText.font.bold : false + minVerticalEdgeVisible : false + + maxText.visible : true + // maxText.font.pixelSize : Fonts.fontPixelFluidText + maxText.font.bold : false + maxVerticalEdgeVisible : false + + // Ranges + step : Variables.arterialLimitStep + gapValue : Variables.arterialLimitGap + minimum : vTreatmentCreate.venousPressureLimitLowMin + maximum : vTreatmentCreate.venousPressureLimitHighMax + minValue : vTreatmentCreate.venousPressureLimitLowMin + maxValue : vTreatmentCreate.venousPressureLimitHighMax + minValueLowerBound : vTreatmentCreate.venousPressureLimitLowMin + minValueUpperBound : vTreatmentCreate.venousPressureLimitLowMax + maxValueLowerBound : vTreatmentCreate.venousPressureLimitHighMin + maxValueUpperBound : vTreatmentCreate.venousPressureLimitHighMax + // scroll handling and value updates + onPressed : { setInteractive(false) } + onDragged : { setInteractive(false) } + onReleased: { setInteractive(true ) } + onMinValueChanged: if (minAdjusted) vTreatmentCreate.venousPressureLimitLow = minValue + onMaxValueChanged: if (maxAdjusted) vTreatmentCreate.venousPressureLimitHigh = maxValue + } + } + + SliderCreateTreatment { id: _bloodPressureMeasurementInterval + objectName: "_bloodPressureMeasurementInterval" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + text: qsTr("Blood Pressure Measurement Interval") + units: Variables.unitTextBPMeasurementInterval + min: vTreatmentCreate.bloodPressureMeasureIntervalMin + max: vTreatmentCreate.bloodPressureMeasureIntervalMax + step: vTreatmentCreate.bloodPressureMeasureIntervalRes + stepSnap: true + onPressed: { + setInteractive(false) + vTreatmentCreate.bloodPressureMeasureInterval = value + } + onReleased: { + vTreatmentCreate.bloodPressureMeasureInterval = value + setInteractive(true) + } + } + + SliderCreateTreatment { id: _rinsebackFlowRate + objectName: "_rinsebackFlowRate" + sliderObjectName: objectName + "Slider" + selectedValueObjectName: objectName + "Value" + text: qsTr("Rinseback Flow Rate") + units: Variables.unitTextFlowRate + min: vTreatmentCreate.rinsebackFlowRateMin + max: vTreatmentCreate.rinsebackFlowRateMax + step: vTreatmentCreate.rinsebackFlowRateRes + stepSnap: true + onPressed: { + setInteractive(false) + vTreatmentCreate.rinsebackFlowRate = value + } + onReleased: { + vTreatmentCreate.rinsebackFlowRate = value + setInteractive(true) + } + } + + TouchRect { id : _continueRect + objectName: "_continueButton" + anchors.horizontalCenter: parent.horizontalCenter + text.text: qsTr("CONTINUE") + backgroundColor: Colors.createTreatmentNotReady + borderColor: Colors.createTreatmentNotReady + textColor: Colors.createTreatmentTextNotReady + button.onClicked: { + vTreatmentCreate.saveTreatmentProfile = false; + if (vTreatmentCreate.continueEnabled) { + _root.continueClicked() + } + } + + function toggleEnabled(enabled) { + if (enabled) { + backgroundColor = Colors.createTreatmentActive + borderColor = Colors.createTreatmentActive + textColor = Colors.createTreatmentTextReady + } else { + backgroundColor = Colors.createTreatmentNotReady + borderColor = Colors.createTreatmentNotReady + textColor = Colors.createTreatmentTextNotReady + } + } + } + } + } + + Connections { target: vTreatmentCreate + onContinueEnabledChanged: { + if (vTreatmentCreate.continueEnabled) { + _continueRect.toggleEnabled(true) + } else { + _continueRect.toggleEnabled(false) + } + } + + onResetCreateTreatment: { + _bloodFlowRate.isActive = false; + _dialysateFlowRate.isActive = false; + _duration.isActive = false; + _heparinDispensingRate.isActive = false; + + _heparinBolusVolume.isActive = false; + _heparinStopTime.isActive = false; + + _salineBolus.isActive = false; + _acidConcentrate.setActive(false); + _bicarbonateConcentrate.setActive(false); + _dialyzerType.setActive(false); + + _dialysateTemperature.isActive = false; + _arterialPressureLimits.isLowActive = false; + _arterialPressureLimits.isHighActive = false; + _venousPressureLimits.isLowActive = false; + _venousPressureLimits.isHighActive = false; + _bloodPressureMeasurementInterval.isActive = false; + _rinsebackFlowRate.isActive = false; + + } + + onFwValidationSuccess: { + _bloodFlowRate .setValid (true) + _dialysateFlowRate .setValid (true) + _duration .setValid (true) + _heparinDispensingRate .setValid (true) + + _heparinBolusVolume .setValid (true) + _heparinStopTime .setValid (true) + + _salineBolus .setValid (true) + _acidConcentrate .setValid (true) + _bicarbonateConcentrate .setValid (true) + _dialyzerType .setValid (true) + + _dialysateTemperature .setValid (true) + // _arterialPressureLimits .setLowValid (true) + // _arterialPressureLimits .setHighValid(true) + // _venousPressureLimits .setLowValid (true) + // _venousPressureLimits .setHighValid(true) + _bloodPressureMeasurementInterval .setValid (true) + _rinsebackFlowRate .setValid (true) + } + + onFwValidationFailed: { + } + + onBloodFlowRate_ValidationFailed: { + _bloodFlowRate.setValid(false) + } + + onDialysateFlowRate_ValidationFailed: { + _dialysateFlowRate.setValid(false) + } + + onDuration_ValidationFailed: { + _duration.setValid(false) + } + + onHeparinDispensingRate_ValidationFailed: { + _heparinDispensingRate.setValid(false) + } + + onHeparinBolusVolume_ValidationFailed: { + _heparinBolusVolume.setValid(false) + } + + onHeparinStopTime_ValidationFailed: { + _heparinStopTime.setValid(false) + } + + onSalineBolusVolume_ValidationFailed: { + _salineBolus.setValid(false) + } + + onAcidConcentrate_ValidationFailed: { + _acidConcentrate.setValid(false) + } + + onBicarbonateConcentrate_ValidationFailed: { + _bicarbonateConcentrate.setValid(false) + } + + onDialyzerType_ValidationFailed: { + _dialyzerType.setValid(false) + } + + onDialysateTemp_ValidationFailed: { + _dialysateTemperature.setValid(false) + } + + onArterialPressureLimitLow_ValidationFailed: { + _arterialPressureLimits.setLowValid(false) + } + + onArterialPressureLimitHigh_ValidationFailed: { + _arterialPressureLimits.setHighValid(false) + } + + onVenousPressureLimitLow_ValidationFailed: { + _venousPressureLimits.setLowValid(false) + } + + onVenousPressureLimitHigh_ValidationFailed: { + _venousPressureLimits.setHighValid(false) + } + + onBloodPressureMeasureInterval_ValidationFailed: { + _bloodPressureMeasurementInterval.setValid(false) + } + + onRinsebackFlowRate_ValidationFailed: { + _rinsebackFlowRate.setValid(false) + } + + onScrollToParameter: { + let prefix = "data."; + let contentYMargin = 80; + let newContentY = 0; + + if (parameter === prefix+"bloodFlowRate") { + newContentY = _bloodFlowRate.mapToItem(_bloodFlowRate.parent, 0, 0).y; + } + else if (parameter === prefix+"dialysateFlowRate") { + newContentY = _dialysateFlowRate.mapToItem(_dialysateFlowRate.parent, 0, 0).y; + } + else if (parameter === prefix+"duration") { + newContentY = _duration.mapToItem(_duration.parent, 0, 0).y; + } + else if (parameter === prefix+"heparinDispensingRate") { + newContentY = _heparinDispensingRate.mapToItem(_heparinDispensingRate.parent, 0, 0).y; + } + else if (parameter === prefix+"heparinBolusVolume") { + newContentY = _heparinBolusVolume.mapToItem(_heparinBolusVolume.parent, 0, 0).y; + } + else if (parameter === prefix+"heparinStopTime") { + newContentY = _heparinStopTime.mapToItem(_heparinStopTime.parent, 0, 0).y; + } + else if (parameter === prefix+"salineBolus") { + newContentY = _salineBolus.mapToItem(_salineBolus.parent, 0, 0).y; + } + else if (parameter === prefix+"acidConcentrate") { + newContentY = _acidConcentrate.mapToItem(_acidConcentrate.parent, 0, 0).y; + } + else if (parameter === prefix+"bicarbonateConcentrate") { + newContentY = _bicarbonateConcentrate.mapToItem(_bicarbonateConcentrate.parent, 0, 0).y; + } + else if (parameter === prefix+"dialyzerType") { + newContentY = _dialyzerType.mapToItem(_dialyzerType.parent, 0, 0).y; + } + else if (parameter === prefix+"dialysateTemp") { + newContentY = _dialysateTemperature.mapToItem(_dialysateTemperature.parent, 0, 0).y; + } + else if (parameter === prefix+"arterialPressureLimitLow" || + parameter === prefix+"arterialPressureLimitHigh") { + newContentY = _arterialPressureLimits.mapToItem(_arterialPressureLimits.parent, 0, 0).y; + } + else if (parameter === prefix+"venousPressureLimitLow" || + parameter === prefix+"venousPressureLimitHigh") { + newContentY = _venousPressureLimits.mapToItem(_venousPressureLimits.parent, 0, 0).y; + } + else if (parameter === prefix+"bloodPressureMeasureInterval") { + newContentY = _bloodPressureMeasurementInterval.mapToItem(_bloodPressureMeasurementInterval.parent, 0, 0).y; + } + else if (parameter === prefix+"rinsebackFlowRate") { + newContentY = _rinsebackFlowRate.mapToItem(_rinsebackFlowRate.parent, 0, 0).y; + } + else { + return; + } + _flickable.contentY = newContentY - contentYMargin; + } + } +} Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentPrime.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/create/PreTreatmentPrime.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentPrime.qml (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -0,0 +1,124 @@ +/*! + * + * Copyright (c) 2019-2020 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 PreTreatmentPrime.qml + * \author (last) Behrouz NematiPour + * \date (last) 12-Jan-2021 + * \author (original) Peter Lucia + * \date (original) 03-Aug-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief ManagerHome is the screen + * which is the default screen in the "Manager" stack + */ +PreTreatmentBase { id: _root + objectName: "_PreTreatmentPrime" + + signal continueClicked() + + header.stepName : Variables.preTreatmentStepLabelPriming + + Text { id: _titleText + anchors { + top: _root.top + topMargin: 150 + horizontalCenter: parent.horizontalCenter + } + text: qsTr("Priming") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTitle + } + + ProgressCircle { id: _circle + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _titleText.bottom + anchors.topMargin: 25 + minimum: 0 + maximum: vPriming.secondsTotal + diameter: 100 + value: vPriming.primingComplete ? vPriming.secondsTotal : vPriming.secondsRemaining + + PrimingTimer { id: _timeText + anchors.centerIn: parent + seconds : vPriming.secondsRemaining + completed: vPriming.primingComplete + } + } + + Column { id: _checklist + spacing: 20 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _circle.bottom + anchors.topMargin: 30 + + CheckListItem { id: _checking_installation + anchors.horizontalCenter: parent.horizontalCenter + color : Colors.transparent + text: qsTr("Checking installation") + completed: vPriming.checkingInstallationComplete + } + + CheckListItem { id: _creating_dialysate + anchors.horizontalCenter: parent.horizontalCenter + color : Colors.transparent + text : qsTr("Creating dialysate") + completed: vPriming.creatingDialysateComplete + } + + CheckListItem { id: _priming_lines + anchors.horizontalCenter: parent.horizontalCenter + color : Colors.transparent + text : qsTr("Priming lines") + completed: vPriming.primingLinesComplete + } + } + + Text { id: _priming_complete + objectName: "_primingCompleteText" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _checklist.bottom + anchors.topMargin: 45 + text: qsTr("Priming Complete!") + color: vPriming.primingComplete ? Colors.textMain : Colors.transparent + font.pixelSize: Fonts.primingFontSize + } + + TouchRect { id : _continueRect + objectName: "_treatmentPrimeContinueButton" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: _priming_complete.bottom + anchors.topMargin: 50 + width: 490 + height: 60 + text.text: vPriming.continueBtnText + disabled : false // it has not been implemeted in the FW so it is enabled always. + // /*! vPriming.primingComplete // */vPriming.continueEnabled + onEnabledChanged: { + if (enabled) { + borderColor = Colors.primingReady + textColor = Colors.primingReady + } else { + borderColor = Colors.primingNotReady + textColor = Colors.primingNotReady + } + } + + button.onClicked: { + _root.continueClicked() + } + } +} Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentUltrafiltration.qml =================================================================== diff -u --- sources/gui/qml/pages/pretreatment/create/PreTreatmentUltrafiltration.qml (revision 0) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentUltrafiltration.qml (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -0,0 +1,123 @@ +/*! + * + * Copyright (c) 2019-2020 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 PreTreatmentUltrsafiltration.qml + * \author (last) Behrouz NematiPour + * \date (last) 12-Jan-2021 + * \author (original) Peter Lucia + * \date (original) 03-Aug-2020 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief ManagerHome is the screen + * which is the default screen in the "Manager" stack + */ +PreTreatmentBase { id: _root + objectName: "_PreTreatmentUltrafiltration" + + property alias ufVolume : _volumeSlider.value + + signal startClicked() + + QtObject { id: _private + property real minimum : 0.000 + property real maximum : 8.000 + } + + header.stepName : Variables.preTreatmentStepLabelUltrafiltration + + Text { id: _textTitle + visible : true + color : "white" + text : qsTr("Begin Treatment") + font.pixelSize : Fonts.fontPixelTitle + anchors { + horizontalCenter: parent.horizontalCenter + top : parent.top + topMargin : 150 + } + } + + Text { id: _textLabel + visible : true + color : "white" + text : qsTr("Ultrafiltration Volume") + " " + Variables.unitTextUltrafiltrationVolume + font { + pixelSize : Fonts.createTreatmentFontSize + } + anchors { + left : _volumeSlider.left + bottom : _volumeSlider.top + bottomMargin : 45 + } + } + + Text { id: _textValue + visible : true + color : "white" + text : _root.ufVolume.toFixed(Variables.ultrafiltrationPrecision) + font { + pixelSize : Fonts.createTreatmentFontSize + } + anchors { + right : _volumeSlider.right + bottom : _volumeSlider.top + bottomMargin : 45 + } + } + + Slider { id: _volumeSlider + anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top + topMargin: 425 + } + isActive: false + width : parent.width / 2 + height : 5 + step : 0.100 + stepSnap: true + ticks : false + diameter: Variables.sliderCircleDiameter + decimal : Variables.ultrafiltrationPrecision + minimum : _private.minimum + maximum : _private.maximum + minText.font.pixelSize: Fonts.fontPixelFluidText + maxText.font.pixelSize: Fonts.fontPixelFluidText + onPressed: isActive = true + } + + + TouchRect { id: _startButton + width : 515 + height : 70 + anchors { + top: parent.top + topMargin: 650 + horizontalCenter: parent.horizontalCenter + } + disabled: ! _volumeSlider.isActive + backgroundColor: Colors.backgroundButtonSelect + text { + text: qsTr("START") + font.weight : Font .DemiBold + font.pixelSize: Fonts.fontPixelUltrafiltrationAdjustmentButton + } + onClicked: { + _root.startClicked() + } + } +} Fisheye: Tag a25dee6ed9a8cd343056d92bc3a78617eed66a6f refers to a dead (removed) revision in file `sources/gui/qml/pages/treatment/TreatmentBegin.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag a25dee6ed9a8cd343056d92bc3a78617eed66a6f refers to a dead (removed) revision in file `sources/gui/qml/pages/treatment/TreatmentConfirm.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag a25dee6ed9a8cd343056d92bc3a78617eed66a6f refers to a dead (removed) revision in file `sources/gui/qml/pages/treatment/TreatmentCreate.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag a25dee6ed9a8cd343056d92bc3a78617eed66a6f refers to a dead (removed) revision in file `sources/gui/qml/pages/treatment/TreatmentPrime.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -reefe8acbe5b10deb379c5e4ceabeaa95d429410e -ra25dee6ed9a8cd343056d92bc3a78617eed66a6f --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision eefe8acbe5b10deb379c5e4ceabeaa95d429410e) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision a25dee6ed9a8cd343056d92bc3a78617eed66a6f) @@ -31,6 +31,7 @@ import "qrc:/globals" import "qrc:/components" import "qrc:/pages/treatment/adjustments" +import "qrc:/pages/pretreatment/create" /*! * \brief TreatmentStack is the screen @@ -112,24 +113,24 @@ } } - TreatmentCreate { id: _treatmentCreate + PreTreatmentCreate { id: _pretreatmentCreate onBackClicked : {vTreatmentCreate.doCancelSelectingParameters() } onContinueClicked : {vTreatmentCreate.doFinishedCreate(); } } - TreatmentConfirm { id: _treatmentConfirm + PreTreatmentConfirm { id: _pretreatmentConfirm onBackClicked : {vTreatmentCreate.doCancelConfirmParameters() } onConfirmClicked : {vTreatmentCreate.doFinishedConfirm(); } } - TreatmentPrime { id: _treatmentPrime + PreTreatmentPrime { id: _pretreatmentPrime onBackClicked : {vTreatmentCreate.doRequestPop() } onContinueClicked : {vTreatmentCreate.doFinishedPrime(); } } - TreatmentBegin { id: _treatmentBegin + PreTreatmentUltrafiltration { id: _pretreatmentUltrafiltration onBackClicked : {vTreatmentCreate.doRequestPop() } - onStartClicked : {vTreatmentAdjustmentUltrafiltrationInit.doAdjustment(_treatmentBegin.ufVolume) } + onStartClicked : {vTreatmentAdjustmentUltrafiltrationInit.doAdjustment(_pretreatmentUltrafiltration.ufVolume) } } //// Treatment Adjustment Dialogs @@ -237,13 +238,13 @@ onAdjustmentTriggered : { // the maximum ultrafiltration volume has to be set/revert regardless vTreatmentUltrafiltration.maximum = vTreatmentAdjustmentUltrafiltrationInit.volume - _treatmentBegin.ufVolume = vTreatmentAdjustmentUltrafiltrationInit.volume + _pretreatmentUltrafiltration.ufVolume = vTreatmentAdjustmentUltrafiltrationInit.volume // but only if it has been accepted it will navigate if (vTreatmentAdjustmentUltrafiltrationInit.adjustment_Accepted) { vTreatmentCreate.doStartTreatment() } else { - _treatmentBegin.reasonText = vTreatmentAdjustmentUltrafiltrationInit.text() + _pretreatmentUltrafiltration.reasonText = vTreatmentAdjustmentUltrafiltrationInit.text() } } } @@ -317,10 +318,10 @@ } Connections { target: vTreatmentCreate - onShowCreate : { push(_treatmentCreate) } - onShowConfirm : { push(_treatmentConfirm) } - onShowPrime : { push(_treatmentPrime) } - onShowBegin : { push(_treatmentBegin) } + onShowCreate : { push(_pretreatmentCreate) } + onShowConfirm : { push(_pretreatmentConfirm) } + onShowPrime : { push(_pretreatmentPrime) } + onShowBegin : { push(_pretreatmentUltrafiltration) } onPop : { pop() } onShowTreatmentStart : { push(_treatmentStart) } }