Index: sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml =================================================================== diff -u -r41a18f001483e96ccd4b08629b9f1e0ae20f3547 -r726dc38cf98a8f0a827b2efeecfd32996d0eee90 --- sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 41a18f001483e96ccd4b08629b9f1e0ae20f3547) +++ sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 726dc38cf98a8f0a827b2efeecfd32996d0eee90) @@ -30,9 +30,10 @@ property alias notification: _notification - signal decreaseClicked () - signal increaseClicked () - signal pauseClicked () + signal incrementRate (real newValue) + signal decrementRate (real newValue) + signal pause () + signal resume () Connections { target: vTreatmentAdjustmentBloodFlowRate function onAdjustmentTriggered ( vValue ) { @@ -59,6 +60,7 @@ anchors.horizontalCenter : parent.horizontalCenter thickness : 35 circleShadowColor : Colors.mainTreatmentLighterBlue + runAnimation : vTDTreatmentStates.bpPaused minimum : 0 maximum : vTreatmentBloodPrime.target value : vTreatmentBloodPrime.current @@ -74,6 +76,44 @@ color : Colors.textMain text : vTreatmentBloodPrime.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid) } + + 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 + + readonly property int countdown: vTreatmentBloodPrime.countdown + readonly property int timeout: vTreatmentBloodPrime.timeout + onCountdownChanged: { console.log("countdown=", countdown) } + onTimeoutChanged: { console.log("timeout=", 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 + } } Row { id: _bottomContentRow @@ -106,7 +146,7 @@ objectName : "_flowRateContentArea" anchors { top : _flowRateSection.header.bottom - bottom : _pauseButton.top + bottom : _pauseResumeButton.top left : parent.left right : parent.right margins : Variables.defaultMargin @@ -156,7 +196,7 @@ leftArrow : true enabled : _bloodFlowRangedValue.canDecrement - onClicked : { _root.decreaseClicked() } + onClicked : { _root.decrementRate(_bloodFlowRangedValue.decrementedValue()) } } ArrowButton { id: _incrementFlowRateButton @@ -169,12 +209,12 @@ rightArrow : true enabled : _bloodFlowRangedValue.canIncrement - onClicked : { _root.increaseClicked() } + onClicked : { _root.incrementRate(_bloodFlowRangedValue.incrementedValue()) } } } - TouchRect { id: _pauseButton - objectName: "_pauseButton" + TouchRect { id: _pauseResumeButton + objectName: "_pauseResumeButton" anchors { bottom : parent.bottom horizontalCenter: parent.horizontalCenter @@ -183,13 +223,13 @@ width : Variables.defaultButtonWidth height : Variables.defaultButtonHeight text { - text : qsTr("Pause Blood Prime") + text : vTDTreatmentStates.bpPaused ? qsTr("Resume Blood Prime") : qsTr("Pause Blood Prime") font.weight : Font.Medium } isDefault : true enabled : true - onClicked : { _root.pauseClicked() } + onClicked : { vTDTreatmentStates.bpPaused ? _root.resume() : _root.pause() } } }