/*! * * Copyright (c) 2021-2022 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 VTreatmentAdjustmentPressuresLimits.cpp * \author (last) Behrouz NematiPour * \date (last) 11-Apr-2021 * \author (original) Behrouz NematiPour * \date (original) 11-Apr-2021 * */ #include "VTreatmentAdjustmentPressuresLimits.h" // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentPressuresLimits) void VTreatmentAdjustmentPressuresLimits::initConnections() { ACTION_VIEW_CONNECTION(AdjustPressuresLimitsResponseData); ADJUST_VIEW_CONNECTION( AdjustPressuresLimitsRequestData); ACTION_VIEW_CONNECTION( SettingsData); } /*! * \brief VTreatmentAdjustmentPressures::onActionReceive * \details Model data received message handler. * When signal received this method is called to update the view properties. * \param vData - Model data */ void VTreatmentAdjustmentPressuresLimits::onActionReceive(const AdjustPressuresLimitsResponseData &vData) { adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); arterialLimitLow ( vData.mArterialLimitLow ); arterialLimitHigh ( vData.mArterialLimitHigh ); venousLimitLow ( vData.mVenousLimitLow ); venousLimitHigh ( vData.mVenousLimitHigh ); // *** 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 VTreatmentAdjustmentPressures::onActionReceive * \details Model data received message handler. * When signal received this method is called to update the view properties. */ void VTreatmentAdjustmentPressuresLimits::onActionReceive(const SettingsData &) { QString mCategory = Storage::Settings_Category_ConfigurationsDataList; FROMVARIANT ( arterialPressureLimitLowDef , "Arterial Blood Pressure Ranges" , "Arterial_Adjust_Low_Def" , Int ); FROMVARIANT ( arterialPressureLimitHighDef , "Arterial Blood Pressure Ranges" , "Arterial_Adjust_High_Def" , Int ); FROMVARIANT ( venousPressureLimitLowDef , "Venous Blood Pressure Ranges" , "Venous_Adjust_Low_Def" , Int ); FROMVARIANT ( venousPressureLimitHighDef , "Venous Blood Pressure Ranges" , "Venous_Adjust_High_Def" , Int ); arterialLimitLow (_arterialPressureLimitLowDef ); arterialLimitHigh (_arterialPressureLimitHighDef ); venousLimitLow (_venousPressureLimitLowDef ); venousLimitHigh (_venousPressureLimitHighDef ); // *** 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 ); }