From 593883d9800dd90138c9eba798758ad7c097e9b7 Mon Sep 17 00:00:00 2001 From: Krad Date: Sat, 7 May 2022 14:39:10 +0800 Subject: [PATCH] DEV_OUTPATH Test --- src/ShimLib/ShimLib.c | 2 ++ src/ShimLib/ShimLib.h | 3 ++- src/device/DeviceManager.cpp | 4 ++++ src/device/DeviceManager.h | 1 + src/forms/settings/aboutwidget.cpp | 10 ++++++++-- src/forms/settings/aboutwidget.h | 1 + 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/ShimLib/ShimLib.c b/src/ShimLib/ShimLib.c index 9a14d26..b555f5d 100644 --- a/src/ShimLib/ShimLib.c +++ b/src/ShimLib/ShimLib.c @@ -113,6 +113,8 @@ const char* GetDeviceInfo(DeviceInfo infoType) { return "28"; case VERSION: return "6.6.06"; + case DEV_OUTPATH: + return "path to store bin"; } return ""; } diff --git a/src/ShimLib/ShimLib.h b/src/ShimLib/ShimLib.h index 9d4a023..8956953 100644 --- a/src/ShimLib/ShimLib.h +++ b/src/ShimLib/ShimLib.h @@ -30,7 +30,8 @@ typedef enum { //kinds of device information typedef enum { MEAN_TEMPERATURE, - VERSION + VERSION, + DEV_OUTPATH } DeviceInfo; extern int InitLib(void(*)(const char *msg)); diff --git a/src/device/DeviceManager.cpp b/src/device/DeviceManager.cpp index e699ffd..98e6c68 100644 --- a/src/device/DeviceManager.cpp +++ b/src/device/DeviceManager.cpp @@ -314,3 +314,7 @@ void DeviceManager::close() { QString DeviceManager::getSoftwareVersion() { return GetDeviceInfo(VERSION); } + +QString DeviceManager::getScanOutputPath() { + return GetDeviceInfo(DEV_OUTPATH); +} diff --git a/src/device/DeviceManager.h b/src/device/DeviceManager.h index 7de8a5a..60aa53a 100644 --- a/src/device/DeviceManager.h +++ b/src/device/DeviceManager.h @@ -21,6 +21,7 @@ public: errorOccurred = v; } QString getSoftwareVersion(); + QString getScanOutputPath(); bool getErrorOccurred(){ return errorOccurred; } diff --git a/src/forms/settings/aboutwidget.cpp b/src/forms/settings/aboutwidget.cpp index 7e3f324..a899b62 100644 --- a/src/forms/settings/aboutwidget.cpp +++ b/src/forms/settings/aboutwidget.cpp @@ -77,7 +77,8 @@ void AboutWidget::initUi() pMainLayout->addWidget(pGuiVer); pEmbededSoftVer = new QLabel(this); - pEmbededSoftVer->setText(tr("Embedded Software %1").arg(getEmbVersion())); +// pEmbededSoftVer->setText(tr("Embedded Software %1").arg(getEmbVersion())); + pEmbededSoftVer->setText(tr("Embedded Software %1, Data store Path:%2").arg(getEmbVersion(), getDataStorePath())); pEmbededSoftVer->setContentsMargins(subContentMargin, 0, 0, 0); pMainLayout->addWidget(pEmbededSoftVer); @@ -157,7 +158,8 @@ void AboutWidget::initUi() pBtnHelp->setText(tr("?")); 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())); - pEmbededSoftVer->setText(tr("Embedded Software %1").arg(getEmbVersion())); +// pEmbededSoftVer->setText(tr("Embedded Software %1").arg(getEmbVersion())); + pEmbededSoftVer->setText(tr("Embedded Software %1, Data store Path:%2").arg(getEmbVersion(), getDataStorePath())); pReconSotfVer->setText(tr("Reconstruction Software V1.2")); pFEBVer->setText(tr("FEB Information")); }); @@ -191,3 +193,7 @@ QString AboutWidget::getGUIVersion() { QString AboutWidget::getEmbVersion() { return DeviceManager::Default()->getSoftwareVersion(); } + +QString AboutWidget::getDataStorePath() { + return DeviceManager::Default()->getScanOutputPath();; +} diff --git a/src/forms/settings/aboutwidget.h b/src/forms/settings/aboutwidget.h index 1d4afdd..d4172ea 100644 --- a/src/forms/settings/aboutwidget.h +++ b/src/forms/settings/aboutwidget.h @@ -22,6 +22,7 @@ public: QString getGUIVersion(); QString getEmbVersion(); + QString getDataStorePath(); private slots: void openHelpFile();