feat: Remove auto locate in scan process and change prompt after scanning one side.

This commit is contained in:
sunwen
2024-09-23 10:08:53 +08:00
parent aecc6d6943
commit 37b67b99da
5 changed files with 272 additions and 255 deletions

View File

@@ -194,9 +194,9 @@ void CoordinateXYWidget::updateStopFlash()
void CoordinateXYWidget::startFlash()
{
show();
connect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateFlash);
mStopGradientEnd = 1;
mTimer->start(20);
// connect(mTimer,&QTimer::timeout,this, &CoordinateXYWidget::updateFlash);
// mStopGradientEnd = 1;
// mTimer->start(20);
}
void CoordinateXYWidget::stopFlash()

View File

@@ -34,6 +34,7 @@ CoordinateZWidget::CoordinateZWidget(QWidget* aParent)
connect(ScanProcessSequence::getInstance(), &ScanProcessSequence::quitAutoLocate, this, &CoordinateZWidget::quit);
connect(ScanProcessSequence::getInstance(), &ScanProcessSequence::autoLocateZUpdated, this, &CoordinateZWidget::setBlinkPoint);
hide();
mBlinkPoint.setY(204);
}
void CoordinateZWidget::paintEvent(QPaintEvent* aEvent)
@@ -116,9 +117,9 @@ void CoordinateZWidget::setBlinkPoint(int aZ)
void CoordinateZWidget::startFlash()
{
show();
connect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateFlash);
mStopGradientEnd = 1;
mTimer->start(20);
// connect(mTimer,&QTimer::timeout,this, &CoordinateZWidget::updateFlash);
// mStopGradientEnd = 1;
// mTimer->start(20);
}
void CoordinateZWidget::stopFlash()

View File

@@ -428,7 +428,8 @@ void DeviceManager::prepareFinishScan(bool isNormalFinish, const QString& aReaso
if(isCompleteNotify)
{
QString msg = tr("Scan completed!");
QString msg = ScanProcessSequence::getInstance()->getScanPositionSize() == 2 ? tr("Scan completed! Please prepare for the next scan. \n"
"Click the confirm button after lying down.") : tr("Scan completed!") ;
TRIGGER_EVENT(InvokeOperationEnd, nullptr, (QObject *)&msg);
}
else
@@ -1321,7 +1322,7 @@ void DeviceManager::stopScanProcess()
AppGlobalValues::setInProcessing(false);
mIsScanning = false;
LOG_SYS_OPERATION("Stop scan process.")
stopAutoLocate();
//stopAutoLocate();
}
bool DeviceManager::startAutoLocate()
@@ -1331,24 +1332,27 @@ bool DeviceManager::startAutoLocate()
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
return false;
}
auto result = mStartAutoLocateAction->execute();
if(result.mIsSucessful)
{
mIsAutoLocating = true;
QJsonObject jsonObj = toJsonObject(result.mData);
if(jsonObj["code"].toInt() == 0 )
{
emit startAutoLocateResult(true);
mEffectivePositionCount = 0;
mGetAutoLocatePositionTimer = startTimer(1000);
emit autolocatePositionEffective();
return true;
}
}
TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
QString errorMessage = tr("Start auto locate failed");
THROW_ERROR(errorMessage)
LOG_SYS_OPERATION("Start auto locate failed.")
return false;
// auto result = mStartAutoLocateAction->execute();
// if(result.mIsSucessful)
// {
// mIsAutoLocating = true;
// QJsonObject jsonObj = toJsonObject(result.mData);
// if(jsonObj["code"].toInt() == 0 )
// {
// emit startAutoLocateResult(true);
// mEffectivePositionCount = 0;
// mGetAutoLocatePositionTimer = startTimer(1000);
// return true;
// }
// }
// TRIGGER_EVENT(StopScanProcess, nullptr, nullptr);
// QString errorMessage = tr("Start auto locate failed");
// THROW_ERROR(errorMessage)
// LOG_SYS_OPERATION("Start auto locate failed.")
// return false;
}
void DeviceManager::stopAutoLocate()

View File

@@ -370,6 +370,11 @@ progress:99%</source>
<source>Error: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Scan completed! Please prepare for the next scan.
Click the confirm button after lying down.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DicomCfgDialog</name>

File diff suppressed because it is too large Load Diff