Index: sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp =================================================================== diff -u -rc70a3e2ca2b9a679b042bf543dc331cffbd937ac -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 --- sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp (.../VTreatmentAdjustmentUltrafiltrationState.cpp) (revision c70a3e2ca2b9a679b042bf543dc331cffbd937ac) +++ sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp (.../VTreatmentAdjustmentUltrafiltrationState.cpp) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) @@ -26,15 +26,14 @@ void VTreatmentAdjustmentUltrafiltrationState::onActionReceive(const AdjustUltrafiltrationStateResponseData &vData) { - if ( vData.mAccepted ) { - // the response doesn't have the state so the requested state which has been accepted is used. - isPaused ( _data.requestedState == AdjustUltrafiltrationStateRequestData::ePaused ); - } - adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); - // *** has to be the last to let the information to be set and then emit the signal *** - // *** otherwise will use the previous values before being set. *** + state ( vData.mState ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + // *** use this trigger to make sure you have all the properties with updated values *** adjustment ( true ); } @@ -44,7 +43,7 @@ */ void View::VTreatmentAdjustmentUltrafiltrationState::doPause() { - _data.requestedState = AdjustUltrafiltrationStateRequestData::ePaused; + _data.requestedState = GuiUFCommands::UF_CMD_PAUSE; emit didAdjustment(_data); // notify the controllers to do the adjustment } @@ -54,33 +53,6 @@ */ void View::VTreatmentAdjustmentUltrafiltrationState::doResume() { - _data.requestedState = AdjustUltrafiltrationStateRequestData::eRunning; + _data.requestedState = GuiUFCommands::UF_CMD_RESUME; emit didAdjustment(_data); // notify the controllers to do the adjustment } - -/*! - * \brief View::VTreatmentAdjustmentUltrafiltrationState::text - * \details The slot to get the Reason Description - * \return Reason description as string - * \note The ultrafiltration state (Resume/Pause) change has no returned reason code and it's only bool. - */ -QString View::VTreatmentAdjustmentUltrafiltrationState::text() -{ - if (adjustment_Accepted()) return ""; - - // if there is a reason (passed) it will be used - QString mText = VTreatmentAdjustmentResponseBase::text(); - // coco begin validated : Manually tested. - // Although currently there is no reason passed in the corresponding message. - // But kept this code which seems reasonable to have a reason later. - if (! mText.isEmpty()) return mText; - // coco end - // otherwise a general message will be created/passed. - if (isPaused()) { - mText = tr("Unable to Resume Ultrafiltration or already running"); - } else { - mText = tr("Unable to Pause Ultrafiltration or already paused"); - - } - return mText; -}