feat: Add progress in system correction page while empty scan data transfering.

This commit is contained in:
sunwen
2024-09-19 15:45:23 +08:00
parent 2d7c359a64
commit f679b81fb4
9 changed files with 259 additions and 67 deletions

View File

@@ -428,6 +428,7 @@ void DeviceManager::prepareFinishScan(bool isNormalFinish, const QString& aReaso
if(mIsEmptyScan) if(mIsEmptyScan)
{ {
insertEmptyScanRecord(); insertEmptyScanRecord();
TRIGGER_EVENT(EmptyScanFinished, nullptr, nullptr);
} }
else else
{ {
@@ -446,11 +447,8 @@ void DeviceManager::prepareFinishScan(bool isNormalFinish, const QString& aReaso
TRIGGER_EVENT(InvokeOperationEnd, nullptr, var); TRIGGER_EVENT(InvokeOperationEnd, nullptr, var);
} }
if(mIsEmptyScan)
{ if(!mIsEmptyScan)
TRIGGER_EVENT(EmptyScanFinished, nullptr, nullptr);
}
else
{ {
ScanProcessSequence::getInstance()->popPosition(); ScanProcessSequence::getInstance()->popPosition();
startAutoLocate(); startAutoLocate();
@@ -1065,7 +1063,7 @@ void DeviceManager::startTransfer()
} }
else else
{ {
emit transferStatusUpdated(); updateTransferState();
} }
} }
@@ -1100,7 +1098,7 @@ void DeviceManager::processTransferProgress(const QString& aProgress)
break; break;
} }
emitInfoCallback(tr("Scan data transfer Succeeded!"), MessageLevel::Sucess); emitInfoCallback(tr("Scan data transfer Succeeded!"), MessageLevel::Sucess);
emit transferStatusUpdated(); updateTransferState();
if(ReconManager::getInstance()->isConnected()) if(ReconManager::getInstance()->isConnected())
{ {
startCreateReconRecord(); startCreateReconRecord();
@@ -1123,6 +1121,7 @@ void DeviceManager::processTransferProgress(const QString& aProgress)
} }
QString message = tr("Scan data transfer failed."); QString message = tr("Scan data transfer failed.");
emitInfoCallback(message, MessageLevel::Error); emitInfoCallback(message, MessageLevel::Error);
updateTransferState();
break; break;
} }
} }
@@ -1138,6 +1137,7 @@ void DeviceManager::processReconCreateEmptyScan(bool aResult, const QString& aSc
QString msg = "DB Error. Code:G504"; QString msg = "DB Error. Code:G504";
emitInfoCallback(msg, MessageLevel::Error); emitInfoCallback(msg, MessageLevel::Error);
} }
EventCenter::Default()->triggerEvent(EmptyScanDataStateUpdated, nullptr, nullptr);
return; return;
} }
@@ -1148,6 +1148,7 @@ void DeviceManager::processReconCreateEmptyScan(bool aResult, const QString& aSc
QString msg = "DB Error. Code:G505"; QString msg = "DB Error. Code:G505";
emitInfoCallback(msg, MessageLevel::Error); emitInfoCallback(msg, MessageLevel::Error);
} }
EventCenter::Default()->triggerEvent(EmptyScanDataStateUpdated, nullptr, nullptr);
} }
void DeviceManager::processReconCreateScan(bool aResult, const QString& aScanID, const QString& aMessage, bool aIsConnectSucceed) void DeviceManager::processReconCreateScan(bool aResult, const QString& aScanID, const QString& aMessage, bool aIsConnectSucceed)
@@ -1267,6 +1268,18 @@ bool DeviceManager::updateTransferProgress()
return false; return false;
} }
void DeviceManager::updateTransferState()
{
if(mIsTransferEmptyScan)
{
EventCenter::Default()->triggerEvent(EmptyScanDataStateUpdated, nullptr, nullptr);
}
else
{
emit transferStatusUpdated();
}
}
int DeviceManager::getTransferProgress() int DeviceManager::getTransferProgress()
{ {
return mTransferProgress; return mTransferProgress;

View File

@@ -130,6 +130,7 @@ private:
void insertEmptyScanRecord(); void insertEmptyScanRecord();
void insertScanRecord(); void insertScanRecord();
void updateTransferState();
private slots: private slots:

View File

@@ -45,6 +45,9 @@ ADD_EVENT_VALUE(StopScanProcess)\
ADD_EVENT_VALUE(CurrentUserInfoChanged)\ ADD_EVENT_VALUE(CurrentUserInfoChanged)\
ADD_EVENT_VALUE(EmptyScanFinished)\ ADD_EVENT_VALUE(EmptyScanFinished)\
ADD_EVENT_VALUE(EmptyScanDataCorrupted)\ ADD_EVENT_VALUE(EmptyScanDataCorrupted)\
ADD_EVENT_VALUE(EmptyScanDataStateUpdated)\
ADD_EVENT_VALUE(EmptyScanDataBroked)\
ADD_EVENT_VALUE(EmptyScanDataExpire)\
ADD_EVENT_VALUE(UserVerificationSuccess)\ ADD_EVENT_VALUE(UserVerificationSuccess)\
ADD_EVENT_VALUE(UsctStateUpdated)\ ADD_EVENT_VALUE(UsctStateUpdated)\
ADD_EVENT_VALUE(SetSelectedPatient)\ ADD_EVENT_VALUE(SetSelectedPatient)\

View File

@@ -44,7 +44,7 @@ void ReconStateDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
progressBarOption.maximum = 100; progressBarOption.maximum = 100;
progressBarOption.progress = progress; progressBarOption.progress = progress;
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOption, painter); QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOption, painter);
painter->restore();
return; return;
} }
case 104: case 104:
@@ -92,6 +92,6 @@ void ReconStateDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
} }
painter->drawText(option.rect, Qt::AlignCenter, displayText); painter->drawText(option.rect, Qt::AlignCenter, displayText);
}
painter->restore(); painter->restore();
} }
}

