Index: sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml =================================================================== diff -u -rc32be2f566add2f6c0cbad3bb90f7eb31d6bdc83 -rcb9c48c7c307690dcafcfd16ef412fe660291692 --- sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision c32be2f566add2f6c0cbad3bb90f7eb31d6bdc83) +++ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision cb9c48c7c307690dcafcfd16ef412fe660291692) @@ -32,17 +32,16 @@ readonly property bool isIdle : vTDTreatmentStates.sbIdle // other that max saline bolus delivered, // if saline started but still is waiting for pump the button is disabled so user won't tap multiple times. - readonly property bool isDisabled : vTDTreatmentStates.sbMaxReached readonly property bool isWaitPump : vTDTreatmentStates.sbWaitPump readonly property string unit : Variables.unitTextFluid property int valueDecimal : Variables.salinePrecision property int valueTarget : vTreatmentSaline.target || vTreatmentAdjustmentSaline.target property int valueCumulative: vTreatmentSaline.cumulative property int valueDelivered : vTreatmentSaline.delivered - property string buttonText : ( isDisabled || isWaitPump ) ? _private.textStart : - isStarted ? _private.textStop : - _private.textStart + property string buttonText : isIdle ? _private.textStart : + isStarted ? _private.textStop : + _root.buttonText header.title : qsTr("Saline" ) header.showEdit : false @@ -62,10 +61,11 @@ spacing : Variables.defaultMargin * 3 Text { id: _descriptionText - text : qsTr("Total Saline Delivered") + objectName: "salineDescriptionText" + text : isStarted ? ("%1").arg(qsTr("Delivering Saline")) : qsTr("Total Saline Delivered") height : Variables.contentHeight font.pixelSize : Fonts.fontPixelFluidText - color : Colors.fluidText + color : isStarted ? Colors.progressBarSaline : Colors.fluidText horizontalAlignment: Text.AlignHCenter } @@ -80,14 +80,14 @@ maxText.visible : false marker.visible : false color : Colors.progressBarSaline - maximum : valueCumulative - value : valueDelivered + maximum : valueTarget + value : isStarted ? valueDelivered : 0 decimal : _root.valueDecimal radius : 9 } Label { id: _valueDelivered - property real value: valueDelivered + property real value: isStarted ? valueDelivered : valueCumulative anchors { verticalCenter : _valueDeliveredUnit.verticalCenter @@ -114,12 +114,13 @@ } TouchRect { id: _startFluidButton - width : _fluidProgressBar.width - height : Variables.contentHeight + 10 + width : Variables.defaultButtonWidth + height : Variables.defaultButtonHeight radius : 9 text.textFormat : Text.RichText text.text : buttonText isDefault : true + enabled : isStarted || isIdle text.font { weight : Font.DemiBold @@ -131,13 +132,11 @@ } } } - - // TODO: -// notification { -// visible : true -// text : isDisabled ? _private.mesgDisabled : -// isWaitPump ? _private.mesgWaitForPump : -// _private.mesgRejectReason -// } + // TODO: +// notification { +// visible : true +// text    : isDisabled ? _private.mesgDisabled    : +//   isWaitPump ? _private.mesgWaitForPump : +//   _private.mesgRejectReason // } }