diff --git a/app/scanner/Scanner_zh_CN.qm b/app/scanner/Scanner_zh_CN.qm index d72e51de..36f2e82b 100644 Binary files a/app/scanner/Scanner_zh_CN.qm and b/app/scanner/Scanner_zh_CN.qm differ diff --git a/app/scanner/Scanner_zh_CN.ts b/app/scanner/Scanner_zh_CN.ts index 7bba2c77..fae58b8c 100644 --- a/app/scanner/Scanner_zh_CN.ts +++ b/app/scanner/Scanner_zh_CN.ts @@ -2189,51 +2189,51 @@ bug description: 删除选中项 - + HuaGoScan 华高扫描软件 - + Grid 多列显示 - + Move To... 移动到... - + Insert files 插入文件 - - - + + + nodevice 没有发现扫描仪 - - - - - - + + + + + + Question 询问 - - + + modified, save it? 图像已被修改。 是否保存修改? - + file lost, remove it? 文件已丢失,是否删除? @@ -2242,7 +2242,7 @@ bug description: 已连接 - + disconnected 已断开连接 @@ -2259,17 +2259,17 @@ bug description: 扫描完成 - + Clear, then start scan 清空并启动扫描 - + Do NOT clear, then start scan 不清空并启动扫描 - + Already exist images in image list. Do you want to clear? 图像列表中已存在图像。 @@ -2284,12 +2284,12 @@ Do you want to clear? 磁盘空间不足,请删除不需要的文件,以保证有足够的空间 - + Open images 打开图片 - + Insert images 插入图片 @@ -2302,245 +2302,259 @@ Do you want to clear? 保存失败 - + binary 黑白 - + gray 256级灰度 - + rgb 24位彩色 - + + + + + + + + + + + Please wake up the device manually + 请手动唤醒设备 + + + thumbnailBar enabled 显示缩略图栏 - + thumbnailBar hidden 隐藏缩略图栏 - + cancel 取消 - - - + + + save succeed 保存成功 - - + + find savePath in thumbnail 图片名在列表中已存在 - + Please select at least one picture before export 请至少选中一张图片再进行导出 - + File name 文件名 - + File path 文件路径 - + File size 文件大小 - + Creation date/time 创建时间 - + Modified date/time 修改时间 - + Accessed date/time 访问时间 - + Format 格式 - + Width 宽度 - + Height 高度 - + depth 深度 - + Color model 色彩模式 - + DPI 每英寸像素点 - + Print size 打印尺寸 - + Frame - + None - + Mono 黑白 - + Gray 灰度 - + Color 彩色 - + Warning 警告 - + Device is Running! Please finish scanning first. 设备正在运行! 请先结束扫描。 - + Image processing failed 图像处理失败 - + Ocr init failed OCR初始化错误 - + Ocr failed OCR错误 - + File does not exist 文件不存在 - + Failed to load dynamic library 加载动态库失败 - + File data error 文件数据错误 - + Image format processing error 图像格式处理错误 - + Out of memory 内存不足 - + Failed 错误 - - + + The language switch is successful and takes effect the next time the software is started! 语言切换成功,下次启动软件时生效! - + Are you sure to delete selected file? 您确定彻底删除选中项文件? - - - - - - - - - - + + + + + + + + + + already waked up device 已唤醒设备 - + be ready 就绪 - - - - - - + + + + + + folder limit 无法访问“我的文档”, 请前往“扫描至”更换可访问的扫描目录再进行扫描。 - + Insufficient access rights 文件访问权限不足 @@ -2553,47 +2567,47 @@ Please finish scanning first. 图像处理失败 - + Are you sure to close 您确定要断开设备: - + ? 吗? - - + + close 关闭 - + tip 提示 - + Other versions not available 未获取到其他版本 - - + + The device does not support this operation 设备不支持该操作 - - + + IO error IO错误 - - - + + + error 错误 @@ -2608,17 +2622,17 @@ Continue to close? 是否继续关闭? - + Sure to sign out administrator account? 是否确定登出管理员账户? - + confirm the operation 确认操作 - + Are you sure to clear the rollor acount? 你确定要清除滚轴计数吗 @@ -2627,34 +2641,36 @@ Continue to close? 请重新进入关于界面以获取最新值 - + + <p>%1: <a href='%2'>%3</a> - + + <p>%1: %2 - + roller number 滚轴张数 - + open scanner 打开扫描仪 - - + + app name 华高扫描软件 - - + + success 成功 @@ -2671,22 +2687,22 @@ Continue to close? 失败 - - + + failed 失败 - - - + + + warning 警告 - - - + + + the disk space in the current path is unsufficient, please select a new path or clear the disk space in time. 当前路径磁盘空间不足, 请重新选择路径或及时清理磁盘空间。 @@ -2696,152 +2712,152 @@ Continue to close? 配置丢失 - + apply setting 应用配置 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + start failed 启动失败 - + HanvonScan 汉王扫描软件 - + LanxumScan 立思辰扫描软件 - + CumtennScan 沧田扫描软件 - + MicrotekScan 中晶扫描软件 - + menu_language 语言 - + act_simpCN 简体中文 - + act_English English - + auto save 自动保存 - + when switching pictures, save the edited pictures directly without reminding 切换图片时,不提醒,直接保存编辑过的图片 - + statusBar displayed 显示状态栏 - + statusBar hidden 隐藏状态栏 - + toolBar displayed 显示工具栏 - + toolBar hidden 隐藏工具栏 - + colorInfo enabled 启用图像信息 - + colorInfo disenabled 关闭图像信息 - + enabling automatic saving 启用自动保存 - + cancel auto save 取消自动保存 - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save 切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存 - - - - - - - - - - - - - + + + + + + + + + + + + + yes 确定 - + save, do not remind again 保存,不再提醒 - - - - - - - - - - + + + + + + + + + + no 取消 @@ -2850,26 +2866,26 @@ Continue to close? 发现设备 - + reconnected 重新连接 - + already connected, but open faild 已经连接,但打开失败 - - + + save image failed: 存图失败: - - - - + + + + create savepath failed: 创建文件夹失败: @@ -2878,102 +2894,102 @@ Continue to close? %1%2%3.%4 - - + + create image doc failed: 创建图片文件失败: - - - - - - - - - - - - - + + + + + + + + + + + + + save image doc failed: 保存图片文件失败: - + start failed! 启动安装程序失败! - + There are pictures that have not been saved. Are you sure to close? 有图像未保存,确定关闭? - + found device : %1 发现设备 : %1 - - - - - - - - - - - - - + + + + + + + + + + + + + tips 提示 - + Are you sure to close? 确定关闭应用软件? - + confirm operation 确认操作 - + are you sure to clear the roller count? 您确定要清除滚轴计数吗 - - - + + + hint 提示 - - + + Roller scanned count has been set to 0. 辊轴计数已置零 - - + + Roller scanned count reset failed. 重置滚轴计数失败 - + Error 错误 - + Document missing! It would be deleted or renamed. 文档丢失!文档可能已被删除或被重命名。 @@ -3006,28 +3022,29 @@ Are you sure to close? <br>导航地址: <a href='https://j.map.baidu.com/7e/1TO'>百度地图访问</a> - About %1 - 关于 %1 + 关于 %1 - <p>%1</p><p>Version: %2<br>CopyRight: &#169; %3</p><p>%4%5%6%7%8%9</p> - <p>%1</p><p>版本: %2<br>版权: &#169; %3</p><p>%4%5%6%7%8%9</p> + <p>%1</p><p>版本: %2<br>版权: &#169; %3</p><p>%4%5%6%7%8%9</p> + about %1 关于 %1 + <p>Version: %1</p> <p>版本: %1</p> <p>版本: %1</p> - + + <p>CopyRight: &#169; %1</p> <p>版权: &#169; %1</p> <p>版权: &#169; %1</p> diff --git a/app/scanner/Scanner_zh_EN.qm b/app/scanner/Scanner_zh_EN.qm index 1a6c2ccb..45fe692e 100644 Binary files a/app/scanner/Scanner_zh_EN.qm and b/app/scanner/Scanner_zh_EN.qm differ diff --git a/app/scanner/Scanner_zh_EN.ts b/app/scanner/Scanner_zh_EN.ts index 23941949..876f8609 100644 --- a/app/scanner/Scanner_zh_EN.ts +++ b/app/scanner/Scanner_zh_EN.ts @@ -2032,176 +2032,176 @@ Please make sure the two passwords are the same. Delete selected item - + HanvonScan Hanvon scanning software - + LanxumScan LANXUM scanning software - + CumtennScan CUMTENN scanning software - + MicrotekScan Microtek DocWizard EX V1.0 - + HuaGoScan HUAGOSCAN scanning software - + menu_language Language - + act_simpCN 简体中文 - + act_English English - + Grid Multi-column display - + Move To... Move to... - + Insert files Insert file - - - + + + nodevice No scanner detected - + auto save Auto save - + when switching pictures, save the edited pictures directly without reminding Do not show prompt and save the edited images directly when switching images. - + statusBar displayed Show status bar - + statusBar hidden Hide status bar - + toolBar displayed Show toolbar - + toolBar hidden Hide toolbar - + colorInfo enabled Enable image information - + colorInfo disenabled Disable image information - + enabling automatic saving Enable auto save - + cancel auto save Cancel auto save - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save Save edited images automatically when switching images. If you want to cancel, please deselect the menu item: Auto save images. - - - - - - + + + + + + Question Ask - - + + modified, save it? Image modified, save changes? - - - - - - - - - - - - - + + + + + + + + + + + + + yes Yes - + save, do not remind again Save, do not prompt again - - - - - - - - - - + + + + + + + + + + no No - + file lost, remove it? File lost; delete? @@ -2210,561 +2210,578 @@ Please make sure the two passwords are the same. Device discovered - + found device : %1 Device discovered: %1 - + reconnected reconnect - + already connected, but open faild connected, but failed to open - + disconnected disconnected - - - + + + the disk space in the current path is unsufficient, please select a new path or clear the disk space in time. Insufficient disk space for the current path. Please reselect a path or clear disk space immediately. - - - + + + warning Warning - - + + save image failed: Failed to save image: - - - - + + + + create savepath failed: Failed to create folder: - - + + create image doc failed: Failed to create image file: - - - - - - - - - - - - - + + + + + + + + + + + + + save image doc failed: Failed to save image: - + binary Black and white - + gray Grayscale - + rgb Color - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + start failed Failed to start - - - - - - - - - - + + + + + + + + + + + Please wake up the device manually + Please wake up the device manually + + + + + + + + + + + + already waked up device Device is awake - + thumbnailBar enabled Show thumbnail bar - + thumbnailBar hidden Hide thumbnail bar - + Clear, then start scan Clear and start scan - + Do NOT clear, then start scan Do not clear and start scan - + cancel Cancel - + Already exist images in image list. Do you want to clear? Image already exists in the list of images. Clear? - + Open images Open image - + Insert images Insert image - - - - - - - - - - - - - + + + + + + + + + + + + + tips prompt - - - + + + save succeed Saved successfully - - + + find savePath in thumbnail Image name already exists in the list - + Please select at least one picture before export Please select at least one image and then export - + File name File name - + File path File path - + File size File size - + Creation date/time Creation time - + Modified date/time Modification time - + Accessed date/time Access time - + Format Format - + Width Width - + Height Height - + depth Depth - + Color model Color mode - + DPI Pixels per inch - + Print size Print size - + Frame Frame - + None None - + Mono Black and white - + Gray Gray scale - + Color Color - + Warning Warning - + Device is Running! Please finish scanning first. Device is currently running! Please stop scanning first. - + There are pictures that have not been saved. Are you sure to close? There are unsaved images; are you sure you want to close? - + Are you sure to close? Are you sure you want to close? - + Sure to sign out administrator account? Are you sure you want to log out of the administrator account? - + confirm operation Confirm operation - + are you sure to clear the roller count? Are you sure you want to clear the roller count? - - - + + + hint Prompt - - + + Roller scanned count has been set to 0. Roller count reset to zero. - - + + Roller scanned count reset failed. Failed to reset roller count. - + Error Error - + Document missing! It would be deleted or renamed. File lost! File may be deleted or renamed. - + confirm the operation Confirm operation - + Are you sure to clear the rollor acount? Are you sure you want to clear the roller count? - About %1 - About %1 + About %1 - <p>%1</p><p>Version: %2<br>CopyRight: &#169; %3</p><p>%4%5%6%7%8%9</p> - <p>%1</p><p>Version: %2<br>Copyright: &#169; %3</p><p>%4%5%6%7%8%9</p> + <p>%1</p><p>Version: %2<br>Copyright: &#169; %3</p><p>%4%5%6%7%8%9</p> + about %1 About %1 + <p>Version: %1</p> <p>Version: %1</p> - + + <p>CopyRight: &#169; %1</p> <p>Copyright: &#169; %1</p> - + + <p>%1: <a href='%2'>%3</a> <p>%1: <a href='%2'>%3</a> - + + <p>%1: %2 <p>%1: %2 - + roller number Number of rollers - + open scanner Open scanner - - + + app name HUAGOSCAN scanning software - - + + success successfully - + be ready Ready - - + + failed failed - - - + + + error Error - + start failed! Failed to start! - - - - - - + + + + + + folder limit Cannot access “My Documents”. Please go to “Scan to” and change the accessible scan folder and then perform the scan. - + Insufficient access rights Insufficient file access permissions - + Image processing failed Image processing failed - + Ocr init failed OCR initialization error - + Ocr failed OCR failed - + File does not exist File does not exist - + Failed to load dynamic library Failed to load dynamic library - + File data error File data error - + Image format processing error Image format processing error - + Out of memory Insufficient memory - + Failed Failed - + apply setting Apply configuration - + Are you sure to close Are you sure you want to disconnect device: - + ? ? - - + + close Close - + tip Prompt - + Other versions not available No other versions obtained - - + + The device does not support this operation Device does not support this operation - - + + IO error IO error - - + + The language switch is successful and takes effect the next time the software is started! The language switch is successful and takes effect the next time the software is started! - + Are you sure to delete selected file? Are you sure to delete the selected file completely? diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index bf0cc459..d296b46b 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -1329,16 +1329,27 @@ void MainWindow::on_continueScan() ui->act_scannerSettings->setEnabled(false); m_dialogLog->updateStatus(false, false); m_dialogLog->show(); - QTime curTimer = QTime::currentTime().addMSecs(10000); - while (QTime::currentTime() < curTimer) + + if ("439" == getDevPid() || "9220" == getDevPid()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + m_dialogLog->addLog(tr("Please wake up the device manually"), true); + m_wndStatusBar->setDeviceStatusInfo(tr("Please wake up the device manually"), true); } + else + { + QTime curTimer = QTime::currentTime().addMSecs(10000); + while (QTime::currentTime() < curTimer) + { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } + + m_dialogLog->addLog(tr("already waked up device"), false); + m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); + } + ui->menu_scan->setEnabled(true); ui->act_acquire->setEnabled(true); ui->act_scannerSettings->setEnabled(true); - m_dialogLog->addLog(tr("already waked up device"), false); - m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); m_dialogLog->updateStatus(true, false); } } @@ -3247,16 +3258,27 @@ void MainWindow::on_act_acquire_triggered() ui->act_scannerSettings->setEnabled(false); m_dialogLog->updateStatus(false, false); m_dialogLog->show(); - QTime curTimer = QTime::currentTime().addMSecs(10000); - while (QTime::currentTime() < curTimer) + + if ("439" == getDevPid() || "9220" == getDevPid()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + m_dialogLog->addLog(tr("Please wake up the device manually"), true); + m_wndStatusBar->setDeviceStatusInfo(tr("Please wake up the device manually"), true); } + else + { + QTime curTimer = QTime::currentTime().addMSecs(10000); + while (QTime::currentTime() < curTimer) + { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } + + m_dialogLog->addLog(tr("already waked up device"), false); + m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); + } + ui->menu_scan->setEnabled(true); ui->act_acquire->setEnabled(true); ui->act_scannerSettings->setEnabled(true); - m_dialogLog->addLog(tr("already waked up device"), false); - m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); m_dialogLog->updateStatus(true, false); } } @@ -3314,16 +3336,27 @@ void MainWindow::on_act_acquireSingle_triggered() ui->act_scannerSettings->setEnabled(false); m_dialogLog->updateStatus(false, false); m_dialogLog->show(); - QTime curTimer = QTime::currentTime().addMSecs(10000); - while (QTime::currentTime() < curTimer) + + if ("439" == getDevPid() || "9220" == getDevPid()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + m_dialogLog->addLog(tr("Please wake up the device manually"), true); + m_wndStatusBar->setDeviceStatusInfo(tr("Please wake up the device manually"), true); } + else + { + QTime curTimer = QTime::currentTime().addMSecs(10000); + while (QTime::currentTime() < curTimer) + { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } + + m_dialogLog->addLog(tr("already waked up device"), false); + m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); + } + ui->menu_scan->setEnabled(true); ui->act_acquire->setEnabled(true); ui->act_scannerSettings->setEnabled(true); - m_dialogLog->addLog(tr("already waked up device"), false); - m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); m_dialogLog->updateStatus(true, false); } } @@ -3397,16 +3430,27 @@ void MainWindow::on_act_acquireInto_triggered() ui->act_scannerSettings->setEnabled(false); m_dialogLog->updateStatus(false, false); m_dialogLog->show(); - QTime curTimer = QTime::currentTime().addMSecs(10000); - while (QTime::currentTime() < curTimer) + + if ("439" == getDevPid() || "9220" == getDevPid()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + m_dialogLog->addLog(tr("Please wake up the device manually"), true); + m_wndStatusBar->setDeviceStatusInfo(tr("Please wake up the device manually"), true); } + else + { + QTime curTimer = QTime::currentTime().addMSecs(10000); + while (QTime::currentTime() < curTimer) + { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } + + m_dialogLog->addLog(tr("already waked up device"), false); + m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); + } + ui->menu_scan->setEnabled(true); ui->act_acquire->setEnabled(true); ui->act_scannerSettings->setEnabled(true); - m_dialogLog->addLog(tr("already waked up device"), false); - m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); m_dialogLog->updateStatus(true, false); } } @@ -3479,16 +3523,27 @@ void MainWindow::on_act_insertFromScanner_triggered() ui->act_scannerSettings->setEnabled(false); m_dialogLog->updateStatus(false, false); m_dialogLog->show(); - QTime curTimer = QTime::currentTime().addMSecs(10000); - while (QTime::currentTime() < curTimer) + + if ("439" == getDevPid() || "9220" == getDevPid()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + m_dialogLog->addLog(tr("Please wake up the device manually"), true); + m_wndStatusBar->setDeviceStatusInfo(tr("Please wake up the device manually"), true); } + else + { + QTime curTimer = QTime::currentTime().addMSecs(10000); + while (QTime::currentTime() < curTimer) + { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } + + m_dialogLog->addLog(tr("already waked up device"), false); + m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); + } + ui->menu_scan->setEnabled(true); ui->act_acquire->setEnabled(true); ui->act_scannerSettings->setEnabled(true); - m_dialogLog->addLog(tr("already waked up device"), false); - m_wndStatusBar->setDeviceStatusInfo(tr("already waked up device"), false); m_dialogLog->updateStatus(true, false); } } @@ -4106,6 +4161,22 @@ void MainWindow::deleteUpgradePkg(const QString &cfgFilePath) } } +QString MainWindow::getDevPid() +{ + VIDPID vidpid; + int vidpid_val; + unsigned int len = sizeof(int); + sane_io_control(dev_que_.handle(), IO_CTRL_CODE_GET_VIDPID, &vidpid_val, &len); + vidpid.Value = vidpid_val; + int vid = vidpid.VID; + int pid = vidpid.PID; + char buf[10]; + char buf2[10]; + sprintf(buf, "%x", vid); + sprintf(buf2, "%x", pid); + return QString::fromStdString(buf2); +} + void MainWindow::on_scanOptions_changed(const QString &device, const QString &option, bool checked_now) { QString title(tr("app name")); diff --git a/app/scanner/mainwindow.h b/app/scanner/mainwindow.h index 10dab552..9bf95592 100644 --- a/app/scanner/mainwindow.h +++ b/app/scanner/mainwindow.h @@ -273,6 +273,7 @@ private: void upgradeFwAndLockDevice(); void deleteOverdueLogFile(const QString& logFilePath); void deleteUpgradePkg(const QString& cfgFilePath); + QString getDevPid(); private: Ui::MainWindow *ui; @@ -307,6 +308,16 @@ private: }SAVEOPT; SAVEOPT auto_save_info_; + union VIDPID + { + struct + { + unsigned short VID; + unsigned short PID; + }; + unsigned int Value; + }; + HGUInt m_dpi; QString m_currFilePath; int m_currIndex; diff --git a/app/scanner/qt_zh_CN.ts b/app/scanner/qt_zh_CN.ts index 775dfef5..3fb72f6c 100644 --- a/app/scanner/qt_zh_CN.ts +++ b/app/scanner/qt_zh_CN.ts @@ -1835,11 +1835,7 @@ Please finish scanning first. About %1 - 关于 %1 - - - <p>%1</p><p>Version: %2<br>CopyRight: &#169; %3</p><p>%4%5%6%7%8%9</p> - + 关于 %1 about %1 @@ -2178,6 +2174,10 @@ Are you sure to close? Are you sure to delete selected file? + + Please wake up the device manually + + Phonon::