View File

@@ -1,5 +1,6 @@
#include "SystemCorrectionForm.h" #include "SystemCorrectionForm.h"
#include "db/SQLHelper.h" #include "db/SQLHelper.h"
#include "device/DeviceManager.h"
#include "event/EventCenter.h" #include "event/EventCenter.h"
#include "dialogs/DialogManager.h" #include "dialogs/DialogManager.h"
#include "log/LogManager.h" #include "log/LogManager.h"
@@ -9,11 +10,15 @@
#include <QDate> #include <QDate>
#include <QSpacerItem> #include <QSpacerItem>
#include <QPushButton> #include <QPushButton>
#include <QTimer>
SystemCorrectionForm::SystemCorrectionForm(QWidget* aParent) SystemCorrectionForm::SystemCorrectionForm(QWidget* aParent)
: QWidget(aParent) : QWidget(aParent)
, mCurrentEmptyScanDate(new QLabel(this)) , mCurrentEmptyScanDate(new QLabel(this))
, mExpirationEmptyScanDate(new QLabel(this)) , mExpirationEmptyScanDate(new QLabel(this))
, mCurrentEmptyScanState(new QLabel(this))
, mTimer(new QTimer(this))
, mEmptyScanState()
{ {
setObjectName("SystemCorrectionForm"); setObjectName("SystemCorrectionForm");
init(); init();
@@ -67,6 +72,10 @@ void SystemCorrectionForm::init()
mExpirationEmptyScanDate->setText(tr("Expiration date for Empty Scanning %1").arg(dateFormat)); mExpirationEmptyScanDate->setText(tr("Expiration date for Empty Scanning %1").arg(dateFormat));
vboxLayout->addWidget(mExpirationEmptyScanDate); vboxLayout->addWidget(mExpirationEmptyScanDate);
mEmptyScanState = SQLHelper::queryValue("SELECT State FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toInt();
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
vboxLayout->addWidget(mCurrentEmptyScanState);
QWidget* emptyScanButtonArea = new QWidget(this); QWidget* emptyScanButtonArea = new QWidget(this);
QHBoxLayout* emptyScanButtonLayout = new QHBoxLayout(emptyScanButtonArea); QHBoxLayout* emptyScanButtonLayout = new QHBoxLayout(emptyScanButtonArea);
QPushButton* emptyScanButton = new QPushButton(this); QPushButton* emptyScanButton = new QPushButton(this);
@@ -90,6 +99,7 @@ void SystemCorrectionForm::init()
emptyScanDescribe->setText(tr("Empty water scanning involves collecting ultrasound data while the tank is filled with water and free of any objects. It is essential to ensure that the tank is fully filled with water and devoid of any objects before conducting the scan. The purpose of collecting empty water data is to obtain baseline information on the time and energy variations of ultrasound propagation inside the inspection tank. This information is utilized for reconstructing reference data for transmission ultrasound imaging. Additionally, empty water data can be utilized for system status assessment and spatial calibration of the system. Therefore, empty water scanning should be performed regularly, with a frequency of once every month.")); emptyScanDescribe->setText(tr("Empty water scanning involves collecting ultrasound data while the tank is filled with water and free of any objects. It is essential to ensure that the tank is fully filled with water and devoid of any objects before conducting the scan. The purpose of collecting empty water data is to obtain baseline information on the time and energy variations of ultrasound propagation inside the inspection tank. This information is utilized for reconstructing reference data for transmission ultrasound imaging. Additionally, empty water data can be utilized for system status assessment and spatial calibration of the system. Therefore, empty water scanning should be performed regularly, with a frequency of once every month."));
mCurrentEmptyScanDate->setText(tr("Current date for Empty Scanning %1-%2-%3").arg(lastScanDate.year()).arg(lastScanDate.month()).arg(lastScanDate.day())); mCurrentEmptyScanDate->setText(tr("Current date for Empty Scanning %1-%2-%3").arg(lastScanDate.year()).arg(lastScanDate.month()).arg(lastScanDate.day()));
mExpirationEmptyScanDate->setText(tr("Expiration date for Empty Scanning %1").arg(dateFormat)); mExpirationEmptyScanDate->setText(tr("Expiration date for Empty Scanning %1").arg(dateFormat));
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
emptyScanButton->setText(tr("Excute empty scan")); emptyScanButton->setText(tr("Excute empty scan"));
}); });
@@ -105,8 +115,12 @@ void SystemCorrectionForm::init()
LOG_USER_OPERATION("Start Empty Scan") LOG_USER_OPERATION("Start Empty Scan")
}); });
mTimer->setInterval(1000);
connect(mTimer, &QTimer::timeout, this, &SystemCorrectionForm::updateEmptyScanTransferProgress);
connect(EventCenter::Default(), &EventCenter::EmptyScanFinished, this, &SystemCorrectionForm::updateEmptyScanDate); connect(EventCenter::Default(), &EventCenter::EmptyScanFinished, this, &SystemCorrectionForm::updateEmptyScanDate);
connect(EventCenter::Default(), &EventCenter::EmptyScanDataStateUpdated, this, &SystemCorrectionForm::updateEmptyScanState);
connect(EventCenter::Default(), &EventCenter::EmptyScanDataExpire, this, &SystemCorrectionForm::updateEmptyScanDateExpire);
connect(EventCenter::Default(), &EventCenter::EmptyScanDataBroked, this, &SystemCorrectionForm::updateEmptyScanBroked);
} }
void SystemCorrectionForm::updateEmptyScanDate() void SystemCorrectionForm::updateEmptyScanDate()
@@ -117,4 +131,58 @@ void SystemCorrectionForm::updateEmptyScanDate()
QString dateText = tr("%1-%2-%3").arg(expirationScanDate.year()).arg(expirationScanDate.month()).arg(expirationScanDate.day());; QString dateText = tr("%1-%2-%3").arg(expirationScanDate.year()).arg(expirationScanDate.month()).arg(expirationScanDate.day());;
QString dateFormat = QString(" %1").arg(dateText); QString dateFormat = QString(" %1").arg(dateText);
mExpirationEmptyScanDate->setText(tr("Expiration date for Empty Scanning %1").arg(dateFormat)); mExpirationEmptyScanDate->setText(tr("Expiration date for Empty Scanning %1").arg(dateFormat));
mEmptyScanState = 0;
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
}
void SystemCorrectionForm::updateEmptyScanState()
{
mEmptyScanState = SQLHelper::queryValue("SELECT State FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toInt();
if(mEmptyScanState == 100 && !mTimer->isActive())
{
mTimer->start();
}
else if(mEmptyScanState != 100 && mTimer->isActive())
{
mTimer->stop();
}
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
}
void SystemCorrectionForm::updateEmptyScanTransferProgress()
{
if(DeviceManager::Default()->updateTransferProgress())
{
int progress = DeviceManager::Default()->getTransferProgress();
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState) + QString::number(progress) + "%"));
}
}
void SystemCorrectionForm::updateEmptyScanBroked()
{
mEmptyScanState = -1;
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
}
void SystemCorrectionForm::updateEmptyScanDateExpire()
{
mEmptyScanState = -2;
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
}
QString SystemCorrectionForm::getStateString(int aState)
{
switch (aState)
{
case -2: return QString("<font color='red'>&nbsp;&nbsp;%1</font>").arg(tr("Expired"));
case -1: return QString("<font color='red'>&nbsp;&nbsp;%1</font>").arg(tr("Broked"));
case 0: return tr("Wait To Transfer");
case 100: return tr("Transferring");
case 104: return QString("<font color='red'>&nbsp;&nbsp;%1</font>").arg(tr("Transfer Failed"));
case 200: return tr("Transfer succeed");
case 204: return QString("<font color='red'>&nbsp;&nbsp;%1</font>").arg(tr("Recon Error"));
case 300: return tr("Normal");
case 304: return QString("<font color='red'>&nbsp;&nbsp;%1</font>").arg(tr("Recon Error"));
default: return QString("<font color='red'>&nbsp;&nbsp;%1</font>").arg(tr("Unknow"));
}
} }

