Index: sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml =================================================================== diff -u -r6cad9b004e904200b71de7431c745795256080df -ra2e7e903bf3fdc242ba77d99f3daa9c4208cc1f1 --- sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision 6cad9b004e904200b71de7431c745795256080df) +++ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision a2e7e903bf3fdc242ba77d99f3daa9c4208cc1f1) @@ -27,21 +27,27 @@ * \brief Treatment Screen Saline Management section */ TreatmentFluid { id: _root - // comes from the response accepted - readonly property bool isStarted : vTreatmentAdjustmentSaline.isStarted - // comes from the broadcast Treatment States salineState field - readonly property bool isDisabled : vTreatmentAdjustmentSaline.isDisabled + readonly property bool isStarted : vHDTreatmentStates.sbRunning + readonly property bool isIdle : vHDTreatmentStates.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 : vHDTreatmentStates.sbMaxReached + readonly property bool isWaitPump : vHDTreatmentStates.sbWaitPump QtObject { id: _private readonly property string textStart : qsTr("START BOLUS") readonly property string textStop : qsTr("STOP BOLUS" ) readonly property string textVolumeTarget : "(" + valueTarget + unit + ")" - readonly property string mesgAfterDisabled : qsTr("Maximum cumulative saline bolus volume delivered") + readonly property string mesgDisabled : qsTr("Maximum cumulative saline bolus volume delivered") + readonly property string mesgWaitForPump : "" // qsTr("Saline Bolus is starting") // Not sure if we shouls show any message at this point readonly property string mesgRejectReason : vTreatmentAdjustmentSaline.adjustment_ReasonText } - isTouchable : ! _root.isDisabled - buttonText : _root.isDisabled ? _private.textStart : _root.isStarted ? _private.textStop : _private.textStart + hasArrow : false + isTouchable : ! ( _root.isDisabled || _root.isWaitPump ) + buttonText : _root.isDisabled ? (_private.textStart || _root.isWaitPump ): + _root.isStarted ? _private.textStop : + _private.textStart title : qsTr("SALINE BOLUS") unit : Variables.unitTextSaline @@ -57,6 +63,10 @@ notification { visible : true - text : isDisabled ? _private.mesgAfterDisabled : _private.mesgRejectReason + text : isIdle ? "" : + isDisabled ? _private.mesgDisabled : + isWaitPump ? _private.mesgWaitForPump : + isStarted ? _private.mesgRejectReason : + "" } }