diff --git a/app/scanner/Scanner_zh_CN.qm b/app/scanner/Scanner_zh_CN.qm index b8af3195..9ac59006 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 81d88145..70991d52 100644 --- a/app/scanner/Scanner_zh_CN.ts +++ b/app/scanner/Scanner_zh_CN.ts @@ -365,43 +365,43 @@ 默认配置 - - + + default scheme 默认配置方案 - - - - + + + + e.g. '%1%2' 例如.“%1%2” - + ok 确定 - + cancel 取消 - + Browse directory 文件夹路径 - - + + tips 提示 - - + + The configuration scheme already exists 配置方案已存在 @@ -612,36 +612,36 @@ Page range will be "Chosen Pages". 多页保存(TIFF/PDF/OFD/GIF) - - - + + + Input is not valid. Page range will be 'Chosen Pages'. 输入无效。 页码范围将是“被选页码” - + English 英语 - + Simplified Chinese 中文(简体) - + Traditional Chinese 中文(繁体) - + Japanese 日文 - + Korean 韩文 @@ -729,34 +729,34 @@ Page range will be 'Chosen Pages'. 请留下您的电话、QQ或者邮箱等联系方式(必填)。 - - - + + + error 错误 - + Comments and suggestions cannot be empty. 意见与建议不能为空哦 - + The contact information column cannot be empty. 联系方式一栏不能为空哦 - + tip 提示 - + submit succeed. 提交成功 - + submit failed. 提交失败 @@ -1876,7 +1876,7 @@ Please make sure the two passwords are the same. - + upgrade contents: 更新内容: @@ -1891,19 +1891,19 @@ bug description: - + The current version is the latest! The current version number is : 当前为最新版本!版本号为: - - + + Discover the new version : 发现新版本: - - + + ,the current version is : ,当前版本为: @@ -2077,355 +2077,355 @@ bug description: 旋转 - + menu_user 用户 - + menu_info 信息 - + menu_device 设备 - + toolBar 工具栏 - + act_open 打开... - + act_insert 插入本地文件... - + act_save 保存 - + act_saveAs 另存为... - + act_Export 导出... - + act_closeFile 关闭选中项 - + act_closeAll 关闭所有项 - + act_imageInfo 图像信息 - + act_exit 退出 - + act_scannerSettings 扫描设置... - + act_acquire 扫描 - + act_acquireSingle 扫描单张 - - + + act_acquireInto 扫描至... - + act_fullscreen 全屏显示 - + act_fitWindowSize 适应视图框尺寸 - + act_fitWindowWidth 适应视图框宽度 - + act_realSize 真实大小 - + act_zoomIn 放大 - + act_zoomOut 缩小 - + act_toolBar 工具栏 - + act_statusBar 状态栏 - + act_thumbnailBar 缩略图栏 - + act_colorInfo 色彩信息 - + act_previous 上一张 - + act_next 下一张 - + act_first 第一张 - + act_last 最后一张 - + act_openPageNum 跳转至... - + act_previousPage 上一页 - + act_nextPage 下一页 - + act_firstPage 第一页 - + act_lastPage 最后一页 - + act_adjust 亮度/对比度/伽马... - + act_90Left 左旋转90度 - + act_90Right 右旋转90度 - + act_180 旋转180度 - + act_multiRotate 多页旋转... - + act_autoCrop 裁剪/纠偏/消除黑框... - + act_signIn 登录... - + act_passwordChange 密码修改... - + act_signOut 登出 - + act_log 日志管理... - + act_clrCache 缓存设置... - + act_consume 耗材状态... - + act_help 帮助 - + act_about 关于... - + act_insertFromScanner 从扫描插入... - + act_clearRoller 清除滚轴计数 - + act_imageEdit 图像编辑... - + act_sortPages 书籍排序 - + act_autoSave 自动保存 - + act_update 检查更新... - + act_feedback 意见反馈... - + act_device_log 导出设备日志 - + act_driver_log 导出驱动日志 - + act_deleteFile 删除选中项 - + act_enhanceText 文本增强 - + HuaGoScan 华高扫描软件 - + Grid 多列显示 - + Move To... 移动到... - + Insert files 插入文件 - - - + + + nodevice 没有发现扫描仪 - - - - - + + + + + Question 询问 - + modified, save it? 图像已被修改。 是否保存修改? - + file lost, remove it? 文件已丢失,是否删除? @@ -2451,17 +2451,17 @@ bug description: 扫描完成 - + Clear, then start scan 清空并启动扫描 - + Do NOT clear, then start scan 不清空并启动扫描 - + Already exist images in image list. Do you want to clear? 图像列表中已存在图像。 @@ -2476,12 +2476,12 @@ Do you want to clear? 磁盘空间不足,请删除不需要的文件,以保证有足够的空间 - + Open images 打开图片 - + Insert images 插入图片 @@ -2494,275 +2494,280 @@ Do you want to clear? 保存失败 - + binary 黑白 - + gray 256级灰度 - + rgb 24位彩色 - - - - - - - - - - - - + + + + + + + + + + + + Please wake up the device manually 请手动唤醒设备 - + UniScan 紫光扫描软件 - - + + Scan + 扫描 + + + + default scheme 默认配置方案 - + 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 彩色 - + Not supported 不支持 - + Warning 警告 - + Device is Running! Please finish scanning first. 设备正在运行! 请先结束扫描。 - + cache path folder limit:%1 无法访问当前缓存路径:%1 请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径。 - + aquireinto folder limit:%1 无法访问当前缓存路径:%1 请尝试在【扫描到】更改缓存路径。 - + 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 就绪 @@ -2772,7 +2777,7 @@ Please finish scanning first. 请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径 - + Insufficient access rights 文件访问权限不足 @@ -2785,46 +2790,46 @@ 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 错误 @@ -2839,17 +2844,17 @@ Continue to close? 是否继续关闭? - + Sure to sign out administrator account? 是否确定登出管理员账户? - + confirm the operation 确认操作 - + Are you sure to clear the rollor acount? 你确定要清除滚轴计数吗 @@ -2858,36 +2863,35 @@ Continue to close? 请重新进入关于界面以获取最新值 - - + + <p>%1: <a href='%2'>%3</a> - - + + <p>%1: %2 - + roller number 滚轴张数 - + open scanner 打开扫描仪 - - + app name 华高扫描软件 - - + + success 成功 @@ -2904,22 +2908,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. 当前路径磁盘空间不足, 请重新选择路径或及时清理磁盘空间。 @@ -2929,119 +2933,119 @@ Continue to close? 配置丢失 - + apply setting 应用配置 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + start failed 启动失败 - + HanvonScan 汉王扫描软件 - + LanxumScan 立思辰扫描软件 - + CumtennScan 沧田扫描软件 - + MicrotekScan Microtek DocWizard EX 扫描软件 - + 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 切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存 @@ -3062,26 +3066,26 @@ Continue to close? 发现设备 - + reconnected 重新连接 - + already connected, but open faild 已经连接,但打开失败 - - + + save image failed: 存图失败: - - - - + + + + create savepath failed: 创建文件夹失败: @@ -3090,102 +3094,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. 文档丢失!文档可能已被删除或被重命名。 @@ -3226,21 +3230,21 @@ Are you sure to close? <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> @@ -3325,32 +3329,31 @@ Are you sure to close? 取消 - + Restore defaults 恢复默认值 - + Enhance Text 文本增强 - Apply to image - 应用到图像 + 应用到图像 - + Brightness 亮度 - + Gamma correction Gamma校正 - + Contrast 对比度 @@ -3537,7 +3540,7 @@ Are you sure to close? - + ok 确定 @@ -3562,17 +3565,35 @@ Are you sure to close? 自定义色调曲线 - + + + + + + Prompt + 提示 + + + + + + + + The funtion is unsupported + 此版本不支持该功能 + + + Please select to overwrite the original configuration: 请选择覆盖原来的配置: - + ,or add a new configuration ,或者新增配置 - + save the configuration 保存配置 @@ -3606,82 +3627,82 @@ No: add new configuration - + <h6><b> <h6><b> - + cover original configuration: 覆盖原来配置: - + add new configuration 新增配置 - + rename: 更名: - - - + + + tips 提示 - + scheme name cannot be empty 配置名不能为空 - - + + scheme name: 配置名: - - + + already exists 已存在 - + :</b></h6> :</b></h6> - + <p> <p> - + </p> </p> - + configuration scheme name change 配置改名 - - + + be sure to delete the configuration 确认删除配置 - + Are you sure you want to delete the configuration " 您确认要删除配置 - + " ? @@ -3694,7 +3715,7 @@ No: add new configuration ’ 吗? - + Are you sure you want to delete the configuration? 您确认要删除所有配置吗? diff --git a/app/scanner/Scanner_zh_EN.qm b/app/scanner/Scanner_zh_EN.qm index 7a8106c4..1b690d0c 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 4d8b482a..a08a9550 100644 --- a/app/scanner/Scanner_zh_EN.ts +++ b/app/scanner/Scanner_zh_EN.ts @@ -357,43 +357,43 @@ User custom pages - - + + default scheme Default scheme - - - - + + + + e.g. '%1%2' For example"%1%2" - + ok OK - + cancel Cancel - + Browse directory Folder path - - + + tips Prompt - - + + The configuration scheme already exists The configuration scheme already exists @@ -589,36 +589,36 @@ The page range will be “selected pages” Cancel - - - + + + Input is not valid. Page range will be 'Chosen Pages'. Input invalid. The page range will be “selected pages” - + English English - + Simplified Chinese Simplified Chinese - + Traditional Chinese Traditional Chinese - + Japanese Japanese - + Korean Korean @@ -698,34 +698,34 @@ The page range will be “selected pages” Please leave a contact method, such as a phone number or E-mail address (required). - - - + + + error Error - + Comments and suggestions cannot be empty. Opinions and suggestions cannot be blank - + The contact information column cannot be empty. The contact method field cannot be blank - + tip Prompt - + submit succeed. Submitted successfully. - + submit failed. Submission failed. @@ -1743,24 +1743,24 @@ Please make sure the two passwords are the same. Check for updates - + The current version is the latest! The current version number is : Currently the latest version! The version number is: - - + + Discover the new version : New version discovered: - - + + ,the current version is : , the current version is: - + upgrade contents: Update content: @@ -1912,439 +1912,439 @@ Please make sure the two passwords are the same. Rotate - + menu_user User - + menu_info Information - + menu_device Device - + toolBar Toolbar - + act_open Open... - + act_insert Insert local file... - + act_save Save - + act_saveAs Save as... - + act_Export Export... - + act_closeFile Close selected item - + act_closeAll Close all items - + act_imageInfo Image information... - + act_exit Exit - + act_scannerSettings Scan settings - + act_acquire Scan - + act_acquireSingle Scan single page - - + + act_acquireInto Scan to... - + act_fullscreen Fullscreen display - + act_fitWindowSize Fit view box size - + act_fitWindowWidth Fit view box width - + act_realSize Real size - + act_zoomIn Zoom in - + act_zoomOut Zoom out - + act_toolBar ToolBar - + act_statusBar Status bar - + act_thumbnailBar Thumbnail bar - + act_colorInfo Color information - + act_previous Previous - + act_next Next - + act_first First - + act_last Last - + act_openPageNum Jump to... - + act_previousPage Previous page - + act_nextPage Next page - + act_firstPage First page - + act_lastPage Last page - + act_adjust Brightness/ contrast/ gamma... - + act_90Left Rotate 90 degrees left - + act_90Right Rotate 90 degrees right - + act_180 Rotate 180 degrees - + act_multiRotate Rotate multiple pages... - + act_autoCrop Crop/ Deskew/ Remove black box... - + act_signIn Login... - + act_passwordChange Change password... - + act_signOut Logout - + act_log Log management... - + act_clrCache Cache settings... - + act_consume Consumable status... - + act_help Help - + act_about About... - + act_insertFromScanner Insert from scan... - + act_clearRoller Clear roller count - + act_imageEdit Image edit... - + act_sortPages Book sorting - + act_autoSave Auto save - + act_update Check for updates... - + act_feedback Opinions and feedback... - + act_device_log Export device log... - + act_driver_log Export drive log... - + act_deleteFile Delete selected item - + act_enhanceText Enhance text - + 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? @@ -2361,7 +2361,7 @@ Please make sure the two passwords are the same. No - + file lost, remove it? File lost; delete? @@ -2370,17 +2370,17 @@ 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 @@ -2390,394 +2390,399 @@ Please make sure the two passwords are the same. 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 - + UniScan UNI scanning software - - + + default scheme Default scheme - - - - - - - - - - - - + + + + + + + + + + + + Please wake up the device manually Please wake up the device manually - - - - - - - - - - - - + + Scan + Scan + + + + + + + + + + + + + + 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 - + Not supported Not supported - + 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? - + cache path folder limit:%1 Unable to access the current path:%1 Please try to log in to the administrator account in the [User] menu and go to the [Cache settings] to change the cache path. - + aquireinto folder limit:%1 Unable to access the current path:%1 Please try to change the cache path in [Scan to]. @@ -2791,76 +2796,75 @@ Please try to change the cache path in [Scan to]. <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! @@ -2870,106 +2874,106 @@ Please try to change the cache path in [Scan to]. 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? @@ -3041,32 +3045,31 @@ Please go to “Scan to” and change the accessible scan folder and then perfor Cancel - + Restore defaults Restore defaults - + Enhance Text Enhance text - Apply to image - Apply to image + Apply to image - + Brightness Brightness - + Gamma correction Gamma correction - + Contrast Contrast @@ -3212,7 +3215,7 @@ Please go to “Scan to” and change the accessible scan folder and then perfor - + ok OK @@ -3237,97 +3240,115 @@ Please go to “Scan to” and change the accessible scan folder and then perfor Custom tone curve - + + + + + + Prompt + Prompt + + + + + + + + The funtion is unsupported + This version does not support this feature. + + + Please select to overwrite the original configuration: Please select overwrite original configuration: - + ,or add a new configuration , or add new configuration - + save the configuration Save configuration - + cover original configuration: Overwrite original configuration: - + add new configuration Add new configuration - + rename: Rename: - - - + + + tips Prompt - + scheme name cannot be empty Configuration name cannot be blank - - + + scheme name: Configuration name: - - + + already exists already exists - + <h6><b> <h6><b> - + :</b></h6> :</b></h6> - + <p> <p> - + </p> </p> - + configuration scheme name change Rename configuration - - + + be sure to delete the configuration Delete configuration - + Are you sure you want to delete the configuration " Are you sure you want to delete configuration - + " ? ? @@ -3340,7 +3361,7 @@ Please go to “Scan to” and change the accessible scan folder and then perfor No - + Are you sure you want to delete the configuration? Are you sure you want to delete all configurations? diff --git a/app/scanner/hg_settingdialog.cpp b/app/scanner/hg_settingdialog.cpp index 93fb8440..4a900778 100644 --- a/app/scanner/hg_settingdialog.cpp +++ b/app/scanner/hg_settingdialog.cpp @@ -887,7 +887,16 @@ void hg_settingdialog::slot_checkedClicked() m_list_IdValueTitle.append(QPair, QString>(QPair(id, checkBoxcurrentState), md5(opt->title))); SANE_Int method = 0; - sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, &checkBoxcurrentState, &method); + SANE_Status ret = sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, &checkBoxcurrentState, &method); + if (ret == SANE_STATUS_UNSUPPORTED) + { + SANE_Bool value = false; + ret = sane_control_option(m_handle, id, SANE_ACTION_GET_VALUE, &value, &method); + checkBox->setCheckState(value ? Qt::Checked : Qt::Unchecked); + QMessageBox::information(this, tr("Prompt"), tr("The funtion is unsupported")); + return; + } + if((method & SANE_INFO_RELOAD_OPTIONS) == SANE_INFO_RELOAD_OPTIONS) updateUIStatus(); else if(method & SANE_INFO_INEXACT) @@ -941,7 +950,19 @@ void hg_settingdialog::slot_string_list_comboBoxClicked() *((SANE_Fixed*)buf) = SANE_FIX(atof(comboBoxcurrentItem.c_str())); else strcpy(buf, comboBoxcurrentItem.c_str()); - sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, buf, &method); + SANE_Status ret = sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, buf, &method); + if (ret == SANE_STATUS_UNSUPPORTED) + { + char* value = (char*)malloc(opt->size * 2 + 4); + ret = sane_control_option(m_handle, id, SANE_ACTION_GET_VALUE, value, &method); + if (value != nullptr) + comboBox->setCurrentText(QString::fromStdString(value)); + free(value); + + QMessageBox::information(this, tr("Prompt"), tr("The funtion is unsupported")); + return; + } + if((method & SANE_INFO_RELOAD_OPTIONS) == SANE_INFO_RELOAD_OPTIONS) updateUIStatus(); else if(method & SANE_INFO_INEXACT) @@ -966,7 +987,13 @@ void hg_settingdialog::slot_pushButtonClicked() after = 0; // restore to default setting ? - sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, NULL, &after); + SANE_Status ret = sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, NULL, &after); + if (ret == SANE_STATUS_UNSUPPORTED) + { + QMessageBox::information(this, tr("Prompt"), tr("The funtion is unsupported")); + return; + } + if((after & SANE_INFO_RELOAD_OPTIONS) == SANE_INFO_RELOAD_OPTIONS) updateUIStatus(); @@ -1194,7 +1221,18 @@ void hg_settingdialog::slot_word_list_comboBoxClicked(int value) SANE_Int method = 0; - sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, &temp, &method); + SANE_Status ret = sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, &temp, &method); + if (ret == SANE_STATUS_UNSUPPORTED) + { + char* value = (char*)malloc(opt->size * 2 + 4); + ret = sane_control_option(m_handle, id, SANE_ACTION_GET_VALUE, value, &method); + if (value != nullptr) + comboBox->setCurrentText(QString::fromStdString(value)); + free(value); + + QMessageBox::information(this, tr("Prompt"), tr("The funtion is unsupported")); + return; + } if((method & SANE_INFO_RELOAD_OPTIONS) == SANE_INFO_RELOAD_OPTIONS) updateUIStatus(); else if(method & SANE_INFO_INEXACT) @@ -1250,7 +1288,25 @@ void hg_settingdialog::slot_sliderClicked(int value) m_list_IdValueTitle.append(QPair, QString>(QPair(id, temp), md5(opt->title))); } - sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, &val, &method); + SANE_Status ret = sane_control_option(m_handle, id, SANE_ACTION_SET_VALUE, &val, &method); + if (ret == SANE_STATUS_UNSUPPORTED) + { + if (!db_val) + { + SANE_Int value = 0; + ret = sane_control_option(m_handle, id, SANE_ACTION_GET_VALUE, &value, &method); + slider->setValue(value); + } + else + { + SANE_Fixed value = 0; + ret = sane_control_option(m_handle, id, SANE_ACTION_GET_VALUE, &value, &method); + slider->setValue(value); + } + + QMessageBox::information(this, tr("Prompt"), tr("The funtion is unsupported")); + return; + } if((method & SANE_INFO_RELOAD_OPTIONS) == SANE_INFO_RELOAD_OPTIONS) updateUIStatus(); else if(method & SANE_INFO_INEXACT)