Index: sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml =================================================================== diff -u -r9d27f14c2b528c0f199004614f10d55589e08614 -r832723626f603fdd27f38a3103a6507a116c9660 --- sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 9d27f14c2b528c0f199004614f10d55589e08614) +++ sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 832723626f603fdd27f38a3103a6507a116c9660) @@ -28,62 +28,223 @@ ScreenItem { id: _root objectName: "_TreatmentBloodPrime" - Text { id: _title - anchors { - top: parent.top - topMargin: 65 - horizontalCenter: parent.horizontalCenter + property alias notification: _notification + + signal incrementRate (real newValue) + signal decrementRate (real newValue) + signal pause () + signal resume () + + 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 + runAnimation : vTDTreatmentStates.bpPaused + 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 + + TimeText { id: _timeout + objectName : "_timeout" + anchors { + bottom : _volumeText.top + bottomMargin : Variables.defaultMargin * 2 + horizontalCenter: parent.horizontalCenter + } + textPixelSize : 30 + textWeight : Font.Normal + secondsVisible : false + seconds : vTreatmentBloodPrime.countdown * 60 + visible : vTreatmentBloodPrime.timeout + } + + NotificationBarSmall { id: _pausedNotification + objectName : "_pausedNotification" + anchors { + top : _volumeText.bottom + bottom : undefined + topMargin : _timeout.anchors.bottomMargin + } + visible : vTDTreatmentStates.bpPaused + height : 25 + color : "transparent" + imageDiameter : 25 + imageTopMargin : 4 + imageSource : "qrc:/images/iPauseOrange" + text : qsTr("Blood Prime Paused") + textColor : Colors.mainTreatmentOrange + textfontSize : 22 + textfontWeight : Font.Medium + } } - } - 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 : _pauseResumeButton.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.decrementRate(_bloodFlowRangedValue.decrementedValue()) } + } + + ArrowButton { id: _incrementFlowRateButton + objectName : "_incrementFlowRateButton" + anchors { + right : parent.right + rightMargin : _decrementFlowRateButton.anchors.leftMargin + verticalCenter : _flowRateValue.verticalCenter + } + rightArrow : true + enabled : _bloodFlowRangedValue.canIncrement + + onClicked : { _root.incrementRate(_bloodFlowRangedValue.incrementedValue()) } + } + } + + TouchRect { id: _pauseResumeButton + objectName: "_pauseResumeButton" + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + margins : Variables.defaultMargin * 1.5 + } + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + text { + text : vTDTreatmentStates.bpPaused ? qsTr("Resume Blood Prime") : qsTr("Pause Blood Prime") + font.weight : Font.Medium + } + isDefault : true + enabled : true + + onClicked : { vTDTreatmentStates.bpPaused ? _root.resume() : _root.pause() } + } + } + + 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 } }