Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinseback.qml =================================================================== diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -rcba8451ac737fb0b618173a4bea37411fdaaf824 --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinseback.qml (.../EndTreatmentRinseback.qml) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinseback.qml (.../EndTreatmentRinseback.qml) (revision cba8451ac737fb0b618173a4bea37411fdaaf824) @@ -21,139 +21,224 @@ import "qrc:/globals" import "qrc:/components" import "qrc:/pages/endtreatment" +import "qrc:/pages/treatment" import "qrc:/pages/treatment/sections" /*! * \brief the end treatment rinseback screen */ EndTreatmentBase { id: _root - objectName: "_EndTreatmentRinseback" + objectName : "_EndTreatmentRinseback" + headerTitle : qsTr("Blood Return") + signal pauseClicked () signal resumeClicked () - signal endClicked () signal accelerateClicked () signal deccelerateClicked () + Column { id: _contentColumn + objectName : "_contentColumn" + anchors { + top : parent.top + topMargin : Variables.defaultMargin + horizontalCenter : parent.horizontalCenter + } + spacing : Variables.defaultMargin * 2 - title.text: qsTr("Rinseback") + ProgressCircle { id: _targetVolumeProgress + objectName : "_targetVolumeProgress" + anchors.horizontalCenter : parent.horizontalCenter + thickness : 35 + circleShadowColor : Colors.mainTreatmentLighterBlue + runAnimation : vTDTreatmentStates.rbPaused + minimum : 0 + maximum : vTreatmentRinseback.target + value : vTreatmentRinseback.current - hasTimeout : vTreatmentRinseback .timeoutTotal - timeoutValue : vTreatmentRinseback .timeoutCountDown * 60 + Text { id: _deliveredVolumeText + objectName : "_deliveredVolumeText" + anchors.centerIn: parent + height : contentHeight + font { + pixelSize : 76 + weight : Font.Light + } + color : vTDTreatmentStates.rbPaused ? Colors.ufVolumeGoalText : Colors.offWhite + text : vTreatmentRinseback.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid) + } - ImageText { id: _imageEnd - visible: ! vTDTreatmentStates.rbAdditional - anchors { - right : _root.right - top : _root.top - rightMargin : 45 - topMargin : 45 + TimeText { id: _timeout + objectName : "_timeout" + anchors { + bottom : _deliveredVolumeText.top + bottomMargin : Variables.defaultMargin * 2 + horizontalCenter: parent.horizontalCenter + } + textPixelSize : 30 + textWeight : Font.DemiBold + secondsVisible : false + seconds : vTreatmentRinseback.timeoutCountDown * 60 + visible : vTreatmentRinseback.timeoutTotal + } + + NotificationBarSmall { id: _pausedNotification + objectName : "_pausedNotification" + anchors { + top : _deliveredVolumeText.bottom + bottom : undefined + topMargin : _timeout.anchors.bottomMargin + } + visible : vTDTreatmentStates.rbPaused + height : 25 + color : "transparent" + imageDiameter : 25 + imageTopMargin : 4 + imageSource : "qrc:/images/iPauseOrange" + text : qsTr("Rinseback Paused") + textColor : Colors.mainTreatmentOrange + textfontSize : 22 + textfontWeight : Font.Medium + } } - diameter : Variables.rinsebackIconDiameterDefault - source : "qrc:/images/iRedCrossWCircle" - text : qsTr("End") - fontSize : Fonts.fontPixelRinsebackAdjustmentButton - onClicked : endClicked() - } - 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: _treatmentFlowRate + objectName : "_treatmentFlowRate" + anchors.verticalCenter : parent.verticalCenter + width : parent.width / 3 + height : _treatmentPressures.height + header { + title : qsTr("Blood Flow Rate") + showEdit : false + } + contentItem : Item { id: _flowRateItem + objectName: "_flowRatItem" - ProgressCircle { id: _circle - diameter: 335 - anchors { - horizontalCenter: parent.horizontalCenter - top : parent.top - topMargin : vTDTreatmentStates.rbAdditional ? - _root.height/2 - height/2 : // move the progress circle in the center of the screen - 170 - } + Item { id: _flowRateControlArea + objectName : "_flowRateControlArea" + anchors { + top : parent.top + bottom : _flowRateButtonRow.top + bottomMargin : Variables.defaultMargin * 2 + left : parent.left + leftMargin : Variables.defaultMargin + right : parent.right + rightMargin : anchors.leftMargin + } - minimum : 0 - maximum : vTreatmentRinseback.target - value : vTreatmentRinseback.current + Item { id: _flowRateValueItem + objectName : "_flowRateValueItem" + anchors.centerIn : parent + width : childrenRect.width + height : childrenRect.height - Text { id: _textVolume - anchors.centerIn: parent - color: Colors.textMain - text: vTreatmentRinseback.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid) - font.pixelSize: 76 - font.weight: Font.ExtraLight - } + ArrowButton { id: _decrementFlowRateButton + objectName : "_decrementFlowRateButton" + anchors { + left : parent.left + verticalCenter : _flowRateValue.verticalCenter + } + leftArrow : true + enabled : vTreatmentRinseback.rate > vTreatmentRanges.rinsebackFlowRateMin - Text { id: _labelRate - anchors { - top: parent.bottom - topMargin: 20 - horizontalCenter: parent.horizontalCenter - } - color: Colors.textMain - text: vTreatmentRinseback.rate.toFixed(0) + " " + qsTr(Variables.unitTextFlowRate) - font.pixelSize: 23 - } - } + onClicked : { _root.deccelerateClicked() } + } - Row { id: _buttonRow - spacing: 175 - anchors { - horizontalCenter: _root.horizontalCenter - bottom : _root.bottom - bottomMargin : Variables.notificationHeight + 55 // + the texts height - } + Text { id: _flowRateValue + objectName : "_flowRateValue" + anchors { + top : parent.top + left : _decrementFlowRateButton.right + leftMargin : Variables.defaultMargin + } + width : 200 + height : Variables.defaultButtonHeight + font { + pixelSize : Fonts.fontPixelVitals + weight : Font.Medium + } + color : Colors.textTextRectLabel + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + text : vTreatmentRinseback.rate + } - ImageText { id: _imageDecelerate - visible : vTDTreatmentStates.rbRun || vTDTreatmentStates.rbPaused - enabled : vTDTreatmentStates.rbRun - anchors.bottom : _buttonRow.bottom - diameter : Variables.rinsebackIconDiameterDefault - source : "qrc:/images/iDecelerate" - text : qsTr("Decelerate") - fontSize : Fonts.fontPixelRinsebackAdjustmentButton - onClicked : deccelerateClicked() - } + 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 + } - ImageText { id: _imageResume - visible : vTDTreatmentStates.rbPaused - anchors.bottom : _buttonRow.bottom - diameter : Variables.rinsebackIconDiameterResumePause - source : "qrc:/images/iResume" - text : qsTr("Resume") - fontSize : Fonts.fontPixelRinsebackAdjustmentButton - onClicked : resumeClicked() - } + ArrowButton { id: _incrementFlowRateButton + objectName : "_incrementFlowRateButton" + anchors { + left : _flowRateValue.right + leftMargin : _flowRateValue.anchors.leftMargin + verticalCenter : _flowRateValue.verticalCenter + } + rightArrow : true + enabled : vTreatmentRinseback.rate < vTreatmentRanges.rinsebackFlowRateMax - ImageText { id: _imagePause - visible : vTDTreatmentStates.rbRun // not sure if it's possible || vTDTreatmentStates.rbAdditional - anchors.bottom : _buttonRow.bottom - diameter : Variables.rinsebackIconDiameterResumePause - source : "qrc:/images/iPauseLightBlue" - text : qsTr("Pause") - fontSize : Fonts.fontPixelRinsebackAdjustmentButton - onClicked : pauseClicked() - } + onClicked : { _root.accelerateClicked() } + } + } + } - ImageText { id: _imageAccelerate - visible : vTDTreatmentStates.rbRun || vTDTreatmentStates.rbPaused - enabled : vTDTreatmentStates.rbRun - anchors.bottom : _buttonRow.bottom - diameter : Variables.rinsebackIconDiameterDefault - source : "qrc:/images/iAccelerate" - text : qsTr("Accelerate") - fontSize : Fonts.fontPixelRinsebackAdjustmentButton - onClicked : accelerateClicked() + Row { id: _flowRateButtonRow + objectName: "_flowRateButtonRow" + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + margins : Variables.defaultMargin + } + spacing: Variables.defaultMargin * 2 + + TouchRect { id: _pauseResumeButton + objectName: "_pauseResumeButton" + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight + text { + text : vTDTreatmentStates.rbPaused ? qsTr("Resume") : qsTr("Pause") + font.weight : Font.Medium + } + isDefault : true + enabled : true + + onClicked : { vTDTreatmentStates.rbPaused + ? _root.resumeClicked() + : _root.pauseClicked() + } + } + } + } + } + + TreatmentPressures { id: _treatmentPressures + objectName : "_treatmentPressures" + anchors.verticalCenter : parent.verticalCenter + width : 750 + height : 420 + header.showEdit : false + } } } }