/*! * * 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 VTreatmentAdjustmentBloodFlowRate.cpp * \author (last) Stephen Quong * \date (last) 15-Nov-2025 * \author (original) Stephen Quong * \date (original) 15-Nov-2025 * */ #include "VTreatmentAdjustmentBloodFlowRate.h" #include #include // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentBloodFlowRate) /*! * \brief Function called during startup to register this class with the QMetaObject system */ static void qRegister() { qmlRegisterType("VTreatmentAdjustmentBloodFlowRate", 0, 1, "VTreatmentAdjustmentBloodFlowRate"); } Q_COREAPP_STARTUP_FUNCTION(qRegister) void VTreatmentAdjustmentBloodFlowRate::initConnections() { ACTION_VIEW_CONNECTION(AdjustBloodFlowRateResponseData); ADJUST_VIEW_CONNECTION(AdjustBloodFlowRateRequestData ); } void VTreatmentAdjustmentBloodFlowRate::onActionReceive(const AdjustBloodFlowRateResponseData &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 doAdjustment * \details the invocable slot to adjust the blood flow rate * \param vBloodFlowRate - blood flow rate adjusted value */ void VTreatmentAdjustmentBloodFlowRate::doAdjustment(const quint32 vBloodFlowRate) { _data.bloodFlowRate = vBloodFlowRate; emit didAdjustment(_data); }