Index: sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp =================================================================== diff -u -rae1042a0c14d6d27556730183cc2cbe1a00bc0a7 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp (.../VTreatmentAdjustmentHeparin.cpp) (revision ae1042a0c14d6d27556730183cc2cbe1a00bc0a7) +++ sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp (.../VTreatmentAdjustmentHeparin.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -17,7 +17,7 @@ // Project #include "GuiController.h" -VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentHeparin, AdjustHeparinResponseData) +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentHeparin) void VTreatmentAdjustmentHeparin::initConnections() { ACTION_VIEW_CONNECTION(AdjustHeparinResponseData); @@ -29,28 +29,27 @@ adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); - 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. *** adjustment ( true ); } /*! - * \brief View::VTreatmentAdjustmentHeparin::doAdjustment - * \details the invocable slot to adjust(start/stop) the treatment Heparin bolus state + * \brief View::VTreatmentAdjustmentHeparin::doPause + * \details sends the pause heparin request */ -void View::VTreatmentAdjustmentHeparin::doAdjustment() +void View::VTreatmentAdjustmentHeparin::doPause() { - // if it's accepted or rejected we have the last/current state of Heparin - // so decide on last received/response state - // be careful the response enum (GuiHeparinStates) is - // different than request enum (AdjustHeparinRequestData) - if ( state() == GuiHeparinStates::HEPARIN_STATE_PAUSED ) { - _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_RESUME; - } - else { - _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_PAUSE; - } + _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_PAUSE ; emit didAdjustment(_data); // notify the controllers to do the adjustment } + +/*! + * \brief View::VTreatmentAdjustmentHeparin::doResume + * \details sends the resume heparin request + */ +void View::VTreatmentAdjustmentHeparin::doResume() +{ + _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_RESUME; + emit didAdjustment(_data); // notify the controllers to do the adjustment +}