/*! * * 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 VTreatmentAdjustmentDialysateTemperature.cpp * \author (last) Stephen Quong * \date (last) 15-Nov-2025 * \author (original) Stephen Quong * \date (original) 15-Nov-2025 * */ #include "VTreatmentAdjustmentDialysateTemperature.h" #include #include // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentDialysateTemperature) /*! * \brief Function called during startup to register this class with the QMetaObject system */ static void qRegister() { qmlRegisterType("VTreatmentAdjustmentDialysateTemperature", 0, 1, "VTreatmentAdjustmentDialysateTemperature"); } Q_COREAPP_STARTUP_FUNCTION(qRegister) void VTreatmentAdjustmentDialysateTemperature::initConnections() { ACTION_VIEW_CONNECTION(AdjustDialysateTemperatureResponseData); ADJUST_VIEW_CONNECTION(AdjustDialysateTemperatureRequestData ); } void VTreatmentAdjustmentDialysateTemperature::onActionReceive(const AdjustDialysateTemperatureResponseData &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 dialysate temperature * \param vDialysateTemperature - dialysate temperature adjusted value */ void VTreatmentAdjustmentDialysateTemperature::doAdjustment(const float vDialysateTemperature) { _data.dialysateTemperature = vDialysateTemperature; emit didAdjustment(_data); }