View File

@@ -4,6 +4,7 @@
#include <QWidget> #include <QWidget>
class QLabel; class QLabel;
class QTimer;
class SystemCorrectionForm : public QWidget class SystemCorrectionForm : public QWidget
{ {
@@ -15,13 +16,21 @@ public:
private: private:
void init(); void init();
QString getStateString(int aState);
private slots: private slots:
void updateEmptyScanDate(); void updateEmptyScanDate();
void updateEmptyScanState();
void updateEmptyScanTransferProgress();
void updateEmptyScanDateExpire();
void updateEmptyScanBroked();
private: private:
QLabel* mCurrentEmptyScanDate; QLabel* mCurrentEmptyScanDate;
QLabel* mExpirationEmptyScanDate; QLabel* mExpirationEmptyScanDate;
QLabel* mCurrentEmptyScanState;
QTimer* mTimer;
int mEmptyScanState;
}; };
#endif // SYSTEMCORRECTIONFORM_H #endif // SYSTEMCORRECTIONFORM_H

View File

@@ -1882,6 +1882,46 @@ progress:99%</source>
<source>Confirm Scan</source> <source>Confirm Scan</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Broked</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wait To Transfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Transferring</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Transfer Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Recon Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Normal</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknow</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Transfer succeed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Expired</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Current state for Empty Scanning %1</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>SystemSettingForm</name> <name>SystemSettingForm</name>

