Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.qml) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.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 TreatmentAdjustmentUltrafiltrationEdit.qml - * \author (last) Behrouz NematiPour - * \date (last) 20-Aug-2020 - * \author (original) Behrouz NematiPour - * \date (original) 15-May-2020 + * \file TreatmentAdjustmentUltrafiltrationEdit.qml + * \author (last) Vy + * \date (last) 20-Mar-2023 + * \author (original) Behrouz NematiPour + * \date (original) 15-May-2020 * */ @@ -29,19 +29,20 @@ TreatmentAdjustmentBase { id: _root contentItem.objectName: "TreatmentAdjustmentUltrafiltrationEdit" //SquishQt testability QtObject { id: _private - property int decimal : vTreatmentUltrafiltration.precision - property real minimum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min - property real maximum : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Max - property real value : vTreatmentUltrafiltration.ultrafiltration_RefUFVol + property int decimal : Variables.ultrafiltrationPrecision + property real minAdjust : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Min + property real valAdjust : _volumeSlider.value + property real maxAdjust : vTreatmentRanges.treatmentRanges_Ultrafiltration_Volume_Max - property real current : vTreatmentUltrafiltration.maximum - property real adjusted : _volumeSlider.value + property real min : vTreatmentUltrafiltration.minimum + property real val : vTreatmentUltrafiltration.ultrafiltration_RefUFVol + property real max : vTreatmentUltrafiltration.maximum } signal nextClicked(real vVolume) function reset() { - _volumeSlider.value = _private.current + _volumeSlider.value = _private.max } closeVisible : false @@ -54,22 +55,22 @@ text : ufInfoText } - titleText : qsTr("ULTRAFILTRATION VOLUME") + " " + Variables.unitTextUltrafiltrationVolume ProgressBarEx { id: _rangeProgressBar width : Variables.ultrafiltrationProgressbarWidth - height : Variables.progressbarHeight + height : Variables.ultraFiltrationProgressBarHeight anchors { - top: parent.top - topMargin: 250 - horizontalCenter: parent.horizontalCenter + top : parent.top + topMargin : 250 + right : parent.right + rightMargin : _volumeSliderArrows.width + Variables.sliderAdjustButtonSpacing*2 } decimal : _private.decimal - minimum : _private.minimum - maximum : _private.maximum - value : _private.value - valueEx : _private.adjusted + minimum : _private.min // suppose to be always 0 // DEN-6022 // _private.maxAdjust => _private.min + maximum : _private.maxAdjust + value : _private.val + valueEx : _private.valAdjust progressEx.maxText.visible: false } @@ -83,27 +84,36 @@ readonly property int minGapWidth: minPrgWidth > 0 ? (minGapValue * _rangeProgressBar.width) / minPrgWidth : 0 readonly property int maxGapWidth: maxPrgWidth > 0 ? (maxGapValue * _rangeProgressBar.width) / maxPrgWidth : 0 - height : 2 anchors { top: _rangeProgressBar.bottom topMargin: 50 } - bgColor: "#0c2135" x : _rangeProgressBar.x + minGapWidth + _rangeProgressBar.progressWidth width : _rangeProgressBar.width - maxGapWidth - minGapWidth - _rangeProgressBar.progressWidth + height : Variables.ultraFiltrationEditSliderHeight step : 0.100 stepSnap: true ticks : true decimal : _private.decimal - minimum : _private.minimum + minGapValue - maximum : _private.maximum - maxGapValue + minimum : _private.minAdjust + minGapValue + maximum : _private.maxAdjust - maxGapValue } + SliderArrows{ id: _volumeSliderArrows + visible : true + anchors.verticalCenter : _volumeSlider.verticalCenter + anchors.right : parent.right + anchors.rightMargin : Variables.sliderAdjustButtonSpacing + + onIncrementValue : _volumeSlider.incrementValue(true) + onDecrementValue : _volumeSlider.decrementValue(true) + } + Text { id: _textVolume visible : true - color : "white" - text : _private.adjusted.toFixed(_private.decimal) + color : Colors.textMain + text : _private.valAdjust.toFixed(_private.decimal) font { pixelSize : Fonts.fontPixelUltrafiltrationAdjustmentEditValue } @@ -122,14 +132,12 @@ topMargin: 460 horizontalCenter: parent.horizontalCenter } - - backgroundColor: Colors.backgroundButtonSelect - + isDefault: true text { text: qsTr("NEXT") font.weight : Font .DemiBold font.pixelSize: Fonts.fontPixelUltrafiltrationAdjustmentNextButton } - onClicked: nextClicked( _private.adjusted.toFixed(_private.decimal) ) + onClicked: nextClicked( _private.valAdjust.toFixed(_private.decimal) ) } }