/*! * * 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 VTreatmentAdjustmentSetPoints.cpp * \author (last) Stephen Quong * \date (last) 15-Nov-2025 * \author (original) Stephen Quong * \date (original) 15-Nov-2025 * */ #include "VTreatmentAdjustmentSetPoints.h" #include #include // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentSetPoints) /*! * \brief Function called during startup to register this class with the QMetaObject system */ static void qRegister() { qmlRegisterType("VTreatmentAdjustmentSetPoints", 0, 1, "VTreatmentAdjustmentSetPoints"); } Q_COREAPP_STARTUP_FUNCTION(qRegister) void VTreatmentAdjustmentSetPoints::initConnections() { ACTION_VIEW_CONNECTION(AdjustSetPointsResponseData); ADJUST_VIEW_CONNECTION(AdjustSetPointsRequestData ); } void VTreatmentAdjustmentSetPoints::onActionReceive(const AdjustSetPointsResponseData &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 fluid bolus volume * \param vSetPoints - fluid bolus volume adjusted value * \param vBloodFlowRate - adjusted blood flow rate value * \param vDialysateFlowRate - adjusted dialysate flow rate value * \param vDialysateTemperature - adjusted dialysate temperature value * \param vAcidConcentrate - adjusted acid concentrate value * \param vBicarbConcentrate - adjusted bicarbonate concentrate value */ void VTreatmentAdjustmentSetPoints::doAdjustment(const quint32 vBloodFlowRate, const quint32 vDialysateFlowRate, const float vDialysateTemperature, const quint32 vAcidConcentrate, const quint32 vBicarbConcentrate) { _data.bloodFlowRate = vBloodFlowRate; _data.dialysateFlowRate = vDialysateFlowRate; _data.dialysateTemperature = vDialysateTemperature; _data.acidConcentrate = vAcidConcentrate; _data.bicarbConcentrate = vBicarbConcentrate; emit didAdjustment(_data); }