feat: Change getDmsVersion action form sync action to async action.
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
|
||||
AboutForm::AboutForm(QWidget* aParent)
|
||||
: QWidget(aParent)
|
||||
,mReconSotfVer( new QLabel(this))
|
||||
, mReconSotfVer( new QLabel(this))
|
||||
, mDmsVersion(new QLabel(this))
|
||||
{
|
||||
initUiWidget();
|
||||
mReconSotfVer->setSizePolicy(QSizePolicy::Policy::Expanding,QSizePolicy::Policy::Expanding);
|
||||
@@ -47,7 +48,6 @@ void AboutForm::initUiWidget()
|
||||
QPushButton* pBtnHelp;
|
||||
QLabel* pCompanyCopyRight;
|
||||
QLabel* pMainVer;
|
||||
QLabel* pEmbededSoftVer;
|
||||
QLabel* pFEBVer;
|
||||
QLabel* pQtVer;
|
||||
QLabel* pQtCopyright;
|
||||
@@ -94,9 +94,8 @@ void AboutForm::initUiWidget()
|
||||
pMainVer->setText(QString(tr("USCT Software V0.1.0")));
|
||||
pMainLayout->addWidget(pMainVer);
|
||||
|
||||
pEmbededSoftVer = new QLabel(this);
|
||||
pEmbededSoftVer->setText(DeviceManager::Default()->getSoftwareVersion());
|
||||
pMainLayout->addWidget(pEmbededSoftVer);
|
||||
mDmsVersion->setText(DeviceManager::Default()->getSoftwareVersion());
|
||||
pMainLayout->addWidget(mDmsVersion);
|
||||
|
||||
|
||||
mReconSotfVer->setText(tr("Reconstruction Software Loading..."));
|
||||
@@ -150,6 +149,7 @@ void AboutForm::initUiWidget()
|
||||
|
||||
QMetaObject::invokeMethod(ReconManager::getInstance(), "getReconVersion", Qt::QueuedConnection);
|
||||
connect(ReconManager::getInstance(), &ReconManager::getReconVersionResponsed,this,&AboutForm::setReconVersion,Qt::QueuedConnection);
|
||||
connect(DeviceManager::Default(), &DeviceManager::getDmsVersionResponsed,this,&AboutForm::setDmsVersion,Qt::QueuedConnection);
|
||||
|
||||
connect(pBtnHelp, SIGNAL(clicked()), this, SLOT(openHelpFile()));
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
@@ -157,7 +157,7 @@ void AboutForm::initUiWidget()
|
||||
pBtnHelp->setText(tr("?"));
|
||||
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
||||
pMainVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||
pEmbededSoftVer->setText(tr("Embedded Software %1").arg(getEmbVersion()));
|
||||
mDmsVersion->setText(tr("Embedded Software %1").arg(getEmbVersion()));
|
||||
mReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
||||
pFEBVer->setText(tr("FEB Information"));
|
||||
});
|
||||
@@ -187,3 +187,8 @@ QString AboutForm::getEmbVersion()
|
||||
{
|
||||
return DeviceManager::Default()->getSoftwareVersion();
|
||||
}
|
||||
|
||||
void AboutForm::setDmsVersion(const QString& aVersion)
|
||||
{
|
||||
mDmsVersion->setText(aVersion);
|
||||
}
|
||||
|
||||
@@ -23,10 +23,12 @@ public:
|
||||
private slots:
|
||||
void openHelpFile();
|
||||
void setReconVersion(const QString& version);
|
||||
void setDmsVersion(const QString& aVersion);
|
||||
|
||||
private:
|
||||
void initUiWidget();
|
||||
QLabel* mReconSotfVer;
|
||||
QLabel* mDmsVersion;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user