Index: sources/view/confirm/VConfirm.cpp =================================================================== diff -u -r13e65c3d271d503c2e2e2f1f20736652c470f8cc -rb5afbc61af03dd2e84acf8439cb6be1f022a2921 --- sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) +++ sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision b5afbc61af03dd2e84acf8439cb6be1f022a2921) @@ -26,6 +26,8 @@ void View::VConfirm::initConnections() { ACTION_VIEW_CONNECTION(DuetConfirmHDiData ); ACTION_VIEW_CONNECTION(PowerOffData ); + + ADJUST_VIEW_CONNECTION(DuetConfirmUIrData ); } /*! @@ -35,6 +37,8 @@ */ void View::VConfirm::onActionReceive(const DuetConfirmHDiData &vData) { + isPowerOff(false ); + id ( vData.mId ); command ( vData.mCommand ); @@ -90,6 +94,8 @@ void View::VConfirm::onActionReceive(const PowerOffData &vData) { + isPowerOff(true ); + title ( tr("Shutdown") ); message ( tr("Are you sure you want to Shutdown?") ); adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); // power off has no rejection reason on the dialog @@ -105,3 +111,14 @@ // DEBUG: qDebug() << _id << _command << adjustment_Reason() << _title << _message; } + +/*! + * \brief View::VConfirm::doConfirm + * \details the invocable slot to send user's Confirmation + */ +void View::VConfirm::doConfirm(bool vConfirm) { + DuetConfirmUIrData data; + data.mId = id(); + data.mConfirm = vConfirm; + emit didAdjustment(data); +}