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 @@
默认配置
-
-
+
+
默认配置方案
-
-
-
-
+
+
+
+
例如.“%1%2”
-
+
确定
-
+
取消
-
+
文件夹路径
-
-
+
+
提示
-
-
+
+
配置方案已存在
@@ -612,36 +612,36 @@ Page range will be "Chosen Pages".
多页保存(TIFF/PDF/OFD/GIF)
-
-
-
+
+
+
输入无效。
页码范围将是“被选页码”
-
+
英语
-
+
中文(简体)
-
+
中文(繁体)
-
+
日文
-
+
韩文
@@ -729,34 +729,34 @@ Page range will be 'Chosen Pages'.
请留下您的电话、QQ或者邮箱等联系方式(必填)。
-
-
-
+
+
+
错误
-
+
意见与建议不能为空哦
-
+
联系方式一栏不能为空哦
-
+
提示
-
+
提交成功
-
+
提交失败
@@ -1876,7 +1876,7 @@ Please make sure the two passwords are the same.
-
+
更新内容:
@@ -1891,19 +1891,19 @@ bug description:
-
+
当前为最新版本!版本号为:
-
-
+
+
发现新版本:
-
-
+
+
,当前版本为:
@@ -2077,355 +2077,355 @@ bug description:
旋转
-
+
用户
-
+
信息
-
+
设备
-
+
工具栏
-
+
打开...
-
+
插入本地文件...
-
+
保存
-
+
另存为...
-
+
导出...
-
+
关闭选中项
-
+
关闭所有项
-
+
图像信息
-
+
退出
-
+
扫描设置...
-
+
扫描
-
+
扫描单张
-
-
+
+
扫描至...
-
+
全屏显示
-
+
适应视图框尺寸
-
+
适应视图框宽度
-
+
真实大小
-
+
放大
-
+
缩小
-
+
工具栏
-
+
状态栏
-
+
缩略图栏
-
+
色彩信息
-
+
上一张
-
+
下一张
-
+
第一张
-
+
最后一张
-
+
跳转至...
-
+
上一页
-
+
下一页
-
+
第一页
-
+
最后一页
-
+
亮度/对比度/伽马...
-
+
左旋转90度
-
+
右旋转90度
-
+
旋转180度
-
+
多页旋转...
-
+
裁剪/纠偏/消除黑框...
-
+
登录...
-
+
密码修改...
-
+
登出
-
+
日志管理...
-
+
缓存设置...
-
+
耗材状态...
-
+
帮助
-
+
关于...
-
+
从扫描插入...
-
+
清除滚轴计数
-
+
图像编辑...
-
+
书籍排序
-
+
自动保存
-
+
检查更新...
-
+
意见反馈...
-
+
导出设备日志
-
+
导出驱动日志
-
+
删除选中项
-
+
文本增强
-
+
华高扫描软件
-
+
多列显示
-
+
移动到...
-
+
插入文件
-
-
-
+
+
+
没有发现扫描仪
-
-
-
-
-
+
+
+
+
+
询问
-
+
图像已被修改。
是否保存修改?
-
+
文件已丢失,是否删除?
@@ -2451,17 +2451,17 @@ bug description:
扫描完成
-
+
清空并启动扫描
-
+
不清空并启动扫描
-
+
图像列表中已存在图像。
@@ -2476,12 +2476,12 @@ Do you want to clear?
磁盘空间不足,请删除不需要的文件,以保证有足够的空间
-
+
打开图片
-
+
插入图片
@@ -2494,275 +2494,280 @@ Do you want to clear?
保存失败
-
+
黑白
-
+
256级灰度
-
+
24位彩色
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
请手动唤醒设备
-
+
紫光扫描软件
-
-
+
+
+ 扫描
+
+
+
+
默认配置方案
-
+
显示缩略图栏
-
+
隐藏缩略图栏
-
+
取消
-
-
-
+
+
+
保存成功
-
-
+
+
图片名在列表中已存在
-
+
请至少选中一张图片再进行导出
-
+
文件名
-
+
文件路径
-
+
文件大小
-
+
创建时间
-
+
修改时间
-
+
访问时间
-
+
格式
-
+
宽度
-
+
高度
-
+
深度
-
+
色彩模式
-
+
每英寸像素点
-
+
打印尺寸
-
+
帧
-
+
无
-
+
黑白
-
+
灰度
-
+
彩色
-
+
不支持
-
+
警告
-
+
设备正在运行!
请先结束扫描。
-
+
无法访问当前缓存路径:%1
请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径。
-
+
无法访问当前缓存路径:%1
请尝试在【扫描到】更改缓存路径。
-
+
图像处理失败
-
+
OCR初始化错误
-
+
OCR错误
-
+
文件不存在
-
+
加载动态库失败
-
+
文件数据错误
-
+
图像格式处理错误
-
+
内存不足
-
+
错误
-
-
+
+
语言切换成功,下次启动软件时生效!
-
+
您确定彻底删除选中项文件?
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
已唤醒设备
-
+
就绪
@@ -2772,7 +2777,7 @@ Please finish scanning first.
请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径
-
+
文件访问权限不足
@@ -2785,46 +2790,46 @@ Please finish scanning first.
图像处理失败
-
+
您确定要断开设备:
-
+
吗?
-
-
+
+
关闭
-
+
提示
-
+
未获取到其他版本
-
-
+
+
设备不支持该操作
-
-
+
+
IO错误
-
-
+
+
错误
@@ -2839,17 +2844,17 @@ Continue to close?
是否继续关闭?
-
+
是否确定登出管理员账户?
-
+
确认操作
-
+
你确定要清除滚轴计数吗
@@ -2858,36 +2863,35 @@ Continue to close?
请重新进入关于界面以获取最新值
-
-
+
+
-
-
+
+
-
+
滚轴张数
-
+
打开扫描仪
-
-
+
华高扫描软件
-
-
+
+
成功
@@ -2904,22 +2908,22 @@ Continue to close?
失败
-
-
+
+
失败
-
-
-
+
+
+
警告
-
-
-
+
+
+
当前路径磁盘空间不足,
请重新选择路径或及时清理磁盘空间。
@@ -2929,119 +2933,119 @@ Continue to close?
配置丢失
-
+
应用配置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
启动失败
-
+
汉王扫描软件
-
+
立思辰扫描软件
-
+
沧田扫描软件
-
+
Microtek DocWizard EX 扫描软件
-
+
语言
-
+
简体中文
-
+
English
-
+
自动保存
-
+
切换图片时,不提醒,直接保存编辑过的图片
-
+
显示状态栏
-
+
隐藏状态栏
-
+
显示工具栏
-
+
隐藏工具栏
-
+
启用图像信息
-
+
关闭图像信息
-
+
启用自动保存
-
+
取消自动保存
-
+
切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存
@@ -3062,26 +3066,26 @@ Continue to close?
发现设备
-
+
重新连接
-
+
已经连接,但打开失败
-
-
+
+
存图失败:
-
-
-
-
+
+
+
+
创建文件夹失败:
@@ -3090,102 +3094,102 @@ Continue to close?
%1%2%3.%4
-
-
+
+
创建图片文件失败:
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
保存图片文件失败:
-
+
启动安装程序失败!
-
+
有图像未保存,确定关闭?
-
+
发现设备 : %1
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
提示
-
+
确定关闭应用软件?
-
+
确认操作
-
+
您确定要清除滚轴计数吗
-
-
-
+
+
+
提示
-
-
+
+
辊轴计数已置零
-
-
+
+
重置滚轴计数失败
-
+
错误
-
+
文档丢失!文档可能已被删除或被重命名。
@@ -3226,21 +3230,21 @@ Are you sure to close?
<p>%1</p><p>版本: %2<br>版权: © %3</p><p>%4%5%6%7%8%9</p>
-
-
+
+
关于 %1
-
-
+
+
<p>版本: %1</p>
<p>版本: %1</p>
-
-
+
+
<p>版权: © %1</p>
<p>版权: © %1</p>
@@ -3325,32 +3329,31 @@ Are you sure to close?
取消
-
+
恢复默认值
-
+
文本增强
-
- 应用到图像
+ 应用到图像
-
+
亮度
-
+
Gamma校正
-
+
对比度
@@ -3537,7 +3540,7 @@ Are you sure to close?
-
+
确定
@@ -3562,17 +3565,35 @@ Are you sure to close?
自定义色调曲线
-
+
+
+
+
+
+
+ 提示
+
+
+
+
+
+
+
+
+ 此版本不支持该功能
+
+
+
请选择覆盖原来的配置:
-
+
,或者新增配置
-
+
保存配置
@@ -3606,82 +3627,82 @@ No: add new configuration
否
-
+
<h6><b>
-
+
覆盖原来配置:
-
+
新增配置
-
+
更名:
-
-
-
+
+
+
提示
-
+
配置名不能为空
-
-
+
+
配置名:
-
-
+
+
已存在
-
+
:</b></h6>
-
+
<p>
-
+
</p>
-
+
配置改名
-
-
+
+
确认删除配置
-
+
您确认要删除配置
-
+
?
@@ -3694,7 +3715,7 @@ No: add new 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
-
-
-
-
+
+
+
+
For example"%1%2"
-
+
OK
-
+
Cancel
-
+
Folder path
-
-
+
+
Prompt
-
-
+
+
The configuration scheme already exists
@@ -589,36 +589,36 @@ The page range will be “selected pages”
Cancel
-
-
-
+
+
+
Input invalid.
The page range will be “selected pages”
-
+
English
-
+
Simplified Chinese
-
+
Traditional Chinese
-
+
Japanese
-
+
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
-
+
Opinions and suggestions cannot be blank
-
+
The contact method field cannot be blank
-
+
Prompt
-
+
Submitted successfully.
-
+
Submission failed.
@@ -1743,24 +1743,24 @@ Please make sure the two passwords are the same.
Check for updates
-
+
Currently the latest version! The version number is:
-
-
+
+
New version discovered:
-
-
+
+
, the current version is:
-
+
Update content:
@@ -1912,439 +1912,439 @@ Please make sure the two passwords are the same.
Rotate
-
+
User
-
+
Information
-
+
Device
-
+
Toolbar
-
+
Open...
-
+
Insert local file...
-
+
Save
-
+
Save as...
-
+
Export...
-
+
Close selected item
-
+
Close all items
-
+
Image information...
-
+
Exit
-
+
Scan settings
-
+
Scan
-
+
Scan single page
-
-
+
+
Scan to...
-
+
Fullscreen display
-
+
Fit view box size
-
+
Fit view box width
-
+
Real size
-
+
Zoom in
-
+
Zoom out
-
+
ToolBar
-
+
Status bar
-
+
Thumbnail bar
-
+
Color information
-
+
Previous
-
+
Next
-
+
First
-
+
Last
-
+
Jump to...
-
+
Previous page
-
+
Next page
-
+
First page
-
+
Last page
-
+
Brightness/ contrast/ gamma...
-
+
Rotate 90 degrees left
-
+
Rotate 90 degrees right
-
+
Rotate 180 degrees
-
+
Rotate multiple pages...
-
+
Crop/ Deskew/ Remove black box...
-
+
Login...
-
+
Change password...
-
+
Logout
-
+
Log management...
-
+
Cache settings...
-
+
Consumable status...
-
+
Help
-
+
About...
-
+
Insert from scan...
-
+
Clear roller count
-
+
Image edit...
-
+
Book sorting
-
+
Auto save
-
+
Check for updates...
-
+
Opinions and feedback...
-
+
Export device log...
-
+
Export drive log...
-
+
Delete selected item
-
+
Enhance text
-
+
Hanvon scanning software
-
+
LANXUM scanning software
-
+
CUMTENN scanning software
-
+
Microtek DocWizard EX V1.0
-
+
HUAGOSCAN scanning software
-
+
Language
-
+
简体中文
-
+
English
-
+
Multi-column display
-
+
Move to...
-
+
Insert file
-
-
-
+
+
+
No scanner detected
-
+
Auto save
-
+
Do not show prompt and save the edited images directly when switching images.
-
+
Show status bar
-
+
Hide status bar
-
+
Show toolbar
-
+
Hide toolbar
-
+
Enable image information
-
+
Disable image information
-
+
Enable auto save
-
+
Cancel auto save
-
+
Save edited images automatically when switching images. If you want to cancel, please deselect the menu item: Auto save images.
-
-
-
-
-
+
+
+
+
+
Ask
-
+
Image modified, save changes?
@@ -2361,7 +2361,7 @@ Please make sure the two passwords are the same.
No
-
+
File lost; delete?
@@ -2370,17 +2370,17 @@ Please make sure the two passwords are the same.
Device discovered
-
+
Device discovered: %1
-
+
reconnect
-
+
connected, but failed to open
@@ -2390,394 +2390,399 @@ Please make sure the two passwords are the same.
disconnected
-
-
-
+
+
+
Insufficient disk space for the current path.
Please reselect a path or clear disk space immediately.
-
-
-
+
+
+
Warning
-
-
+
+
Failed to save image:
-
-
-
-
+
+
+
+
Failed to create folder:
-
-
+
+
Failed to create image file:
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
Failed to save image:
-
+
Black and white
-
+
Grayscale
-
+
Color
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Failed to start
-
+
UNI scanning software
-
-
+
+
Default scheme
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Please wake up the device manually
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Scan
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Device is awake
-
+
Show thumbnail bar
-
+
Hide thumbnail bar
-
+
Clear and start scan
-
+
Do not clear and start scan
-
+
Cancel
-
+
Image already exists in the list of images.
Clear?
-
+
Open image
-
+
Insert image
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
prompt
-
-
-
+
+
+
Saved successfully
-
-
+
+
Image name already exists in the list
-
+
Please select at least one image and then export
-
+
File name
-
+
File path
-
+
File size
-
+
Creation time
-
+
Modification time
-
+
Access time
-
+
Format
-
+
Width
-
+
Height
-
+
Depth
-
+
Color mode
-
+
Pixels per inch
-
+
Print size
-
+
Frame
-
+
None
-
+
Black and white
-
+
Gray scale
-
+
Color
-
+
Not supported
-
+
Warning
-
+
Device is currently running!
Please stop scanning first.
-
+
There are unsaved images; are you sure you want to close?
-
+
Are you sure you want to close?
-
+
Are you sure you want to log out of the administrator account?
-
+
Confirm operation
-
+
Are you sure you want to clear the roller count?
-
-
-
+
+
+
Prompt
-
-
+
+
Roller count reset to zero.
-
-
+
+
Failed to reset roller count.
-
+
Error
-
+
File lost! File may be deleted or renamed.
-
+
Confirm operation
-
+
Are you sure you want to clear the roller count?
-
+
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.
-
+
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: © %3</p><p>%4%5%6%7%8%9</p>
-
-
+
+
About %1
-
-
+
+
<p>Version: %1</p>
-
-
+
+
<p>Copyright: © %1</p>
-
-
+
+
<p>%1: <a href='%2'>%3</a>
-
-
+
+
<p>%1: %2
-
+
Number of rollers
-
+
Open scanner
-
-
+
HUAGOSCAN scanning software
-
-
+
+
successfully
-
+
Ready
-
-
+
+
failed
-
-
+
+
Error
-
+
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 file access permissions
-
+
Image processing failed
-
+
OCR initialization error
-
+
OCR failed
-
+
File does not exist
-
+
Failed to load dynamic library
-
+
File data error
-
+
Image format processing error
-
+
Insufficient memory
-
+
Failed
-
+
Apply configuration
-
+
Are you sure you want to disconnect device:
-
+
?
-
-
+
+
Close
-
+
Prompt
-
+
No other versions obtained
-
-
+
+
Device does not support this operation
-
-
+
+
IO error
-
-
+
+
The language switch is successful and takes effect the next time the software is started!
-
+
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
-
+
Enhance text
-
- Apply to image
+ Apply to image
-
+
Brightness
-
+
Gamma correction
-
+
Contrast
@@ -3212,7 +3215,7 @@ Please go to “Scan to” and change the accessible scan folder and then perfor
-
+
OK
@@ -3237,97 +3240,115 @@ Please go to “Scan to” and change the accessible scan folder and then perfor
Custom tone curve
-
+
+
+
+
+
+
+ Prompt
+
+
+
+
+
+
+
+
+ This version does not support this feature.
+
+
+
Please select overwrite original configuration:
-
+
, or add new configuration
-
+
Save configuration
-
+
Overwrite original configuration:
-
+
Add new configuration
-
+
Rename:
-
-
-
+
+
+
Prompt
-
+
Configuration name cannot be blank
-
-
+
+
Configuration name:
-
-
+
+
already exists
-
+
<h6><b>
-
+
:</b></h6>
-
+
<p>
-
+
</p>
-
+
Rename configuration
-
-
+
+
Delete 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 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)