Index: sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml =================================================================== diff -u -rc749ecd5dc413ce091250af652ccba4d96f7a582 -r200b0481616ac03872ad09baa168e0ae1ce6a2ee --- sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml (.../TreatmentFlowsComponent.qml) (revision c749ecd5dc413ce091250af652ccba4d96f7a582) +++ sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml (.../TreatmentFlowsComponent.qml) (revision 200b0481616ac03872ad09baa168e0ae1ce6a2ee) @@ -24,15 +24,32 @@ property bool showButtons : true property bool buttonsEnabled : true property bool dropShadowEnabled : true + property bool canOff : false + property bool runAnimation : false + property real pulseAlpha : 1 color : Colors.mainTreatmentLighterBlue radius : 5 + border { + width: 4 + color: _root.runAnimation ? Qt.rgba(255/255, 184/255, 54/255, pulseAlpha) : Colors.mainTreatmentLighterBlue + } + signal increment(real newValue) signal decrement(real newValue) + NumberAnimation on pulseAlpha { + from : 0.2 + to : 1 + duration : 1000 + loops : Animation.Infinite + easing.type : Easing.InOutQuad + running : _root.runAnimation + } + RangedValue { id: _rangedValue - objectName: "_rangedValue" + objectName : "_rangedValue" } Text { id: _title @@ -73,7 +90,9 @@ } height : Variables.contentHeight width : Variables.treatmentFlowsComponentWidth - topText : value !== undefined ? _root.value.toFixed(_root.precision) : Variables.emptyEntry + topText : value !== undefined ? _root.canOff && value < minimum ? qsTr("OFF") : + _root.value.toFixed(_root.precision) : + Variables.emptyEntry topTextFont.pixelSize : 60 topTextFont.weight : Font.Light bottomText : _root.unitText @@ -119,7 +138,7 @@ ArrowButton {id : _downArrowIcon objectName : "downArrowIcon" downArrow : true - enabled : buttonsEnabled && _rangedValue.canDecrement + enabled : buttonsEnabled && ( _root.canOff ? value >= minimum : _rangedValue.canDecrement ) onClicked : { _root.decrement(_rangedValue.decrementedValue()) } }