Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rdb92783a0a9dab0ddf2b68c51d15b1ae1cb3ddcc -rbd476995001c165188e4c86010bf8b0505d2ca35 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision db92783a0a9dab0ddf2b68c51d15b1ae1cb3ddcc) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision bd476995001c165188e4c86010bf8b0505d2ca35) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2022 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) 01-Mar-2021 + * \date (last) 05-Apr-2022 * \author (original) Behrouz NematiPour - * \date (original) 27-Jan-2020 + * \date (original) 12-Jan-2021 * */ @@ -113,8 +113,9 @@ objectName : "_heparinDispensingRate" label : qsTr("Heparin Dispensing Rate") flickable : _flickable - unit : Variables.unitTextDispencingRate + unit : Variables.unitTextDispensingRate value : vTreatmentCreate.heparinDispensingRate + decimal : Variables.heparinPrecision minimum : vTreatmentCreate.heparinDispensingRateMin maximum : vTreatmentCreate.heparinDispensingRateMax step : vTreatmentCreate.heparinDispensingRateRes @@ -128,6 +129,7 @@ flickable : _flickable unit : Variables.unitTextFluid value : vTreatmentCreate.heparinBolusVolume + decimal : Variables.heparinPrecision minimum : vTreatmentCreate.heparinBolusVolumeMin maximum : vTreatmentCreate.heparinBolusVolumeMax step : vTreatmentCreate.heparinBolusVolumeRes @@ -172,7 +174,6 @@ GridSelection { id : _heparinType objectName : "_heparinTypeRect" title : qsTr("Heparin Type") - rowCount : 1 labels : vTreatmentCreate.heparinTypeOptions onClicked : vTreatmentCreate.heparinType = curIndex } @@ -187,21 +188,19 @@ GridSelection { id: _bicarbonateConcentrate objectName : "_bicarbonateConcentrateRect" title : qsTr("Bicarbonate Concentrate") - rowCount : 1 - colCount : 2 labels : vTreatmentCreate.bicarbonateConcentrateOptions onClicked : vTreatmentCreate.bicarbonateConcentrate = curIndex } GridSelection { id: _dialyzerType objectName : "_dialyzerTypeRect" - title : qsTr("Dialyzer Type") - rowCount : 3 - colCount : 2 - labels : vTreatmentCreate.dialyzerTypeOptions + title : qsTr("Dialyzer Type") + labels : vTreatmentCreate.dialyzerTypeOptions onClicked : vTreatmentCreate.dialyzerType = curIndex } + Item { height: 1; width: 1 /* TODO : there is a design flaw in here, this is a workaround */ } + SliderCreateTreatment { id: _dialysateTemperature objectName : "_dialysateTemperature" label : qsTr("Dialysate Temperature") @@ -215,15 +214,37 @@ onReleased : vTreatmentCreate.dialysateTemp = value } + // TODO : This has to be a Component Column { id: _arterialColumn spacing: 45 anchors.horizontalCenter: parent.horizontalCenter - Text { id: _arterialLabel - visible : true - color : Colors.textMain - text : qsTr("Arterial Pressure Limits") + " " + "(" + Variables.unitTextBloodPressure + ")" - font.pixelSize : Fonts.fontPixelFluidText - anchors.left : _arterialPressureLimits.left + Row { id: _arterialTitleRow + function setColor() { + let slider = _arterialPressureLimits + let color = Colors.textDisableButton + if ( slider.minAdjusted && slider.maxAdjusted ) { + color = Colors.textMain + } + return color + } + width : parent.width + height : _arterialLabel.height + anchors.left: parent.left + Text { id: _arterialLabel + visible : true + width : parent.width/2 + color : _arterialTitleRow.setColor() + text : qsTr("Arterial Pressure Limits") + font.pixelSize : Fonts.fontPixelFluidText + } + Text { id: _arterialUnit + visible : true + width : parent.width/2 + color : _arterialLabel.color + text : Variables.unitTextBloodPressure + font.pixelSize : Fonts.fontPixelFluidText + horizontalAlignment: Text.AlignRight + } } RangeSlider { id: _arterialPressureLimits objectName : "_arterialPressureLimitsSlider" @@ -234,7 +255,7 @@ anchors.horizontalCenter: parent.horizontalCenter ticks : true stepSnap : true - hasAdjusted : true + hasAdjust : true // Texts lowerText.visible : true @@ -250,12 +271,10 @@ 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 @@ -281,15 +300,37 @@ } } + // TODO : This has to be a Component Column { id: _venousColumn spacing: 45 anchors.horizontalCenter: parent.horizontalCenter - Text { id: _venousLabel - visible : true - color : Colors.textMain - text : qsTr("Venous Pressure Limits") + " " + "(" + Variables.unitTextBloodPressure + ")" - font.pixelSize : Fonts.fontPixelFluidText - anchors.left : _venousPressureLimits.left + Row { id: _venousTitleRow + function setColor() { + let slider = _venousPressureLimits + let color = Colors.textDisableButton + if ( slider.minAdjusted && slider.maxAdjusted ) { + color = Colors.textMain + } + return color + } + width : parent.width + height : _venousLabel.height + anchors.left: parent.left + Text { id: _venousLabel + visible : true + width : parent.width/2 + color : _venousTitleRow.setColor() + text : qsTr("Venous Pressure Limits") + font.pixelSize : Fonts.fontPixelFluidText + } + Text { id: _venousUnit + visible : true + width : parent.width/2 + color : _venousTitleRow.setColor() + text : Variables.unitTextBloodPressure + font.pixelSize : Fonts.fontPixelFluidText + horizontalAlignment: Text.AlignRight + } } RangeSlider { id: _venousPressureLimits objectName: "_venousPressureLimitsSlider" @@ -300,7 +341,7 @@ anchors.horizontalCenter: parent.horizontalCenter ticks : true stepSnap : true - hasAdjusted : true + hasAdjust : true // Texts lowerText.visible : true @@ -316,12 +357,10 @@ 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 @@ -443,10 +482,10 @@ onBicarbonateConcentrate_ValidationFailed : _bicarbonateConcentrate .valid = false onDialyzerType_ValidationFailed : _dialyzerType .valid = false onDialysateTemp_ValidationFailed : _dialysateTemperature .valid = false - onArterialPressureLimitLow_ValidationFailed : _arterialPressureLimits .setLowValid ( false ) - onArterialPressureLimitHigh_ValidationFailed : _arterialPressureLimits .setHighValid ( false ) - onVenousPressureLimitLow_ValidationFailed : _venousPressureLimits .setLowValid ( false ) - onVenousPressureLimitHigh_ValidationFailed : _venousPressureLimits .setHighValid ( false ) + // onArterialPressureLimitLow_ValidationFailed : _arterialPressureLimits .setLowValid ( false ) + // onArterialPressureLimitHigh_ValidationFailed : _arterialPressureLimits .setHighValid ( false ) + // onVenousPressureLimitLow_ValidationFailed : _venousPressureLimits .setLowValid ( false ) + // onVenousPressureLimitHigh_ValidationFailed : _venousPressureLimits .setHighValid ( false ) onBloodPressureMeasureInterval_ValidationFailed : _bloodPressureInterval .valid = false onRinsebackFlowRate_ValidationFailed : _rinsebackFlowRate .valid = false onScrollToParameter: {