GUI Error level WARN class

This commit is contained in:
Krad
2021-12-20 13:23:28 +08:00
parent b6c272181e
commit f9b6edce17
2 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
//
// Created by Krad on 2021/12/17.
//
#include <src/event/EventCenter.h>
#include "GUIErrorLW.h"
#include <QChar>
void GUIErrorLW::parse(const QString &errorMsg) {
char s[4];
s[0] = errorMsg.data()[0].toLatin1();
s[1] = errorMsg.data()[1].toLatin1();
s[2] = errorMsg.data()[2].toLatin1();
s[3] = errorMsg.data()[3].toLatin1();
int * v = (int*)s;
value = *v;
}
void GUIErrorLW::handle() {
EventCenter::Default()->triggerEvent(WarnStateFlagChange, nullptr,(QObject*)&value);
}