/*! * * 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 VTreatmentAdjustmentDurationConfirm.cpp * \author (last) Stephen Quong * \date (last) 17-Nov-2025 * \author (original) Stephen Quong * \date (original) 17-Nov-2025 * */ #include "VTreatmentAdjustmentDurationConfirm.h" #include #include // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentDurationConfirm) /*! * \brief Function called during startup to register this class with the QMetaObject system */ static void qRegister() { qmlRegisterType("VTreatmentAdjustmentDurationConfirm", 0, 1, "VTreatmentAdjustmentDurationConfirm"); } Q_COREAPP_STARTUP_FUNCTION(qRegister) void VTreatmentAdjustmentDurationConfirm::initConnections() { ACTION_VIEW_CONNECTION(AdjustDurationConfirmResponseData); ADJUST_VIEW_CONNECTION( AdjustDurationConfirmRequestData); } void VTreatmentAdjustmentDurationConfirm::onActionReceive(const AdjustDurationConfirmResponseData &vData) { adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); duration ( vData.mDuration ); ufVolumeRemoved ( vData.mUFVolumeRemoved / 1000 ); // mL => L ufSetVolume ( vData.mUFSetVolume / 1000 ); // mL => L // *** 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 ); }