Index: sources/view/confirm/VConfirm.cpp =================================================================== diff -u -rb9739918c71a21c181c8401f17ed05fb14996fec -rd95ed86d997208024ec79422e350a86a2c52fd85 --- sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision b9739918c71a21c181c8401f17ed05fb14996fec) +++ sources/view/confirm/VConfirm.cpp (.../VConfirm.cpp) (revision d95ed86d997208024ec79422e350a86a2c52fd85) @@ -26,7 +26,6 @@ */ void View::VConfirm::initConnections() { ACTION_VIEW_CONNECTION(DuetConfirmTDiData ); - ACTION_VIEW_CONNECTION(PowerOffData ); ACTION_VIEW_CONNECTION(SettingsData ); ADJUST_VIEW_CONNECTION(DuetConfirmUIrData ); @@ -94,46 +93,12 @@ } /*! - * \brief View::VConfirm::setPowerOffCommand - */ -void View::VConfirm::setPowerOffCommand() -{ - command ( 0 ); - adjustment_Reason ( GuiConfirmId::GENERIC_CONFIRM_ID_NONE ); - adjustment_Accepted ( false ); // it has not been accepted yet. - isTimeout ( false ); - isReject ( false ); - isAccept ( false ); -} - -/*! - * \brief View::VConfirm::setPowerOffId - */ -void View::VConfirm::setPowerOffId() -{ - titleByID ( false ); - messageByID ( false ); - confirmByID ( false ); - cancelByID ( false ); - - 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 - confirm ( tr("SHUTDOWN") ); - cancel ( tr("CANCEL") ); - - id ( 0 ); -} - -/*! * \brief VConfirm::onActionReceive * \details received response model data handler * \param vData - model data */ void View::VConfirm::onActionReceive(const DuetConfirmTDiData &vData) { - isPowerOff(false ); - setConfirmCommand ( vData ); setConfirmId ( vData ); @@ -144,22 +109,6 @@ // DEBUG: qDebug() << _id << _command << adjustment_Reason() << _title << _message << _isReject; } -void View::VConfirm::onActionReceive(const PowerOffData &vData) -{ - isPowerOff(true ); - - setPowerOffCommand ( ); - setPowerOffId ( ); - - poweroff(vData.mStatus); - - // *** 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 ); - - // DEBUG: qDebug() << _id << _command << adjustment_Reason() << _title << _message << _isReject; -} - /*! * \brief View::VConfirm::doConfirm * \details the invocable slot to send user's Confirmation