Read and show embed ware version
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include "json/cmdhelper.h"
|
#include "json/cmdhelper.h"
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include "AppVersion.h"
|
#include "AppVersion.h"
|
||||||
|
#include "device/DeviceManager.h"
|
||||||
|
|
||||||
AboutWidget::AboutWidget(QWidget* parent)
|
AboutWidget::AboutWidget(QWidget* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
@@ -76,7 +77,7 @@ void AboutWidget::initUi()
|
|||||||
pMainLayout->addWidget(pGuiVer);
|
pMainLayout->addWidget(pGuiVer);
|
||||||
|
|
||||||
pEmbededSoftVer = new QLabel(this);
|
pEmbededSoftVer = new QLabel(this);
|
||||||
pEmbededSoftVer->setText(tr("Embedded Software V1.5"));
|
pEmbededSoftVer->setText(tr("Embedded Software V%1").arg(getEmbVersion()));
|
||||||
pEmbededSoftVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
pEmbededSoftVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||||
pMainLayout->addWidget(pEmbededSoftVer);
|
pMainLayout->addWidget(pEmbededSoftVer);
|
||||||
|
|
||||||
@@ -156,7 +157,7 @@ void AboutWidget::initUi()
|
|||||||
pBtnHelp->setText(tr("?"));
|
pBtnHelp->setText(tr("?"));
|
||||||
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
||||||
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||||
pEmbededSoftVer->setText(tr("Embedded Software V1.5"));
|
pEmbededSoftVer->setText(tr("Embedded Software V%1").arg(getEmbVersion()));
|
||||||
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
||||||
pFEBVer->setText(tr("FEB Information"));
|
pFEBVer->setText(tr("FEB Information"));
|
||||||
});
|
});
|
||||||
@@ -182,3 +183,7 @@ void AboutWidget::openHelpFile()
|
|||||||
QString AboutWidget::getGUIVersion() {
|
QString AboutWidget::getGUIVersion() {
|
||||||
return QString("%1.%2.%3").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
|
return QString("%1.%2.%3").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString AboutWidget::getEmbVersion() {
|
||||||
|
return DeviceManager::Default()->getSoftwareVersion();
|
||||||
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public:
|
|||||||
~AboutWidget();
|
~AboutWidget();
|
||||||
|
|
||||||
QString getGUIVersion();
|
QString getGUIVersion();
|
||||||
|
QString getEmbVersion();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void openHelpFile();
|
void openHelpFile();
|
||||||
|
|||||||
@@ -310,3 +310,7 @@ void DeviceManager::close() {
|
|||||||
previewDataCaller->terminate();
|
previewDataCaller->terminate();
|
||||||
delete previewDataCaller;
|
delete previewDataCaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString DeviceManager::getSoftwareVersion() {
|
||||||
|
return GetDeviceInfo(VERSION);
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public:
|
|||||||
void setErrorOccurred(bool v){
|
void setErrorOccurred(bool v){
|
||||||
errorOccurred = v;
|
errorOccurred = v;
|
||||||
}
|
}
|
||||||
|
QString getSoftwareVersion();
|
||||||
bool getErrorOccurred(){
|
bool getErrorOccurred(){
|
||||||
return errorOccurred;
|
return errorOccurred;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user