View File

@@ -469,9 +469,9 @@
<name>DeviceManager</name> <name>DeviceManager</name>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="168"/> <location filename="../device/DeviceManager.cpp" line="168"/>
<location filename="../device/DeviceManager.cpp" line="837"/> <location filename="../device/DeviceManager.cpp" line="835"/>
<location filename="../device/DeviceManager.cpp" line="845"/> <location filename="../device/DeviceManager.cpp" line="843"/>
<location filename="../device/DeviceManager.cpp" line="1449"/> <location filename="../device/DeviceManager.cpp" line="1462"/>
<source>DMS connection error</source> <source>DMS connection error</source>
<translation type="unfinished">DMS失去连接</translation> <translation type="unfinished">DMS失去连接</translation>
</message> </message>
@@ -497,8 +497,8 @@ progress:99%</source>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="257"/> <location filename="../device/DeviceManager.cpp" line="257"/>
<location filename="../device/DeviceManager.cpp" line="898"/> <location filename="../device/DeviceManager.cpp" line="896"/>
<location filename="../device/DeviceManager.cpp" line="906"/> <location filename="../device/DeviceManager.cpp" line="904"/>
<source>Initialize Failed.</source> <source>Initialize Failed.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -518,49 +518,49 @@ progress:99%</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="441"/> <location filename="../device/DeviceManager.cpp" line="442"/>
<source>Scan completed!</source> <source>Scan completed!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="788"/> <location filename="../device/DeviceManager.cpp" line="786"/>
<source>Error: </source> <source>Error: </source>
<translation type="unfinished">: </translation> <translation type="unfinished">: </translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="872"/> <location filename="../device/DeviceManager.cpp" line="870"/>
<source>Start scan failed. Reason:time out.</source> <source>Start scan failed. Reason:time out.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="883"/> <location filename="../device/DeviceManager.cpp" line="881"/>
<source>Start scan failed. Reason:%1</source> <source>Start scan failed. Reason:%1</source>
<translation type="unfinished">%1</translation> <translation type="unfinished">%1</translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="908"/> <location filename="../device/DeviceManager.cpp" line="906"/>
<source>Start CE Scan Failed.</source> <source>Start CE Scan Failed.</source>
<translation type="unfinished">CE扫查启动失败</translation> <translation type="unfinished">CE扫查启动失败</translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="940"/> <location filename="../device/DeviceManager.cpp" line="938"/>
<source>Data is currently being transmitted, please shut down later.</source> <source>Data is currently being transmitted, please shut down later.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="947"/> <location filename="../device/DeviceManager.cpp" line="945"/>
<source>Shut down failed, please push emergency button to shutdown.</source> <source>Shut down failed, please push emergency button to shutdown.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1038"/> <location filename="../device/DeviceManager.cpp" line="1036"/>
<location filename="../device/DeviceManager.cpp" line="1048"/> <location filename="../device/DeviceManager.cpp" line="1046"/>
<location filename="../device/DeviceManager.cpp" line="1124"/> <location filename="../device/DeviceManager.cpp" line="1122"/>
<source>Scan data transfer failed.</source> <source>Scan data transfer failed.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1102"/> <location filename="../device/DeviceManager.cpp" line="1100"/>
<source>Scan data transfer Succeeded!</source> <source>Scan data transfer Succeeded!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -570,39 +570,39 @@ progress:99%</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1166"/> <location filename="../device/DeviceManager.cpp" line="1167"/>
<source>Create scan data failed</source> <source>Create scan data failed</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1233"/> <location filename="../device/DeviceManager.cpp" line="1234"/>
<source>Recon disconnected.</source> <source>Recon disconnected.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1298"/> <location filename="../device/DeviceManager.cpp" line="1311"/>
<location filename="../device/DeviceManager.cpp" line="1313"/> <location filename="../device/DeviceManager.cpp" line="1326"/>
<source>Open pump failed.</source> <source>Open pump failed.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1330"/> <location filename="../device/DeviceManager.cpp" line="1343"/>
<source>Recon error, can&apos;t start scan process</source> <source>Recon error, can&apos;t start scan process</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1371"/> <location filename="../device/DeviceManager.cpp" line="1384"/>
<location filename="../device/DeviceManager.cpp" line="1423"/> <location filename="../device/DeviceManager.cpp" line="1436"/>
<source>Start auto locate failed</source> <source>Start auto locate failed</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1443"/> <location filename="../device/DeviceManager.cpp" line="1456"/>
<source>The data quality is low, please restart the data scan.</source> <source>The data quality is low, please restart the data scan.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../device/DeviceManager.cpp" line="1471"/> <location filename="../device/DeviceManager.cpp" line="1484"/>
<source>Device reset failed, please contact maintenance person</source> <source>Device reset failed, please contact maintenance person</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -1541,20 +1541,20 @@ progress:99%</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="193"/> <location filename="../windows/MainWindow.cpp" line="194"/>
<location filename="../windows/MainWindow.cpp" line="204"/> <location filename="../windows/MainWindow.cpp" line="205"/>
<source>Select</source> <source>Select</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="195"/> <location filename="../windows/MainWindow.cpp" line="196"/>
<location filename="../windows/MainWindow.cpp" line="203"/> <location filename="../windows/MainWindow.cpp" line="204"/>
<source>Scan</source> <source>Scan</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="191"/> <location filename="../windows/MainWindow.cpp" line="192"/>
<location filename="../windows/MainWindow.cpp" line="205"/> <location filename="../windows/MainWindow.cpp" line="206"/>
<source>Recon</source> <source>Recon</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -1565,23 +1565,23 @@ progress:99%</source>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="170"/> <location filename="../windows/MainWindow.cpp" line="170"/>
<location filename="../windows/MainWindow.cpp" line="179"/> <location filename="../windows/MainWindow.cpp" line="180"/>
<location filename="../windows/MainWindow.cpp" line="386"/> <location filename="../windows/MainWindow.cpp" line="387"/>
<source>Warning</source> <source>Warning</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="179"/> <location filename="../windows/MainWindow.cpp" line="180"/>
<source>There are %1 days left until the next empty scan. Please remind users to conduct the empty scan in time.</source> <source>There are %1 days left until the next empty scan. Please remind users to conduct the empty scan in time.</source>
<translation type="unfinished">%1</translation> <translation type="unfinished">%1</translation>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="217"/> <location filename="../windows/MainWindow.cpp" line="218"/>
<source>Shut down failed, please push emergency button to shutdown.</source> <source>Shut down failed, please push emergency button to shutdown.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="386"/> <location filename="../windows/MainWindow.cpp" line="387"/>
<source>Due to empty scan data corruption on the server, needs to be execute the empty scan. No other operations can be conducted until the scan is complete.</source> <source>Due to empty scan data corruption on the server, needs to be execute the empty scan. No other operations can be conducted until the scan is complete.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@@ -1598,8 +1598,8 @@ progress:99%</source>
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../windows/MainWindow.cpp" line="189"/> <location filename="../windows/MainWindow.cpp" line="190"/>
<location filename="../windows/MainWindow.cpp" line="206"/> <location filename="../windows/MainWindow.cpp" line="207"/>
<source>Settings</source> <source>Settings</source>
<translation></translation> <translation></translation>
</message> </message>
@@ -2817,59 +2817,116 @@ parameters
<context> <context>
<name>SystemCorrectionForm</name> <name>SystemCorrectionForm</name>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="34"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="39"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="88"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="97"/>
<source>Scan Preparation</source> <source>Scan Preparation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="44"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="49"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="89"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="98"/>
<source>Empty Scan</source> <source>Empty Scan</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="51"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="56"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="90"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="99"/>
<source>Empty water scanning involves collecting ultrasound data while the tank is filled with water and free of any objects. It is essential to ensure that the tank is fully filled with water and devoid of any objects before conducting the scan. The purpose of collecting empty water data is to obtain baseline information on the time and energy variations of ultrasound propagation inside the inspection tank. This information is utilized for reconstructing reference data for transmission ultrasound imaging. Additionally, empty water data can be utilized for system status assessment and spatial calibration of the system. Therefore, empty water scanning should be performed regularly, with a frequency of once every month.</source> <source>Empty water scanning involves collecting ultrasound data while the tank is filled with water and free of any objects. It is essential to ensure that the tank is fully filled with water and devoid of any objects before conducting the scan. The purpose of collecting empty water data is to obtain baseline information on the time and energy variations of ultrasound propagation inside the inspection tank. This information is utilized for reconstructing reference data for transmission ultrasound imaging. Additionally, empty water data can be utilized for system status assessment and spatial calibration of the system. Therefore, empty water scanning should be performed regularly, with a frequency of once every month.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="60"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="65"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="91"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="100"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="115"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="129"/>
<source>Current date for Empty Scanning %1-%2-%3</source> <source>Current date for Empty Scanning %1-%2-%3</source>
<translation type="unfinished"> %1%2%3</translation> <translation type="unfinished"> %1%2%3</translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="65"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="70"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="117"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="131"/>
<source>%1-%2-%3</source> <source>%1-%2-%3</source>
<translation type="unfinished">%1%2%3</translation> <translation type="unfinished">%1%2%3</translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="67"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="72"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="92"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="101"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="119"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="133"/>
<source>Expiration date for Empty Scanning %1</source> <source>Expiration date for Empty Scanning %1</source>
<translation type="unfinished">%1</translation> <translation type="unfinished">%1</translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="73"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="82"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="93"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="103"/>
<source>Excute empty scan</source> <source>Excute empty scan</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="98"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="108"/>
<source>Please make sure the holder is only contain water!</source> <source>Please make sure the holder is only contain water!</source>
<translation type="unfinished">Holder中已灌满水</translation> <translation type="unfinished">Holder中已灌满水</translation>
</message> </message>
<message> <message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="98"/> <location filename="../forms/settings/SystemCorrectionForm.cpp" line="108"/>
<source>Confirm Scan</source> <source>Confirm Scan</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="76"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="102"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="135"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="149"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="157"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="164"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="170"/>
<source>Current state for Empty Scanning %1</source>
<translation type="unfinished"> %1</translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="177"/>
<source>Expired</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="178"/>
<source>Broked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="179"/>
<source>Wait To Transfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="180"/>
<source>Transferring</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="181"/>
<source>Transfer Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="182"/>
<source>Transfer succeed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="183"/>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="185"/>
<source>Recon Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="184"/>
<source>Normal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="186"/>
<source>Unknow</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>SystemSettingForm</name> <name>SystemSettingForm</name>

