Index: sources/view/hd/alarm/VAlarmStatus.cpp =================================================================== diff -u -rd619b1355f03ab8e2e53956908bda66fea542224 -r43cdee7bb03f7fa0bd5c2bba7f9d011bb06806b1 --- sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision d619b1355f03ab8e2e53956908bda66fea542224) +++ sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 43cdee7bb03f7fa0bd5c2bba7f9d011bb06806b1) @@ -26,18 +26,44 @@ ADJUST_VIEW_CONNECTION(AlarmUserActionRequestData ); } -void View::VAlarmStatus::doNotifyUserAction( - bool vOK , - bool vResume , - bool vRinseback , - bool vEnd ) +/*! + * \brief View::VAlarmStatus::doUserActionResume + * \details send the message to notify that user chose the Resume Treatment button + */ +void View::VAlarmStatus::doUserActionResume() { + AlarmUserActionRequestData data; + data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_RESUME; + emit didAdjustment(data); +} + +/*! + * \brief View::VAlarmStatus::doUserActionRinseback + * \details send the message to notify that user chose the Rinse back button + */ +void View::VAlarmStatus::doUserActionRinseback() { + AlarmUserActionRequestData data; + data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_RINSEBACK; + emit didAdjustment(data); +} + +/*! + * \brief View::VAlarmStatus::doUserActionEnd + * \details send the message to notify that user chose the End Treatment button + */ +void View::VAlarmStatus::doUserActionEnd() { + AlarmUserActionRequestData data; + data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_END_TREATMENT; + emit didAdjustment(data); +} + +/*! + * \brief View::VAlarmStatus::doUserActionOk + * \details send the message to notify that user chose the OK button + */ +void View::VAlarmStatus::doUserActionOk() { AlarmUserActionRequestData data; - if (vOK ) { data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_ACK ; goto lOut; } - if (vResume ) { data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_RESUME ; goto lOut; } - if (vRinseback ) { data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_RINSEBACK ; goto lOut; } - if (vEnd ) { data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_END_TREATMENT ; goto lOut; } -lOut: + data.action = Gui::GuiAlarmUserActions::ALARM_USER_ACTION_ACK; emit didAdjustment(data); } @@ -48,11 +74,18 @@ void View::VAlarmStatus::doSilence() { AlarmSilenceRequestData data; - data.state = 1; + if (_alarm_Flag_alarmsSilenced) + data.state = 1; + else + data.state = 0; emit didAdjustment(data); } - +/*! + * \brief VAlarmStatus::onActionReceive + * \details the message received handler + * \param vData - Data of the received message + */ void VAlarmStatus::onActionReceive(const AlarmStatusData &vData) { GuiAlarmID alarmID = static_cast(vData.mTop);