Add Scan complete notify.

This commit is contained in:
Krad
2022-06-01 10:01:25 +08:00
parent 2f4ca38162
commit 3b07cee4e6
5 changed files with 62 additions and 23 deletions

View File

@@ -112,6 +112,7 @@ void DeviceManager::initDevice() {
QString s("%1 %2");
s = s.arg(QDateTime::currentDateTime().toString("yyyy/MM/dd HH:mm:ss"), ("Scan Stopped!"));
TRIGGER_EVENT(GUIEvents::GlobalBannerMessage, nullptr, (QObject*)&s);
// preview end
TRIGGER_EVENT(GUIEvents::InvokeOperationEnd, nullptr, nullptr);
TRIGGER_EVENT(GUIEvents::ResponseStop, nullptr, nullptr);
AppGlobalValues::setInProcessing(false);
@@ -135,6 +136,7 @@ void DeviceManager::initDevice() {
previewing = true;
// timerID = startTimer(500);
TRIGGER_EVENT(GUIEvents::ResponsePreview, nullptr, nullptr);
// end scan without prompt
TRIGGER_EVENT(GUIEvents::InvokeOperationEnd, nullptr, nullptr);
QString s("Device Previewing!");
TRIGGER_EVENT(GUIEvents::GlobalBannerMessage, nullptr, (QObject*)&s);
@@ -278,9 +280,9 @@ void DeviceManager::exitScanTimer() {
void DeviceManager::prepareFinishScan() {
qDebug() << "Scan finished";
QVariant var(true);
QVariant var(JsonObject::Instance()->getCompleteNotify());
qDebug() << "InvokeOperationEnd";
// stop normal scan with prompt
TRIGGER_EVENT(InvokeOperationEnd, nullptr, (QObject *) &var);
AppGlobalValues::setInProcessing(false);
// log, no need