Add Scan complete notify.
This commit is contained in:
@@ -143,13 +143,24 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
msgDialog->showMessage(var->toString());
|
||||
}
|
||||
});
|
||||
connect(EventCenter::Default(), &EventCenter::InvokeOperationEnd, [=]() {
|
||||
connect(EventCenter::Default(), &EventCenter::InvokeOperationEnd, [=](QObject*, QObject* v) {
|
||||
if (!msgDialog) return;
|
||||
if (!msgDialog->isHidden())msgDialog->accept();
|
||||
delete msgDialog;
|
||||
msgDialog = nullptr;
|
||||
AppGlobalValues::setInProcessing(false);
|
||||
});
|
||||
if (!msgDialog->isHidden()){
|
||||
if (v && ((QVariant*)v)->toBool()) {
|
||||
msgDialog->stopLoading();
|
||||
msgDialog->showMessage("Scan completed!");
|
||||
msgDialog->showExitButton();
|
||||
msgDialog->setWindowModality(Qt::WindowModal);
|
||||
msgDialog->exec();
|
||||
}
|
||||
else{
|
||||
msgDialog->accept();
|
||||
}
|
||||
delete msgDialog;
|
||||
msgDialog = nullptr;
|
||||
AppGlobalValues::setInProcessing(false);
|
||||
}
|
||||
});
|
||||
connect(EventCenter::Default(), &EventCenter::RequestLogin, [=](QObject*, QObject* msg) {
|
||||
this->requestLogin();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user