/*! * * 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 VTreatmentAdjustmentUltrafiltrationState.cpp * \author (last) Behrouz NematiPour * \date (last) 11-Sep-2022 * \author (original) Behrouz NematiPour * \date (original) 11-Apr-2021 * */ #include "VTreatmentAdjustmentUltrafiltrationState.h" // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationState) void VTreatmentAdjustmentUltrafiltrationState::initConnections() { ACTION_VIEW_CONNECTION(AdjustUltrafiltrationStateResponseData); ADJUST_VIEW_CONNECTION( AdjustUltrafiltrationStateRequestData); } void VTreatmentAdjustmentUltrafiltrationState::onActionReceive(const AdjustUltrafiltrationStateResponseData &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. *** // *** use this trigger to make sure you have all the properties with updated values *** adjustment ( true ); } /*! * \brief View::VTreatmentAdjustmentUltrafiltrationState::doPause * \details request to pause the ultrafiltration */ void View::VTreatmentAdjustmentUltrafiltrationState::doPause() { _data.requestedState = GuiUFCommands::UF_CMD_PAUSE; emit didAdjustment(_data); // notify the controllers to do the adjustment } /*! * \brief View::VTreatmentAdjustmentUltrafiltrationState::doResume * \details request to resume the ultrafiltration */ void View::VTreatmentAdjustmentUltrafiltrationState::doResume() { _data.requestedState = GuiUFCommands::UF_CMD_RESUME; emit didAdjustment(_data); // notify the controllers to do the adjustment }