#include "VTreatmentAdjustmentAutoSub.h" // Project #include "GuiController.h" VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentAutoSub) void VTreatmentAdjustmentAutoSub::initConnections() { ACTION_VIEW_CONNECTION(AdjustAutoSubResponseData); ADJUST_VIEW_CONNECTION( AdjustAutoSubRequestData); } void VTreatmentAdjustmentAutoSub::onActionReceive(const AdjustAutoSubResponseData &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. *** // *** use this trigger to make sure you have all the properties with updated values *** adjustment ( true ); } /*! * \brief View::VTreatmentAdjustmentAutoSub::doAdjustment * \details request state of auto sub */ void View::VTreatmentAdjustmentAutoSub::doAdjustment (int state) { AdjustAutoSubRequestData mData; mData.state = state; emit didAdjustment(mData); // notify the controllers to do the adjustment }