diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index ad918f5..e4436ec 100644
Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts
index e44b311..ca61f36 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -851,7 +851,7 @@
- 图像像素:
+ 标准圆宽高:
@@ -1004,7 +1004,7 @@
Are you sure to connect the new device
- 检测到设备,请先确认是否已经复位
+ 检测到设备,请先确认是否已经复位
diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp
index 930efd7..8e5bbad 100644
--- a/app/HGProductionTool/form_maininterface.cpp
+++ b/app/HGProductionTool/form_maininterface.cpp
@@ -48,7 +48,7 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, Dialog_logIn::
connect(this, SIGNAL(testResult(QString)), this, SLOT(on_testResult(QString)), Qt::QueuedConnection);
connect(this, SIGNAL(testResultImg(void*)), this, SLOT(on_testResultImg(void*)), Qt::QueuedConnection);
- connect(this, SIGNAL(testDistortion(void*)), this, SLOT(on_testDistortion(void*)), Qt::QueuedConnection);
+ connect(this, &Form_mainInterface::testDistortion, this, &Form_mainInterface::on_testDistortion);
connect(this, SIGNAL(testCorrectInfo(QString)), this, SLOT(on_testCorrectInfo(QString)), Qt::QueuedConnection);
QString str;
@@ -194,11 +194,19 @@ void Form_mainInterface::on_testResultImg(void *img)
HGBase_DestroyImage(image);
}
-void Form_mainInterface::on_testDistortion(void *data)
+void Form_mainInterface::on_testDistortion(SANE_DISTORTION_VAL data)
{
- SANE_DISTORTION_VAL val = *(SANE_DISTORTION_VAL*)data;
- ui->label_imgInfo->setText(tr("image pixel: ") + QString::number(val.w, 'f') + " * " + QString::number(val.h, 'f'));
- ui->label_destortionInfo->setText(tr("destortion value: ") + QString::number(val.scaleXY, 'f'));
+ ui->label_imgInfo->setVisible(true);
+ ui->label_destortionInfo->setVisible(true);
+
+// SANE_DISTORTION_VAL* val = (SANE_DISTORTION_VAL*)data;
+
+// double width = val->w;
+// double height = val->h;
+// double scaleXY = val->scaleXY;
+
+ ui->label_imgInfo->setText(tr("image pixel: ") + QString::number(data.w, 'f') + " * " + QString::number(data.h, 'f'));
+ ui->label_destortionInfo->setText(tr("destortion value: ") + QString::number(data.scaleXY, 'f'));
// updateImgPixelInfo();
@@ -421,7 +429,10 @@ QString Form_mainInterface::getItemStatusStr(HGUInt status)
QString Form_mainInterface::getCachePath()
{
HGChar cachePath[512];
- HGBase_GetConfigPath(cachePath, 512);
+ HGBase_GetDocumentsPath(cachePath, 512);
+ HGChar procName[512];
+ HGBase_GetProcessName(procName, 512);
+ strcat(cachePath, procName);
strcat(cachePath, "/Cache/");
return getStdFileName(StdStringToUtf8(cachePath).c_str());
@@ -590,14 +601,20 @@ void Form_mainInterface::on_pbtn_start_clicked()
QString title = item->text();
QString name = m_map_title_name.value(title).name;
int dpi = m_map_title_name.value(title).resolution;
+ wchar_t buf[5] = {0};
+ if (dpi > 0)
+ {
+ swprintf(buf, L"%d", dpi);
+ }
+
if (m_hg != nullptr)
{
updateUiEnabled(false);
m_isTesting = true;
m_mainwnd->addTestingRef();
- if (dpi > 0)
- func_test_go(name.toStdWString().c_str(), (const wchar_t*)&dpi, m_hg);
+ if (buf != nullptr && dpi > 0)
+ func_test_go(name.toStdWString().c_str(), (const wchar_t*)buf, m_hg);
else
func_test_go(name.toStdWString().c_str(), L"null", m_hg);
}
diff --git a/app/HGProductionTool/form_maininterface.h b/app/HGProductionTool/form_maininterface.h
index ff09d8a..61681ee 100644
--- a/app/HGProductionTool/form_maininterface.h
+++ b/app/HGProductionTool/form_maininterface.h
@@ -38,13 +38,13 @@ protected:
signals:
void testResult(QString text);
void testResultImg(void* img);
- void testDistortion(void *data);
+ void testDistortion(SANE_DISTORTION_VAL data);
void testCorrectInfo(QString info);
private slots:
void on_testResult(QString text);
void on_testResultImg(void* img);
- void on_testDistortion(void *data);
+ void on_testDistortion(SANE_DISTORTION_VAL data);
void on_testCorrectInfo(QString info);
void on_viewerDblClick();
diff --git a/app/HGProductionTool/hgscanner.cpp b/app/HGProductionTool/hgscanner.cpp
index dc2e98c..412f126 100644
--- a/app/HGProductionTool/hgscanner.cpp
+++ b/app/HGProductionTool/hgscanner.cpp
@@ -100,7 +100,14 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
{
if (data != nullptr)
{
- emit m_interface->testDistortion(data);
+// qDebug() << ((SANE_DISTORTION_VAL*)data)->w;
+// qDebug() << ((SANE_DISTORTION_VAL*)data)->h;
+// qDebug() << ((SANE_DISTORTION_VAL*)data)->scaleXY;
+
+ if (m_interface != nullptr)
+ {
+ emit m_interface->testDistortion(*((SANE_DISTORTION_VAL*)data));
+ }
}
}
else if (ev == TEST_EVENT_FALT_INFO)