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 @@ 扫描仪维护工具 - + update firmware 固件升级 @@ -113,42 +113,42 @@ 设备信息 - + online upgrade 在线升级 - + get version list 获取版本列表 - + download and upgrade 下载并升级 - + version list 版本列表: - + local upgrade 本地升级 - + file path 升级文件: - + open file path 打开本地文件 - + upgrade 升级 @@ -162,149 +162,147 @@ 滚轴计数: - - 0 - 0 + 0 - + scan count: 历史扫描张数: - + clear roll count 清除滚轴计数 - + Serial number: 序列号: - + Firmware number: 固件号: - + Speed mode: 速度模式: - + motor version: 电机固件版本: - + flat correct correction 平场校正 - + distortion correct 畸变校正 - + Color 24位彩色 - + Gray 256级灰度 - + 200 200 - + 300 300 - + 600 600 - + Color mode: 颜色模式: - + Dpi: 分辨率: - + Get distortion 获取畸变值 - + Set distortion 设置畸变值 - + Start scan 开始扫描 - + Correct 开始自动校正 - + Have not corrected 未校正 - + Export test paper 导出专用测试纸到本地 - + Count distortion: 计算畸变值: - + password change 修改账户密码 - + old password 旧密码: - + new password 新密码: - + modify password 确认修改 - + confirm new password 确认新密码: - + exit 关闭 @@ -327,7 +325,13 @@ - + + + + + + + do not support 不支持 @@ -336,27 +340,27 @@ 打开设备错误:%1 - + no device opened 无设备打开 - - - - - - - - - - - + + + + + + + + + + + tips 提示 - + no version available 未获取到可升级版本 @@ -365,7 +369,7 @@ 确定 - + Open File 打开文件 @@ -374,9 +378,9 @@ 压缩文件(* .zip) - - - + + + device: %1 upgrade firmware success 设备:%1 固件升级成功 @@ -400,13 +404,13 @@ 固件更新: %1 - + ZIP Files(*.zip *.zip) 压缩文件(*.zip) - - + + the selected firmware is not newer than the current version 选择的固件版本比当前版本低 @@ -415,7 +419,7 @@ 固件不匹配 - + firmware file mismatch, continue? 固件文件版本不匹配,是否继续? @@ -444,84 +448,83 @@ - Motor Version: %1 电机固件版本: %1 - + Device is opened by other process 设备被其他进程占用 - + open device error 打开设备失败 - - - + + + device: %1 upgrade firmware failed, io error 设备:%1 固件升级失败,IO错误 - + download firmware fail 下载固件失败 - + Roller scanned count has been set to 0. 滚轴计数已清零 - + Do not supported 设备不支持 - + Roller scanned count reset failed. 清除滚轴计数失败 - + old password is wrong 旧密码错误 - + new password can not be empty 新密码不能为空 - + new password is inconsistent 新密码不一致 - + modify password fail 密码修改失败 - + modify password success 密码修改成功 - + correcting... 校正中... - + Export special test paper 导出专用测试纸 - + jpg(*.jpg) jpg(*.jpg) @@ -532,16 +535,19 @@ - - - - + + + + + + + Prompt 提示 - + Please confirm that the device has correctly placed the calibration paper! 请确认设备已正确放置校正纸! @@ -572,38 +578,51 @@ 计算畸变值成功: %1 - + + + + roll count: %1 + 滚轴计数: %1 + + + + + scan count: %1 + 历史扫描张数: %1 + + + Get distortion failed 获取畸变值失败 - + Get failed 获取失败 - + Get distortion succeed: %1 获取畸变值成功: %1 - + Color mode: %1, Dpi: %2 颜色模式: %1, 分辨率 :%2 - - + + Set failed 设置失败 - + Set succeed 设置成功 - + Correct failed 校正失败 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