Refactoring the new dialog manager module and fixed keyboard problem in Linux touch panel.

This commit is contained in:
sunwen
2022-08-10 15:28:59 +08:00
parent 9b96af094b
commit 30df175f22
28 changed files with 485 additions and 303 deletions

View File

@@ -51,12 +51,18 @@ void errorCallback(const char* msg)
DeviceManager::Default()->emitErrorCallback(msg);
}
void infoCallback(const char* msg,const unsigned int aInfoType)
{
DeviceManager::Default()->emitInfoCallback(msg,aInfoType);
}
const char * getPhaseName(int phase){
return names[phase-1];
}
void DeviceManager::initDevice() {
InitLib(errorCallback);
SetMessageCallback(infoCallback);
mDeviceInfTimerID = startTimer(10000);
@@ -379,6 +385,11 @@ void DeviceManager::emitErrorCallback(const char *msg) {
emit raiseGlobalError( m);
}
void DeviceManager::emitInfoCallback(const char* aMessage,const unsigned int aInfoType)
{
emit raiseGlobalInfo(QPair<QString,unsigned int>(aMessage,aInfoType));
}
QString DeviceManager::getSoftwareVersion() {
return GetDeviceInfo(VERSION);
}

View File

@@ -58,10 +58,12 @@ public:
}
void emitErrorCallback(const char *msg);
void emitInfoCallback(const char* aMessage,const unsigned int aInfoType);
signals:
void raiseGlobalError(QString msg);
void raiseGlobalInfo(const QPair<QString,unsigned int>& aInfoData);
protected:
void timerEvent(QTimerEvent *event) override;