/*! * * Copyright (c) 2021-2025 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file VTreatmentAdjustmentHeparin.cpp * \author (last) Behrouz NematiPour * \date (last) 11-Apr-2021 * \author (original) Behrouz NematiPour * \date (original) 11-Apr-2021 * */ #include "VTreatmentAdjustmentHeparin.h" // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentHeparin) void VTreatmentAdjustmentHeparin::initConnections() { ACTION_VIEW_CONNECTION(AdjustHeparinResponseData); ADJUST_VIEW_CONNECTION(AdjustHeparinRequestData ); } void VTreatmentAdjustmentHeparin::onActionReceive(const AdjustHeparinResponseData &vData) { 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. *** adjustment ( true ); } /*! * \brief View::VTreatmentAdjustmentHeparin::doPause * \details sends the pause heparin request */ void View::VTreatmentAdjustmentHeparin::doPause() { _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 }