View File

@@ -167,6 +167,7 @@ void MainWindow::checkEmptyScanValidity()
if(lastScanDate.isNull() || currentDate.daysTo(expirationScanDate) < 0) if(lastScanDate.isNull() || currentDate.daysTo(expirationScanDate) < 0)
{ {
mTabWidget->setCurrentIndex(3); mTabWidget->setCurrentIndex(3);
EventCenter::Default()->triggerEvent(EmptyScanDataExpire, nullptr, nullptr);
DialogManager::Default()->requestAlertMessage(tr("Please execute the empty scan, assist with system calibration, when empty scan is completed, the system should operate normally."), OkOnly, tr("Warning")); DialogManager::Default()->requestAlertMessage(tr("Please execute the empty scan, assist with system calibration, when empty scan is completed, the system should operate normally."), OkOnly, tr("Warning"));
mTabWidget->setTabEnabled(2, false); mTabWidget->setTabEnabled(2, false);
mTabWidget->setTabEnabled(1, false); mTabWidget->setTabEnabled(1, false);
@@ -382,6 +383,6 @@ void MainWindow::handleEmptyScanDataCorrupted()
mTabWidget->setTabEnabled(2, false); mTabWidget->setTabEnabled(2, false);
mTabWidget->setTabEnabled(1, false); mTabWidget->setTabEnabled(1, false);
mTabWidget->setTabEnabled(0, false); mTabWidget->setTabEnabled(0, false);
EventCenter::Default()->triggerEvent(EmptyScanDataBroked, nullptr, nullptr);
DialogManager::Default()->requestAlertMessage(tr("Due to empty scan data corruption on the server, needs to be execute the empty scan. No other operations can be conducted until the scan is complete."), OkOnly, tr("Warning")); DialogManager::Default()->requestAlertMessage(tr("Due to empty scan data corruption on the server, needs to be execute the empty scan. No other operations can be conducted until the scan is complete."), OkOnly, tr("Warning"));
} }