2023-04-11 18:05:07 +08:00
|
|
|
|
#include "AppInfo.h"
|
2023-04-14 17:07:54 +08:00
|
|
|
|
#include "lang/En.h"
|
|
|
|
|
#include "lang/Zh.h"
|
|
|
|
|
|
2023-04-11 18:05:07 +08:00
|
|
|
|
|
|
|
|
|
AppInfo::AppInfo(QObject *parent)
|
|
|
|
|
: QObject{parent}
|
|
|
|
|
{
|
|
|
|
|
version("1.2.4");
|
2023-04-14 17:07:54 +08:00
|
|
|
|
changeLang("En");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AppInfo::changeLang(const QString& locale){
|
|
|
|
|
if(_lang){
|
|
|
|
|
_lang->deleteLater();
|
|
|
|
|
}
|
|
|
|
|
if(locale=="Zh"){
|
|
|
|
|
lang(new Zh());
|
|
|
|
|
}else if(locale=="En"){
|
|
|
|
|
lang(new En());
|
|
|
|
|
}else {
|
|
|
|
|
lang(new En());
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-11 18:05:07 +08:00
|
|
|
|
}
|