Add shutdown widget.
This commit is contained in:
@@ -18,6 +18,7 @@ DmsAsyncAction::DmsAsyncAction(int aServerId, int aActionId, QObject* aObject, c
|
||||
, mSendData()
|
||||
{
|
||||
mTimer->setSingleShot(true);
|
||||
mTimer->setInterval(TIMEOUT_MSEC);
|
||||
connect(mTimer, &QTimer::timeout, this, &DmsAsyncAction::sendTimeoutSignal);
|
||||
connect(mObject, ("2" + mResponseSignal).toStdString().c_str(), mTimer, SLOT(stop()));
|
||||
}
|
||||
@@ -36,7 +37,7 @@ bool DmsAsyncAction::execute()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
mTimer->start(TIMEOUT_MSEC);
|
||||
mTimer->start();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,3 +45,8 @@ void DmsAsyncAction::sendTimeoutSignal()
|
||||
{
|
||||
emit timeout();
|
||||
}
|
||||
|
||||
void DmsAsyncAction::setTimeoutInterval(int aMsec)
|
||||
{
|
||||
mTimer->setInterval(aMsec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user