Index: leahi.qrc
===================================================================
diff -u -r7db80dd579054dd4754ae4d135a4a3e647f09b5f -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348
--- leahi.qrc (.../leahi.qrc) (revision 7db80dd579054dd4754ae4d135a4a3e647f09b5f)
+++ leahi.qrc (.../leahi.qrc) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348)
@@ -156,6 +156,7 @@
sources/gui/qml/components/LabelValue.qml
sources/gui/qml/components/ArrowButton.qml
sources/gui/qml/components/HeaderBar.qml
+ sources/gui/qml/components/SliderUfAdjustment.qml
sources/gui/qml/compounds/PressureRangeSlider.qml
Index: sources/gui/qml/components/ProgressBarEx.qml
===================================================================
diff -u -r23f8a6036e22f80c3c5fd2834a2980bb62d2a34d -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348
--- sources/gui/qml/components/ProgressBarEx.qml (.../ProgressBarEx.qml) (revision 23f8a6036e22f80c3c5fd2834a2980bb62d2a34d)
+++ sources/gui/qml/components/ProgressBarEx.qml (.../ProgressBarEx.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348)
@@ -43,6 +43,7 @@
minimum : _root.minimum
maximum : _root.maximum
value : _root.valueEx
+ radius : _root.radius
color : Colors.highlightMedProgressBar
margin : 0
maxText.visible : visible
Index: sources/gui/qml/components/Slider.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348
--- sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348)
@@ -25,6 +25,7 @@
*/
RangeRect { id: _root
property real value : _progressRect.value
+ property real minStop : undefined
property real defaultValue : _root.minimum
property real step : 1
@@ -53,6 +54,7 @@
property bool isRoundedEnds : true
property bool hasBorder : true
property color borderColor : Colors.borderDisableButton
+ property color highlightColor : Colors.sliderHighlightColor
signal activeChanged()
signal handleSelected()
@@ -103,7 +105,7 @@
function setActiveVisuals(active) {
if (active) {
- color = Colors.sliderHighlightColor
+ color = _root.highlightColor
handlerColor = Colors.createTreatmentActive
} else {
color = Colors.createTreatmentInactive
@@ -189,6 +191,11 @@
let mMinimum = Number(_root.minimum.toFixed(decimal))
let mMaximum = Number(_root.maximum.toFixed(decimal))
+ // if there is a minimum stop, then adjust the slider minimum to that value
+ if (minStop && mMinimum < minStop) {
+ mMinimum = minStop
+ }
+
// the center of the handler is aligned on the snap point and half width shall be used to set as min not the entire width.
// also half of the hadler is out of slider min position when set on min, which proves the same as above.
if(x < ( _handler.width / 2 ) ) {
@@ -258,7 +265,7 @@
ProgressRect { id: _progressRect
property real previousSliderValue: Number.NaN
value : minimum
- color : Colors.sliderHighlightColor
+ color : _root.highlightColor
decimal : _root.decimal
minimum : _root.minimum
Fisheye: Tag 3da1e6ce80a0edef25d2ade3da094e18791f3553 refers to a dead (removed) revision in file `sources/gui/qml/components/SliderUfAdjustment.qml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -r7db80dd579054dd4754ae4d135a4a3e647f09b5f -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 7db80dd579054dd4754ae4d135a4a3e647f09b5f)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348)
@@ -142,6 +142,8 @@
readonly property color ufVolumeGoalText : "#f5be59"
readonly property color ufNotificationBarBg : "#0f2841"
readonly property color ufProgressBarFill : "#467bbe"
+ readonly property color ufAdjustmentDeltaFill : "#747974"
+ readonly property color ufAdjustmentProgressBarBg : "#2c517b"
// ---------- < PRS > Related Section ----------
// Alarm priority colors
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -r3e91f569d10fe5b76298b85ee3a6875f80e33063 -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 3e91f569d10fe5b76298b85ee3a6875f80e33063)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348)
@@ -144,6 +144,8 @@
readonly property int ultraFiltrationEditSliderHeight : sliderDefaultBodyHeight // to be consistent with other sliders
readonly property int ultrafiltrationButtonWidth : 300
readonly property int ultrafiltrationButtonHeight : 60
+ readonly property int ultrafiltrationRangeMarkerWidth : 4
+ readonly property int ultrafiltrationRangeMarkerHandleWidth : 12
readonly property int silenceIconMargin : 10
readonly property int notificationBarIconMargin : 10
Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml
===================================================================
diff -u -r86274f18e9356126c41d848bc78bfba318638aee -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348
--- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.qml) (revision 86274f18e9356126c41d848bc78bfba318638aee)
+++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationEdit.qml (.../TreatmentAdjustmentUltrafiltrationEdit.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348)
@@ -30,114 +30,73 @@
contentItem.objectName: "TreatmentAdjustmentUltrafiltrationEdit" //SquishQt testability
QtObject { id: _private
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 min : vTreatmentUltrafiltration.minimum
- property real val : vTreatmentUltrafiltration.volumeRemoved
- property real max : vTreatmentUltrafiltration.maximum
+ property real setVolume : vTreatmentUltrafiltration.setVolume
+ property real volumeRemoved : vTreatmentUltrafiltration.volumeRemoved
}
signal nextClicked(real vVolume)
function reset() {
- _volumeSlider.value = _private.max
+ _setVolumeSlider.reset(_private.setVolume)
}
closeVisible : false
confirmVisible : false
backVisible : true
information {
- visible : true && information.text && ! notification.visible
- imageSource : ufInfoImageSource
- text : ufInfoText
+ visible : true && information.text && ! notification.visible
+ imageSource : ufInfoImageSource
+ text : ufInfoText
+ radius : 0
+ color : Colors.ufNotificationBarBg
+ textColor : Colors.ufVolumeGoalText
+ textfontSize : Fonts.fontPixelUltrafiltrationAdjustmentNotification
+ textfontWeight : Font.Normal
}
- titleText : qsTr("ULTRAFILTRATION VOLUME") + " " + Variables.unitTextUltrafiltrationVolume
+ titleText : qsTr("Ultrafiltration Volume ") + Variables.unitTextUltrafiltrationVolume
- ProgressBarEx { id: _rangeProgressBar
- width : Variables.ultrafiltrationProgressbarWidth
- height : Variables.ultraFiltrationProgressBarHeight
+ TreatmentAdjustmentUltrafiltrationMetrics { id: _ufMetrics
anchors {
- top : parent.top
- topMargin : 250
- right : parent.right
- rightMargin : _volumeSliderArrows.width + Variables.sliderAdjustButtonSpacing*2
+ top : parent.top
+ topMargin : Variables.defaultMargin * 2
+ horizontalCenter: parent.horizontalCenter
}
- decimal : _private.decimal
- 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
+ setVolume : _setVolumeSlider.value
+ volumeRemoved : _private.volumeRemoved
}
- Slider { id: _volumeSlider
- // TODO : These two values shall get from a model
- property int minGapValue: 0 // No gap for now.
- property int maxGapValue: 0 // No gap for now.
-
- readonly property int minPrgWidth: _rangeProgressBar.maximum - _rangeProgressBar.minimum
- readonly property int maxPrgWidth: _rangeProgressBar.maximum - _rangeProgressBar.minimum
- readonly property int minGapWidth: minPrgWidth > 0 ? (minGapValue * _rangeProgressBar.width) / minPrgWidth : 0
- readonly property int maxGapWidth: maxPrgWidth > 0 ? (maxGapValue * _rangeProgressBar.width) / maxPrgWidth : 0
-
+ SliderUfAdjustment { id: _setVolumeSlider
anchors {
- top: _rangeProgressBar.bottom
- topMargin: 50
+ top : _ufMetrics.bottom
+ topMargin : 160
+ left : parent.left
+ leftMargin : 80
+ right : parent.right
+ rightMargin : anchors.leftMargin
+ horizontalCenter: undefined
}
-
- 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.minAdjust + minGapValue
- maximum : _private.maxAdjust - maxGapValue
+ minimum : 0
+ minStop : _private.volumeRemoved
+ maximum : 20
+ defaultValue : { defaultValue =_private.setVolume } // set without binding
+ unit : Variables.unitVolume
}
- 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 : Colors.textMain
- text : _private.valAdjust.toFixed(_private.decimal)
- font {
- pixelSize : Fonts.fontPixelUltrafiltrationAdjustmentEditValue
- }
+ TouchRect { id: _continueButton
anchors {
+ top : _setVolumeSlider.bottom
+ topMargin : 110
horizontalCenter: parent.horizontalCenter
- top : parent.top
- topMargin : 150
}
- }
-
- TouchRect { id: _nextButton
- width : 530
- height : 95
- anchors {
- top: parent.top
- topMargin: 460
- horizontalCenter: parent.horizontalCenter
- }
- isDefault: true
+ width : Variables.ultrafiltrationButtonWidth
+ height : Variables.ultrafiltrationButtonHeight
text {
- text: qsTr("NEXT")
- font.weight : Font .DemiBold
- font.pixelSize: Fonts.fontPixelUltrafiltrationAdjustmentNextButton
+ text : qsTr("Continue")
+ font.weight : Font.DemiBold
}
+ isDefault : true
onClicked: nextClicked( _private.valAdjust.toFixed(_private.decimal) )
}
}
Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml
===================================================================
diff -u -r3e91f569d10fe5b76298b85ee3a6875f80e33063 -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348
--- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision 3e91f569d10fe5b76298b85ee3a6875f80e33063)
+++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationStart.qml (.../TreatmentAdjustmentUltrafiltrationStart.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348)
@@ -71,7 +71,7 @@
top : _ufMetrics.bottom
topMargin : 160
left : parent.left
- leftMargin : 60
+ leftMargin : 80
right : parent.right
rightMargin : anchors.leftMargin
}
@@ -81,7 +81,8 @@
maximum : _private.setVolume
value : _private.volumeRemoved
valueEx : 0
- color: Colors.ufProgressBarFill
+ color : Colors.ufProgressBarFill
+ bgColor : Colors.ufAdjustmentDeltaFill
minText {
font {
pixelSize : Fonts.fontPixelButton
@@ -97,10 +98,10 @@
text : _private.setVolume.toFixed(Variables.ultrafiltrationPrecision) + " " + Variables.unitVolume
}
marker {
- width : Variables.rangeMarkerWidthMidle
- handle.width : marker.width * 4
+ width : Variables.ultrafiltrationRangeMarkerWidth
+ handle.width : Variables.ultrafiltrationRangeMarkerHandleWidth
text {
- anchors.bottomMargin: marker.valueOnTop ? 10 : 0
+ anchors.bottomMargin: marker.valueOnTop ? 13 : 0
font {
pixelSize: Fonts.fontPixelUltrafiltrationRangeMarker
weight: Font.DemiBold