diff --git a/app/fwupgrade/FWUpgrade_zh_CN.qm b/app/fwupgrade/FWUpgrade_zh_CN.qm
index 99e4f989..6a5c9d87 100644
Binary files a/app/fwupgrade/FWUpgrade_zh_CN.qm and b/app/fwupgrade/FWUpgrade_zh_CN.qm differ
diff --git a/app/fwupgrade/FWUpgrade_zh_CN.ts b/app/fwupgrade/FWUpgrade_zh_CN.ts
index 1c2d055a..46c6ae0e 100644
--- a/app/fwupgrade/FWUpgrade_zh_CN.ts
+++ b/app/fwupgrade/FWUpgrade_zh_CN.ts
@@ -98,7 +98,7 @@
扫描仪维护工具
-
+
固件升级
@@ -113,42 +113,42 @@
设备信息
-
+
在线升级
-
+
获取版本列表
-
+
下载并升级
-
+
版本列表:
-
+
本地升级
-
+
升级文件:
-
+
打开本地文件
-
+
升级
@@ -162,149 +162,147 @@
滚轴计数:
-
-
- 0
+ 0
-
+
历史扫描张数:
-
+
清除滚轴计数
-
+
序列号:
-
+
固件号:
-
+
速度模式:
-
+
电机固件版本:
-
+
correction
平场校正
-
+
畸变校正
-
+
24位彩色
-
+
256级灰度
-
+
200
-
+
300
-
+
600
-
+
颜色模式:
-
+
分辨率:
-
+
获取畸变值
-
+
设置畸变值
-
+
开始扫描
-
+
开始自动校正
-
+
未校正
-
+
导出专用测试纸到本地
-
+
计算畸变值:
-
+
修改账户密码
-
+
旧密码:
-
+
新密码:
-
+
确认修改
-
+
确认新密码:
-
+
关闭
@@ -327,7 +325,13 @@
-
+
+
+
+
+
+
+
不支持
@@ -336,27 +340,27 @@
打开设备错误:%1
-
+
无设备打开
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
提示
-
+
未获取到可升级版本
@@ -365,7 +369,7 @@
确定
-
+
打开文件
@@ -374,9 +378,9 @@
压缩文件(* .zip)
-
-
-
+
+
+
设备:%1 固件升级成功
@@ -400,13 +404,13 @@
固件更新: %1
-
+
压缩文件(*.zip)
-
-
+
+
选择的固件版本比当前版本低
@@ -415,7 +419,7 @@
固件不匹配
-
+
固件文件版本不匹配,是否继续?
@@ -444,84 +448,83 @@
-
电机固件版本: %1
-
+
设备被其他进程占用
-
+
打开设备失败
-
-
-
+
+
+
设备:%1 固件升级失败,IO错误
-
+
下载固件失败
-
+
滚轴计数已清零
-
+
设备不支持
-
+
清除滚轴计数失败
-
+
旧密码错误
-
+
新密码不能为空
-
+
新密码不一致
-
+
密码修改失败
-
+
密码修改成功
-
+
校正中...
-
+
导出专用测试纸
-
+
jpg(*.jpg)
@@ -532,16 +535,19 @@
-
-
-
-
+
+
+
+
+
+
+
提示
-
+
请确认设备已正确放置校正纸!
@@ -572,38 +578,51 @@
计算畸变值成功: %1
-
+
+
+
+
+ 滚轴计数: %1
+
+
+
+
+
+ 历史扫描张数: %1
+
+
+
获取畸变值失败
-
+
获取失败
-
+
获取畸变值成功: %1
-
+
颜色模式: %1, 分辨率 :%2
-
-
+
+
设置失败
-
+
设置成功
-
+
校正失败
diff --git a/app/fwupgrade/mainwindow.cpp b/app/fwupgrade/mainwindow.cpp
index e9a969d4..e3fac9cf 100644
--- a/app/fwupgrade/mainwindow.cpp
+++ b/app/fwupgrade/mainwindow.cpp
@@ -434,8 +434,8 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
ui->comboVersionList->clear();
ui->editFilePath->clear();
- ui->labelRollCount->setText("0");
- ui->labelScanCount->setText("0");
+ ui->label_rollerCout->setText(QString(tr("roll count: %1")).arg(QString::number(0)));
+ ui->label_scanCount->setText(QString(tr("scan count: %1")).arg(QString::number(0)));
ui->label_deviceError->clear();
ui->labelDevInfo->clear();
@@ -501,11 +501,11 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_GET_ROLLER_NUM, &rollCount, &rollCountSize);
if(ret == SANE_STATUS_GOOD && rollCount >= 0)
{
- ui->labelRollCount->setText(QString("%1").arg(rollCount));
+ ui->label_rollerCout->setText(QString(tr("roll count: %1")).arg(rollCount));
}
else
{
- ui->labelRollCount->setText(tr("do not support"));
+ ui->label_rollerCout->setText(tr("do not support"));
}
SANE_Int scanCount = 0;
@@ -513,11 +513,11 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_GET_HISTORY_SCAN_NUM, &scanCount, &scanCountSize);
if (ret == SANE_STATUS_GOOD && scanCount >= 0)
{
- ui->labelScanCount->setText(QString("%1").arg(scanCount));
+ ui->label_scanCount->setText(QString(tr("scan count: %1")).arg(scanCount));
}
else
{
- ui->labelScanCount->setText(tr("do not support"));
+ ui->label_scanCount->setText(tr("do not support"));
}
char motorVersion[256] = {0};
@@ -777,7 +777,7 @@ void MainWindow::on_btnClearRollCount_clicked()
QString info;
if (ret == SANE_STATUS_GOOD)
{
- ui->labelRollCount->setText("0");
+ ui->label_rollerCout->setText(QString(tr("roll count: %1")).arg(QString::number(0)));
info = tr("Roller scanned count has been set to 0.");
}
else if (ret == SANE_STATUS_UNSUPPORTED)
@@ -845,12 +845,22 @@ void MainWindow::on_pushButton_getDistortion_clicked()
float distortion = 1.0;
unsigned int len = sizeof(SANE_Bool);
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_GET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
- if (ret != SANE_STATUS_GOOD)
+ if (ret == SANE_STATUS_GOOD)
+ {
+ }
+ else if (ret == SANE_STATUS_UNSUPPORTED)
+ {
+ addContent(ui->textBrowser_disCorrect, tr("do not support"), false);
+ QMessageBox::information(this, tr("Prompt"), tr("do not support"));
+ return;
+ }
+ else
{
addContent(ui->textBrowser_disCorrect, tr("Get distortion failed"), false);
QMessageBox::information(this, tr("Prompt"), tr("Get failed"));
return;
}
+
QString value(QString::number(distortion, 'f', 4));
addContent(ui->textBrowser_disCorrect, tr("Get distortion succeed: %1").arg(value), true);
ui->lineEdit_getDistortion->setText(value);
@@ -864,19 +874,24 @@ void MainWindow::on_pushButton_setDistortion_clicked()
initColorAndDpi();
-
float distortion = value.toFloat();
unsigned int len = sizeof(int);
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
- if (ret != SANE_STATUS_GOOD)
+ if (ret == SANE_STATUS_GOOD)
{
- addContent(ui->textBrowser_disCorrect, tr("Set failed").arg(value), true);
- QMessageBox::information(this, tr("Prompt"), tr("Set failed"));
+ addContent(ui->textBrowser_disCorrect, tr("Set succeed"), true);
+ }
+ else if (ret == SANE_STATUS_UNSUPPORTED)
+ {
+ addContent(ui->textBrowser_disCorrect, tr("do not support"), false);
+ QMessageBox::information(this, tr("Prompt"), tr("do not support"));
return;
}
else
{
- addContent(ui->textBrowser_disCorrect, tr("Set succeed"), true);
+ addContent(ui->textBrowser_disCorrect, tr("Set failed").arg(value), true);
+ QMessageBox::information(this, tr("Prompt"), tr("Set failed"));
+ return;
}
}
@@ -897,15 +912,22 @@ void MainWindow::on_pushButton_correct_clicked()
int type = 0;
unsigned int len = sizeof(int);;
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_SET_AUTO_FALT, (void*)&type, &len);
- if (ret != SANE_STATUS_GOOD)
+ if (ret == SANE_STATUS_GOOD)
{
- QMessageBox::information(this, tr("Prompt"), tr("Correct failed"));
+ ui->label_correct->setText(tr("correcting..."));
+ }
+ else if (ret == SANE_STATUS_UNSUPPORTED)
+ {
+ QMessageBox::information(this, tr("Prompt"), tr("do not support"));
+ ui->label_correct->setText(tr("do not support"));
return;
}
else
{
- ui->label_correct->setText(tr("correcting..."));
+ QMessageBox::information(this, tr("Prompt"), tr("Correct failed"));
+ return;
}
+
}
void MainWindow::on_pushButton_exportTestPaper_clicked()
diff --git a/app/fwupgrade/mainwindow.ui b/app/fwupgrade/mainwindow.ui
index ef605281..f3131d5e 100644
--- a/app/fwupgrade/mainwindow.ui
+++ b/app/fwupgrade/mainwindow.ui
@@ -83,12 +83,12 @@
device information
-
+
- 220
- 140
- 71
+ 221
+ 141
+ 311
20
@@ -96,41 +96,21 @@
roll count:
-
+
- 290
- 140
- 81
- 21
-
-
-
- 0
-
-
-
-
-
- 310
- 180
- 81
- 21
-
-
-
- 0
-
-
-
-
-
- 220
- 180
- 81
+ 221
+ 181
+ 321
20
+
+
+ 81
+ 20
+
+
scan count:
@@ -371,10 +351,16 @@
490
200
- 141
+ 161
23
+
+
+ 161
+ 23
+
+
Export test paper