/*! * * Copyright (c) 2021-2024 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 VTreatmentAdjustmentBloodPrime.cpp * \author (last) Behrouz NematiPour * \date (last) 11-Apr-2021 * \author (original) Behrouz NematiPour * \date (original) 11-Apr-2021 * */ #include "VTreatmentAdjustmentBloodPrime.h" // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentBloodPrime) void VTreatmentAdjustmentBloodPrime::initConnections() { ACTION_VIEW_CONNECTION(AdjustBloodPrimeResponseData); ADJUST_VIEW_CONNECTION(AdjustBloodPrimeRequestData ); } void VTreatmentAdjustmentBloodPrime::onActionReceive(const AdjustBloodPrimeResponseData &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::VTreatmentAdjustmentBloodPrime::adjustment * \details the invocable slot to send blood prime command * \param vCommand - the blood prime command */ void View::VTreatmentAdjustmentBloodPrime::adjustment(const GuiBloodPrimeCommands &vCommand) { _data.command = vCommand; emit didAdjustment(_data); // notify the controllers to do the adjustment }