feat: Remove check empty scan validity date.
This commit is contained in:
@@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
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))
|
// , mCurrentEmptyScanState(new QLabel(this))
|
||||||
, mEmptyScanState()
|
, mEmptyScanState()
|
||||||
{
|
{
|
||||||
setObjectName("SystemCorrectionForm");
|
setObjectName("SystemCorrectionForm");
|
||||||
@@ -60,20 +60,20 @@ void SystemCorrectionForm::init()
|
|||||||
endline->setFixedHeight(3);
|
endline->setFixedHeight(3);
|
||||||
vboxLayout->addWidget(endline);
|
vboxLayout->addWidget(endline);
|
||||||
|
|
||||||
QDate lastScanDate = SQLHelper::queryValue("SELECT ScanDateTime FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toDate();
|
// QDate lastScanDate = SQLHelper::queryValue("SELECT ScanDateTime FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toDate();
|
||||||
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()));
|
||||||
vboxLayout->addWidget(mCurrentEmptyScanDate);
|
// vboxLayout->addWidget(mCurrentEmptyScanDate);
|
||||||
|
|
||||||
QDate expirationScanDate = lastScanDate.addMonths(1);
|
// QDate expirationScanDate = lastScanDate.addMonths(1);
|
||||||
QDate currentDate = QDate::currentDate();
|
// QDate currentDate = QDate::currentDate();
|
||||||
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 = currentDate.daysTo(expirationScanDate) < 3 ? QString("<font color='red'> %1</font>").arg(dateText) : QString(" %1").arg(dateText);
|
// QString dateFormat = currentDate.daysTo(expirationScanDate) < 3 ? QString("<font color='red'> %1</font>").arg(dateText) : 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));
|
||||||
vboxLayout->addWidget(mExpirationEmptyScanDate);
|
// vboxLayout->addWidget(mExpirationEmptyScanDate);
|
||||||
|
|
||||||
mEmptyScanState = SQLHelper::queryValue("SELECT State FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toInt();
|
// 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)));
|
// mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
||||||
vboxLayout->addWidget(mCurrentEmptyScanState);
|
// vboxLayout->addWidget(mCurrentEmptyScanState);
|
||||||
|
|
||||||
QWidget* emptyScanButtonArea = new QWidget(this);
|
QWidget* emptyScanButtonArea = new QWidget(this);
|
||||||
QHBoxLayout* emptyScanButtonLayout = new QHBoxLayout(emptyScanButtonArea);
|
QHBoxLayout* emptyScanButtonLayout = new QHBoxLayout(emptyScanButtonArea);
|
||||||
@@ -96,11 +96,11 @@ void SystemCorrectionForm::init()
|
|||||||
title->setText(tr("Scan Preparation"));
|
title->setText(tr("Scan Preparation"));
|
||||||
emptyScanTitle->setText(tr("Empty Scan"));
|
emptyScanTitle->setText(tr("Empty Scan"));
|
||||||
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()));
|
||||||
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 = currentDate.daysTo(expirationScanDate) < 3 ? QString("<font color='red'> %1</font>").arg(dateText) : QString(" %1").arg(dateText);
|
// QString dateFormat = currentDate.daysTo(expirationScanDate) < 3 ? QString("<font color='red'> %1</font>").arg(dateText) : 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));
|
||||||
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
// mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
||||||
emptyScanButton->setText(tr("Excute empty scan"));
|
emptyScanButton->setText(tr("Excute empty scan"));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -116,41 +116,41 @@ void SystemCorrectionForm::init()
|
|||||||
LOG_USER_OPERATION("Start Empty Scan")
|
LOG_USER_OPERATION("Start Empty Scan")
|
||||||
});
|
});
|
||||||
|
|
||||||
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::EmptyScanDataStateUpdated, this, &SystemCorrectionForm::updateEmptyScanState);
|
||||||
connect(EventCenter::Default(), &EventCenter::EmptyScanDataExpire, this, &SystemCorrectionForm::updateEmptyScanDateExpire);
|
// connect(EventCenter::Default(), &EventCenter::EmptyScanDataExpire, this, &SystemCorrectionForm::updateEmptyScanDateExpire);
|
||||||
connect(EventCenter::Default(), &EventCenter::EmptyScanDataBroked, this, &SystemCorrectionForm::updateEmptyScanBroked);
|
// connect(EventCenter::Default(), &EventCenter::EmptyScanDataBroked, this, &SystemCorrectionForm::updateEmptyScanBroked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemCorrectionForm::updateEmptyScanDate()
|
//void SystemCorrectionForm::updateEmptyScanDate()
|
||||||
{
|
//{
|
||||||
QDate lastScanDate = QDate::currentDate();
|
// QDate lastScanDate = QDate::currentDate();
|
||||||
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()));
|
||||||
QDate expirationScanDate = lastScanDate.addMonths(1);
|
// QDate expirationScanDate = lastScanDate.addMonths(1);
|
||||||
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;
|
// mEmptyScanState = 0;
|
||||||
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
// mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
||||||
}
|
//}
|
||||||
|
|
||||||
void SystemCorrectionForm::updateEmptyScanState()
|
//void SystemCorrectionForm::updateEmptyScanState()
|
||||||
{
|
//{
|
||||||
mEmptyScanState = SQLHelper::queryValue("SELECT State FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toInt();
|
// 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)));
|
// mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
||||||
}
|
//}
|
||||||
|
|
||||||
void SystemCorrectionForm::updateEmptyScanBroked()
|
//void SystemCorrectionForm::updateEmptyScanBroked()
|
||||||
{
|
//{
|
||||||
mEmptyScanState = -1;
|
// mEmptyScanState = -1;
|
||||||
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
// mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
||||||
}
|
//}
|
||||||
|
|
||||||
void SystemCorrectionForm::updateEmptyScanDateExpire()
|
//void SystemCorrectionForm::updateEmptyScanDateExpire()
|
||||||
{
|
//{
|
||||||
mEmptyScanState = -2;
|
// mEmptyScanState = -2;
|
||||||
mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
// mCurrentEmptyScanState->setText(tr("Current state for Empty Scanning %1").arg(getStateString(mEmptyScanState)));
|
||||||
}
|
//}
|
||||||
|
|
||||||
QString SystemCorrectionForm::getStateString(int aState)
|
QString SystemCorrectionForm::getStateString(int aState)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ private:
|
|||||||
QString getStateString(int aState);
|
QString getStateString(int aState);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateEmptyScanDate();
|
// void updateEmptyScanDate();
|
||||||
void updateEmptyScanState();
|
// void updateEmptyScanState();
|
||||||
void updateEmptyScanDateExpire();
|
// void updateEmptyScanDateExpire();
|
||||||
void updateEmptyScanBroked();
|
// void updateEmptyScanBroked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel* mCurrentEmptyScanDate;
|
// QLabel* mCurrentEmptyScanDate;
|
||||||
QLabel* mExpirationEmptyScanDate;
|
// QLabel* mExpirationEmptyScanDate;
|
||||||
QLabel* mCurrentEmptyScanState;
|
// QLabel* mCurrentEmptyScanState;
|
||||||
int mEmptyScanState;
|
int mEmptyScanState;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1080,18 +1080,10 @@ After lying down, click the confirm buttonto start scanning on the next side.</s
|
|||||||
<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>
|
|
||||||
<source>Please execute the empty scan, assist with system calibration, when empty scan is completed, the system should operate normally.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<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"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<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>
|
||||||
@@ -1980,18 +1972,6 @@ The emergency button has been pushed. Please reset it before other operations.</
|
|||||||
<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>
|
|
||||||
<source>Current date for Empty Scanning %1-%2-%3</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>%1-%2-%3</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Expiration date for Empty Scanning %1</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Excute empty scan</source>
|
<source>Excute empty scan</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -2024,10 +2004,6 @@ The emergency button has been pushed. Please reset it before other operations.</
|
|||||||
<source>Expired</source>
|
<source>Expired</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Current state for Empty Scanning %1</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Scan completed</source>
|
<source>Scan completed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
|||||||
@@ -498,7 +498,7 @@
|
|||||||
<location filename="../device/DeviceManager.cpp" line="412"/>
|
<location filename="../device/DeviceManager.cpp" line="412"/>
|
||||||
<source>Patient can leave.
|
<source>Patient can leave.
|
||||||
progress:%1%</source>
|
progress:%1%</source>
|
||||||
<translation type="unfinished">患者可以起身
|
<translation type="unfinished">检查对象可以起身
|
||||||
进度:%1%</translation>
|
进度:%1%</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@@ -1618,21 +1618,17 @@ After lying down, click the confirm buttonto start scanning on the next side.</s
|
|||||||
<translation>重建</translation>
|
<translation>重建</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../windows/MainWindow.cpp" line="174"/>
|
|
||||||
<source>Please execute the empty scan, assist with system calibration, when empty scan is completed, the system should operate normally.</source>
|
<source>Please execute the empty scan, assist with system calibration, when empty scan is completed, the system should operate normally.</source>
|
||||||
<translation type="unfinished">请先进行空水扫查,辅助系统校正,空水扫查结束后,系统正常运行。</translation>
|
<translation type="obsolete">请先进行空水扫查,辅助系统校正,空水扫查结束后,系统正常运行。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../windows/MainWindow.cpp" line="174"/>
|
|
||||||
<location filename="../windows/MainWindow.cpp" line="183"/>
|
|
||||||
<location filename="../windows/MainWindow.cpp" line="390"/>
|
<location filename="../windows/MainWindow.cpp" line="390"/>
|
||||||
<source>Warning</source>
|
<source>Warning</source>
|
||||||
<translation type="unfinished">警告</translation>
|
<translation type="unfinished">警告</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../windows/MainWindow.cpp" line="183"/>
|
|
||||||
<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="obsolete">距离下次空水扫查还有%1天,请用户及时进行空水扫查。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../windows/MainWindow.cpp" line="221"/>
|
<location filename="../windows/MainWindow.cpp" line="221"/>
|
||||||
@@ -3045,25 +3041,16 @@ parameters
|
|||||||
<translation type="unfinished">空水扫描是采集空水时的超声数据,需确保检查仓内部装满水且无物体时执行。空水数据是为了获取超声在检查仓内部传播的时间和能量的变化基准信息,用于重建透射超声图像的参考数据。另一方面,空水数据也可给系统状态的判断和系统的空间校正提供数据支持,故空水扫描需隔一个月定期执行。</translation>
|
<translation type="unfinished">空水扫描是采集空水时的超声数据,需确保检查仓内部装满水且无物体时执行。空水数据是为了获取超声在检查仓内部传播的时间和能量的变化基准信息,用于重建透射超声图像的参考数据。另一方面,空水数据也可给系统状态的判断和系统的空间校正提供数据支持,故空水扫描需隔一个月定期执行。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="64"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="99"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="128"/>
|
|
||||||
<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="obsolete">当前空水数据扫描时间 %1年%2月%3日</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="69"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="100"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="130"/>
|
|
||||||
<source>%1-%2-%3</source>
|
<source>%1-%2-%3</source>
|
||||||
<translation type="unfinished">%1年%2月%3日</translation>
|
<translation type="obsolete">%1年%2月%3日</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="71"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="102"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="132"/>
|
|
||||||
<source>Expiration date for Empty Scanning %1</source>
|
<source>Expiration date for Empty Scanning %1</source>
|
||||||
<translation type="unfinished">当前空水数据有效期限%1</translation>
|
<translation type="obsolete">当前空水数据有效期限%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="81"/>
|
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="81"/>
|
||||||
@@ -3087,14 +3074,8 @@ parameters
|
|||||||
<translation type="unfinished">扫查结束</translation>
|
<translation type="unfinished">扫查结束</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="75"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="103"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="134"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="140"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="146"/>
|
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="152"/>
|
|
||||||
<source>Current state for Empty Scanning %1</source>
|
<source>Current state for Empty Scanning %1</source>
|
||||||
<translation type="unfinished">当前空水数据系统状态 %1</translation>
|
<translation type="obsolete">当前空水数据系统状态 %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="159"/>
|
<location filename="../forms/settings/SystemCorrectionForm.cpp" line="159"/>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ MainWindow::MainWindow(QWidget* aParent)
|
|||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(EventCenter::Default(), &EventCenter::LoginSuccess, this,&MainWindow::checkEmptyScanValidity);
|
//connect(EventCenter::Default(), &EventCenter::LoginSuccess, this,&MainWindow::checkEmptyScanValidity);
|
||||||
connect(EventCenter::Default(), &EventCenter::EmptyScanFinished, this,&MainWindow::enableAllTabWidget);
|
connect(EventCenter::Default(), &EventCenter::EmptyScanFinished, this,&MainWindow::enableAllTabWidget);
|
||||||
connect(EventCenter::Default(), &EventCenter::EmptyScanDataCorrupted, this, &MainWindow::handleEmptyScanDataCorrupted);
|
connect(EventCenter::Default(), &EventCenter::EmptyScanDataCorrupted, this, &MainWindow::handleEmptyScanDataCorrupted);
|
||||||
|
|
||||||
@@ -162,28 +162,28 @@ void MainWindow::initializeLayout()
|
|||||||
mShutdownWidget->setVisible(false);
|
mShutdownWidget->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::checkEmptyScanValidity()
|
//void MainWindow::checkEmptyScanValidity()
|
||||||
{
|
//{
|
||||||
QDate lastScanDate = SQLHelper::queryValue("SELECT ScanDateTime FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toDate();
|
// QDate lastScanDate = SQLHelper::queryValue("SELECT ScanDateTime FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toDate();
|
||||||
QDate expirationScanDate = lastScanDate.addMonths(1);
|
// QDate expirationScanDate = lastScanDate.addMonths(1);
|
||||||
QDate currentDate = QDate::currentDate();
|
// QDate currentDate = QDate::currentDate();
|
||||||
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);
|
// 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);
|
||||||
mTabWidget->setTabEnabled(0, false);
|
// mTabWidget->setTabEnabled(0, false);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(currentDate.daysTo(expirationScanDate) < 3)
|
// if(currentDate.daysTo(expirationScanDate) < 3)
|
||||||
{
|
// {
|
||||||
DialogManager::Default()->requestAlertMessage(tr("There are %1 days left until the next empty scan. Please remind users to conduct the empty scan in time.").arg(currentDate.daysTo(expirationScanDate) + 1), OkOnly, tr("Warning"));
|
// DialogManager::Default()->requestAlertMessage(tr("There are %1 days left until the next empty scan. Please remind users to conduct the empty scan in time.").arg(currentDate.daysTo(expirationScanDate) + 1), OkOnly, tr("Warning"));
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
void MainWindow::initializeTabWidget()
|
void MainWindow::initializeTabWidget()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ private:
|
|||||||
void loadStyleSheet(const QString& aSheetName);
|
void loadStyleSheet(const QString& aSheetName);
|
||||||
void showShutdownWidget();
|
void showShutdownWidget();
|
||||||
void processShutdownDmsFailed();
|
void processShutdownDmsFailed();
|
||||||
void checkEmptyScanValidity();
|
// void checkEmptyScanValidity();
|
||||||
void enableAllTabWidget();
|
void enableAllTabWidget();
|
||||||
void handleEmptyScanDataCorrupted();
|
void handleEmptyScanDataCorrupted();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user