Index: sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml =================================================================== diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r09fc72d1410ab86f8de7b00dd7de4ea5612cf470 --- sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8) +++ sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 09fc72d1410ab86f8de7b00dd7de4ea5612cf470) @@ -28,62 +28,189 @@ ScreenItem { id: _root objectName: "_TreatmentBloodPrime" - Text { id: _title - anchors { - top: parent.top - topMargin: 65 - horizontalCenter: parent.horizontalCenter + property alias notification: _notification + + signal decreaseClicked () + signal increaseClicked () + signal pauseClicked () + + Connections { target: vTreatmentAdjustmentBloodFlowRate + function onAdjustmentTriggered ( vValue ) { + if (vTreatmentAdjustmentBloodFlowRate.adjustment_Accepted) { + _notification.text = "" + } + else { + _notification.text = vTreatmentAdjustmentBloodFlowRate.text() + } } - color: Colors.textMain - text: qsTr("Blood Priming") - font.pixelSize: Fonts.fontPixelTitle } - ProgressCircle { id: _circle - diameter: 335 - anchors.centerIn: parent - minimum : 0 - maximum : vTreatmentBloodPrime.target - value : vTreatmentBloodPrime.current - - Text { id: _textVolume - anchors.centerIn: parent - color: Colors.textMain - text: vTreatmentBloodPrime.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid) - font.pixelSize: 76 - font.weight: Font.ExtraLight + Column { id: _contentColumn + objectName : "_contentColumn" + anchors { + top : parent.top + topMargin : Variables.defaultMargin + horizontalCenter : parent.horizontalCenter } + spacing : Variables.defaultMargin * 2 - Text { id: _labelRate - anchors { - top: parent.bottom - topMargin: 20 - horizontalCenter: parent.horizontalCenter + ProgressCircle { id: _volumeProgress + objectName : "_volumeProgress" + anchors.horizontalCenter : parent.horizontalCenter + thickness : 35 + circleShadowColor : Colors.mainTreatmentLighterBlue + circleFillColor : Colors.mainTreatmentDarkerBlue + minimum : 0 + maximum : vTreatmentBloodPrime.target + value : vTreatmentBloodPrime.current + + Text { id: _volumeText + objectName : "_volumeText" + anchors.centerIn: parent + height : contentHeight + font { + pixelSize : 76 + weight : Font.Light + } + color : Colors.textMain + text : vTreatmentBloodPrime.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid) } - color: Colors.textMain - text: vTreatmentBloodFlow.setFlowRate.toFixed(0) + " " + qsTr(Variables.unitTextFlowRate) - font.pixelSize: 23 } - } - TreatmentPressures { id: _pressuresTouchArea - // maybe now it makes sense for the ranges to be displayed - // arterialLowerBound : 0 // requested to hide the bounds - // arterialUpperBound : 0 // requested to hide the bounds - // venousLowerBound : 0 // requested to hide the bounds - // venousUpperBound : 0 // requested to hide the bounds + Row { id: _bottomContentRow + objectName : "_bottomContentRow" + anchors.horizontalCenter : parent.horizontalCenter + spacing : Variables.defaultMargin -// isTouchable : false -// x : Variables.screenGridLeftColumnX -// y : Variables.screenGridRow1Y -// width : Variables.screenGridAreaWidth -// height : Variables.screenGridAreaHeightRow1 - } - Line { x: 0; y: Variables.screenGridRow1LineY; length: Variables.screenGridLineLength } + TreatmentSection { id: _flowRateSection + objectName : "_flowRateSection" + anchors.verticalCenter : parent.verticalCenter + width : 420 + height : 420 + header.title : qsTr("Blood Flow Rate" ) + header.showEdit : false + header { + title : qsTr("Rinseback Flow Rate") + showEdit : false + } - onVisibleChanged: { - if (visible) { - _mainMenu.hidden = true + RangedValue { id: _bloodFlowRangedValue + objectName : "_bloodFlowRangedValue" + precision : Variables.bloodFlowPrecision + rawMin : vTreatmentRanges.bloodFlowRateMin + rawMax : vTreatmentRanges.bloodFlowRateMax + rawStep : vTreatmentRanges.bloodFlowRateRes + rawValue : vTreatmentParametersSetPoint.bloodFlow + } + + Item { id: _flowRateContentArea + objectName : "_flowRateContentArea" + anchors { + top : _flowRateSection.header.bottom + bottom : _pauseButton.top + left : parent.left + right : parent.right + margins : Variables.defaultMargin + } + + Text { id: _flowRateValue + objectName : "_flowRateValue" + anchors.centerIn : parent + width : 200 + height : Variables.defaultButtonHeight + font { + pixelSize : Fonts.fontPixelVitals + weight : Font.Medium + } + color : Colors.textTextRectLabel + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + text : _bloodFlowRangedValue.value + } + + Text { id: _flowRateUnit + objectName : "_flowRateUnit" + anchors { + top : _flowRateValue.bottom + topMargin : Variables.defaultMargin + horizontalCenter : _flowRateValue.horizontalCenter + } + width : contentWidth + height : contentHeight + font { + pixelSize : Fonts.fontPixelContainerUnit + weight : Font.Thin + } + color : Colors.offWhite + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + text : Variables.unitTextFlowRate + } + + ArrowButton { id: _decrementFlowRateButton + objectName : "_decrementFlowRateButton" + anchors { + left : parent.left + leftMargin : Variables.defaultMargin * 3 + verticalCenter : _flowRateValue.verticalCenter + } + leftArrow : true + enabled : _bloodFlowRangedValue.canDecrement + + onClicked : { _root.decreaseClicked() } + } + + ArrowButton { id: _incrementFlowRateButton + objectName : "_incrementFlowRateButton" + anchors { + right : parent.right + rightMargin : _decrementFlowRateButton.anchors.leftMargin + verticalCenter : _flowRateValue.verticalCenter + } + rightArrow : true + enabled : _bloodFlowRangedValue.canIncrement + + onClicked : { _root.increaseClicked() } + } + } + + TouchRect { id: _pauseButton + objectName: "_pauseButton" + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + margins : Variables.defaultMargin * 1.5 + } + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + text { + text : qsTr("Pause Blood Prime") + font.weight : Font.Medium + } + isDefault : true + enabled : true + + onClicked : { _root.pauseClicked() } + } + } + + TreatmentSaline { id: _treatmentSaline + objectName : "_treatmentSaline" + anchors.verticalCenter : parent.verticalCenter + width : 285 + height : _flowRateSection.height + header.showEdit : false + } + + TreatmentPressures { id: _treatmentPressures + objectName : "_treatmentPressures" + anchors.verticalCenter : parent.verticalCenter + width : 750 + height : _flowRateSection.height + header.showEdit : false + } } } + + NotificationBarSmall { id: _notification } }