diff --git a/app/scanner2/Scanner_zh_CN.qm b/app/scanner2/Scanner_zh_CN.qm
index 67ab2e1d..fb603370 100644
Binary files a/app/scanner2/Scanner_zh_CN.qm and b/app/scanner2/Scanner_zh_CN.qm differ
diff --git a/app/scanner2/Scanner_zh_CN.ts b/app/scanner2/Scanner_zh_CN.ts
index 421d6e8b..94599301 100644
--- a/app/scanner2/Scanner_zh_CN.ts
+++ b/app/scanner2/Scanner_zh_CN.ts
@@ -13,28 +13,28 @@
-
-
+
+
选择日志保存路径
-
-
+
+
文本文件(*.txt)
-
-
+
+
提示
-
-
+
+
没有找到扫描仪!
@@ -60,6 +60,24 @@
未找到设备源!
+
+ Dialog_AbnormalImage
+
+
+
+ 异常图片
+
+
+
+
+ 保留图像
+
+
+
+
+ 丢弃图像
+
+
Dialog_Admin
@@ -1996,14 +2014,6 @@ bug description:
设备固件自动更新升级中,请稍候...
-
- Dialog_wrong_img
-
-
-
-
-
-
GraphicsScene
@@ -2209,7 +2219,7 @@ bug description:
-
+
扫描至...
@@ -2439,22 +2449,22 @@ bug description:
选择设备源...
-
+
华高扫描软件
-
+
多列显示
-
+
移动到...
-
+
插入文件
@@ -2463,22 +2473,22 @@ bug description:
没有发现扫描仪
-
-
-
-
-
+
+
+
+
+
询问
-
+
图像已被修改。
是否保存修改?
-
+
文件已丢失,是否删除?
@@ -2503,17 +2513,17 @@ bug description:
扫描完成
-
+
清空并启动扫描
-
+
不清空并启动扫描
-
+
图像列表中已存在图像。
@@ -2528,12 +2538,12 @@ Do you want to clear?
磁盘空间不足,请删除不需要的文件,以保证有足够的空间
-
+
打开图片
-
+
插入图片
@@ -2546,17 +2556,17 @@ Do you want to clear?
保存失败
-
+
黑白
-
+
256级灰度
-
+
24位彩色
@@ -2565,24 +2575,24 @@ Do you want to clear?
请手动唤醒设备
-
+
紫光扫描软件
-
+
扫描软件
-
+
得力扫描软件
-
-
-
+
+
+
请前往菜单栏“扫描->选择设备源...”选择设备
@@ -2591,229 +2601,229 @@ Do you want to clear?
未找到设备源!
-
-
+
+
默认配置方案
-
+
本次扫描完成,是否继续扫描?
-
+
显示缩略图栏
-
+
隐藏缩略图栏
-
+
取消
-
-
-
+
+
+
保存成功
-
-
+
+
图片名在列表中已存在
-
+
请至少选中一张图片再进行导出
-
+
文件名
-
+
文件路径
-
+
文件大小
-
+
创建时间
-
+
修改时间
-
+
访问时间
-
+
格式
-
+
宽度
-
+
高度
-
+
深度
-
+
色彩模式
-
+
每英寸像素点
-
+
打印尺寸
-
+
帧
-
+
无
-
+
黑白
-
+
灰度
-
+
彩色
-
+
不支持
-
+
警告
-
+
设备正在运行!
请先结束扫描。
-
+
<p>售后电话: %1</p>
-
+
<p>公司地图定位: <a href="%1">%2</a></p>
-
+
设备已断开
-
+
打开失败
-
-
-
-
+
+
+
+
提示
-
+
<p>版本号: %1</p>
-
-
-
+
+
+
<p>制造商: %1</p>
-
-
-
+
+
+
<p>版权信息: %1</p>
-
-
-
+
+
+
<p>Company website: <a href=%1>%1</p>
<p>公司网址: <a href="%1">%1</p>
-
-
-
+
+
+
<p>公司地址: %1</p>
-
-
-
+
+
+
<p>公司电话: %1</p>
-
+
百度地图访问
@@ -2834,8 +2844,8 @@ Please finish scanning first.
扫描张数: %1
-
-
+
+
设备 %1 已打开
@@ -2844,76 +2854,76 @@ Please finish scanning first.
关于
-
+
无法访问当前缓存路径:%1
请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径。
-
+
无法访问当前缓存路径:%1
请尝试在【扫描到】更改缓存路径。
-
+
图像处理失败
-
+
OCR初始化错误
-
+
OCR错误
-
+
文件不存在
-
+
加载动态库失败
-
+
文件数据错误
-
+
图像格式处理错误
-
+
内存不足
-
+
错误
-
+
纸轮搓纸次数已超过设计使用范围,扫描过程中搓纸失败、歪斜、搓多张等异常频次可能会明显增多,
请注意及时清洁、并联系设备供应商购买替换纸轮!
-
-
+
+
语言切换成功,下次启动软件时生效!
-
+
您确定彻底删除选中项文件?
@@ -2931,7 +2941,7 @@ Please finish scanning first.
请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径
-
+
文件访问权限不足
@@ -2956,18 +2966,18 @@ Please finish scanning first.
关闭
-
+
提示
-
+
未获取到其他版本
-
-
+
+
操作失败
@@ -2976,8 +2986,8 @@ Please finish scanning first.
IO错误
-
-
+
+
错误
@@ -2992,7 +3002,7 @@ Continue to close?
是否继续关闭?
-
+
是否确定登出管理员账户?
@@ -3062,92 +3072,92 @@ Continue to close?
启动失败
-
+
汉王扫描软件
-
+
立思辰扫描软件
-
+
沧田扫描软件
-
+
Microtek DocWizard EX 扫描软件
-
+
语言
-
+
简体中文
-
+
English
-
+
自动保存
-
+
切换图片时,不提醒,直接保存编辑过的图片
-
+
显示状态栏
-
+
隐藏状态栏
-
+
显示工具栏
-
+
隐藏工具栏
-
+
启用图像信息
-
+
关闭图像信息
-
+
启用自动保存
-
+
取消自动保存
-
+
切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存
@@ -3192,12 +3202,12 @@ Continue to close?
创建图片文件失败:
-
-
-
-
-
-
+
+
+
+
+
+
保存图片文件失败:
@@ -3236,17 +3246,17 @@ Continue to close?
滚轴张数: %1
-
+
检测到磁盘空间已不足1GB,是否继续?
-
+
启动安装程序失败!
-
+
有图像未保存,确定关闭?
@@ -3256,39 +3266,39 @@ Are you sure to close?
发现设备 : %1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
提示
-
+
确定关闭应用软件?
-
+
确认操作
-
+
您确定要清除滚轴计数吗
@@ -3297,22 +3307,22 @@ Are you sure to close?
提示
-
+
辊轴计数已置零
-
+
重置滚轴计数失败
-
+
错误
-
+
文档丢失!文档可能已被删除或被重命名。
@@ -3353,7 +3363,7 @@ Are you sure to close?
<p>%1</p><p>版本: %2<br>版权: © %3</p><p>%4%5%6%7%8%9</p>
-
+
关于 %1
diff --git a/app/scanner2/Scanner_zh_EN.qm b/app/scanner2/Scanner_zh_EN.qm
index 0e500e13..67c49ebb 100644
Binary files a/app/scanner2/Scanner_zh_EN.qm and b/app/scanner2/Scanner_zh_EN.qm differ
diff --git a/app/scanner2/Scanner_zh_EN.ts b/app/scanner2/Scanner_zh_EN.ts
index 16ec98f9..ea8e412d 100644
--- a/app/scanner2/Scanner_zh_EN.ts
+++ b/app/scanner2/Scanner_zh_EN.ts
@@ -41,28 +41,28 @@
-
-
+
+
Select log file path
-
-
+
+
Text(*.txt)
-
-
+
+
Prompt
-
-
+
+
Scanner not found!
@@ -84,6 +84,24 @@
Device source not found!
+
+ Dialog_AbnormalImage
+
+
+
+ Abnormal image
+
+
+
+
+ Reserve image
+
+
+
+
+ Discard image
+
+
Dialog_Admin
@@ -1868,14 +1886,6 @@ Please make sure the two passwords are the same.
Device firmware currently updating; please wait...
-
- Dialog_wrong_img
-
-
-
-
-
-
GraphicsScene
@@ -2065,7 +2075,7 @@ Please make sure the two passwords are the same.
-
+
Scan to...
@@ -2295,62 +2305,62 @@ Please make sure the two passwords are the same.
Select device source...
-
+
Hanvon scanning software
-
+
LANXUM scanning software
-
+
CUMTENN scanning software
-
+
Microtek DocWizard EX V1.0
-
+
Deli scanning software
-
+
HUAGOSCAN scanning software
-
+
Language
-
+
简体中文
-
+
English
-
+
Multi-column display
-
+
Move to...
-
+
Insert file
@@ -2359,76 +2369,76 @@ Please make sure the two passwords are the same.
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
-
+
This scan is complete. Do you want to continue scanning?
-
+
Image modified, save changes?
@@ -2445,7 +2455,7 @@ Please make sure the two passwords are the same.
No
-
+
File lost; delete?
@@ -2491,34 +2501,34 @@ Please reselect a path or clear disk space immediately.
Failed to create image file:
-
-
-
-
-
-
+
+
+
+
+
+
Failed to save image:
-
+
Black and white
-
-
-
+
+
+
Please go to the menu bar 'Scan ->Select device source...' to select a device
-
+
Grayscale
-
+
Color
@@ -2527,13 +2537,13 @@ Please reselect a path or clear disk space immediately.
Failed to start
-
+
UNI scanning software
-
-
+
+
Default scheme
@@ -2542,7 +2552,7 @@ Please reselect a path or clear disk space immediately.
Please wake up the device manually
-
+
Scanning software
@@ -2551,267 +2561,267 @@ Please reselect a path or clear disk space immediately.
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?
-
+
<p>After-sale telephone: %1</p>
-
+
<p>Company Location: <a href="%1">%2</a></p>
-
+
Device is offline
-
+
Open failed
-
+
The paper roller has reached its service life, and the frequency of abnormalities during the scanning process may increase.
Please contact the equipment supplier promptly to purchase a replacement paper roller!
-
-
-
-
+
+
+
+
Prompt
-
+
<p>Version: %1</p>
-
-
-
+
+
+
<p>Manufacturer: %1</p>
-
-
-
+
+
+
<p>Copyright: %1</p>
-
-
-
+
+
+
<p>Company website: <a href=%1>%1</p>
<p>Website: <a href="%1">%1</p>
@@ -2821,21 +2831,21 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
Device source not found!
-
-
-
+
+
+
<p>Address: %1</p>
-
-
-
+
+
+
<p>Phone Number: %1</p>
-
+
Baidu map access
@@ -2890,23 +2900,23 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
Total count: %1
-
+
Detected that there is less than 1GB of disk space. Do you want to continue?
-
-
+
+
Device %1 is open
-
+
Confirm operation
-
+
Are you sure you want to clear the roller count?
@@ -2915,22 +2925,22 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
Prompt
-
+
Roller count reset to zero.
-
+
Failed to reset roller count.
-
+
Error
-
+
File lost! File may be deleted or renamed.
@@ -2947,13 +2957,13 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
About
-
+
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].
@@ -2967,7 +2977,7 @@ 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
@@ -3012,13 +3022,13 @@ Please try to change the cache path in [Scan to].
failed
-
-
+
+
Error
-
+
Failed to start!
@@ -3028,52 +3038,52 @@ 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
@@ -3094,18 +3104,18 @@ Please go to “Scan to” and change the accessible scan folder and then perfor
Close
-
+
Prompt
-
+
No other versions obtained
-
-
+
+
Operation failed
@@ -3114,13 +3124,13 @@ Please go to “Scan to” and change the accessible scan folder and then perfor
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?
diff --git a/app/scanner2/device_user.cpp b/app/scanner2/device_user.cpp
index ba0b10df..77d5d6d7 100644
--- a/app/scanner2/device_user.cpp
+++ b/app/scanner2/device_user.cpp
@@ -216,6 +216,8 @@ DeviceUser::DeviceUser(QWidget *wnd, HGSaneSource source, const QString &passwor
m_source = source;
m_saneDev = nullptr;
m_password = password;
+ m_abnormlImageStatus = HGSANE_IMAGE_STATUS_NO_STATUS;
+ m_abnormalImageResult = HGBASE_ERR_OK;
}
DeviceUser::~DeviceUser()
@@ -366,29 +368,37 @@ void HGAPI DeviceUser::DeviceEventFunc(HGSaneDevice dev, HGUInt event, HGPointer
if (HGSANE_EVENT_TYPE_SCANFINISHED == event)
{
emit p->scanFinishEvent();
+ p->m_abnormlImageStatus = HGSANE_IMAGE_STATUS_NO_STATUS;
+ p->m_abnormalImageResult = HGBASE_ERR_OK;
}
else if (HGSANE_EVENT_TYPE_WORKING == event)
{
emit p->scanWorkingEvent();
+ p->m_abnormlImageStatus = HGSANE_IMAGE_STATUS_NO_STATUS;
+ p->m_abnormalImageResult = HGBASE_ERR_OK;
}
}
HGUInt HGAPI DeviceUser::DeviceImageFunc(HGSaneDevice dev, HGImage image, HGUInt type, HGPointer param)
{
DeviceUser* p = (DeviceUser*)param;
- HGUInt result = HGBASE_ERR_OK;
- if (HGSANE_IMAGE_TYPE_DOUBLE == type)
+
+ if (HGSANE_IMAGE_TYPE_DOUBLE == type && HGSANE_IMAGE_STATUS_NO_STATUS == p->m_abnormlImageStatus)
{
- emit p->abnormalImage(image, &result);
+ emit p->abnormalImage(image, &p->m_abnormalImageResult);
}
- if (HGBASE_ERR_OK == result)
+ if (HGBASE_ERR_OK == p->m_abnormalImageResult || HGSANE_IMAGE_STATUS_RESERVE == p->m_abnormlImageStatus)
{
+ if (HGSANE_IMAGE_TYPE_DOUBLE == type)
+ p->m_abnormlImageStatus = HGSANE_IMAGE_STATUS_RESERVE;
+
emit p->newImage(image);
}
else
{
- return HGSANE_ERR_STOPSCAN;
+ p->m_abnormlImageStatus = HGSANE_IMAGE_STATUS_DISCARD;
+ return HGBASE_ERR_FAIL;
}
return HGBASE_ERR_OK;
diff --git a/app/scanner2/device_user.h b/app/scanner2/device_user.h
index 9e214752..8d446525 100644
--- a/app/scanner2/device_user.h
+++ b/app/scanner2/device_user.h
@@ -133,6 +133,9 @@ private:
HGSaneSource m_source;
HGSaneDevice m_saneDev;
QString m_password;
+
+ HGUInt m_abnormlImageStatus;
+ HGUInt m_abnormalImageResult;
};
#endif
diff --git a/app/scanner2/dialog_abnormalimage.cpp b/app/scanner2/dialog_abnormalimage.cpp
index fc4d09fa..825f0a6a 100644
--- a/app/scanner2/dialog_abnormalimage.cpp
+++ b/app/scanner2/dialog_abnormalimage.cpp
@@ -7,8 +7,9 @@ Dialog_AbnormalImage::Dialog_AbnormalImage(HGImage image, QWidget *parent) :
ui(new Ui::Dialog_AbnormalImage)
{
ui->setupUi(this);
+ setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint);
- m_result = HGBASE_ERR_OK;
+ m_result = HGBASE_ERR_FAIL;
m_view = new HGImgView(this);
m_view->addImage(image);
diff --git a/modules/sane_user/HGSane.h b/modules/sane_user/HGSane.h
index 411de9af..72efd407 100644
--- a/modules/sane_user/HGSane.h
+++ b/modules/sane_user/HGSane.h
@@ -42,6 +42,10 @@ typedef struct
#define HGSANE_IMAGE_TYPE_NORMAL 0L
#define HGSANE_IMAGE_TYPE_DOUBLE 1L
+#define HGSANE_IMAGE_STATUS_NO_STATUS 0L
+#define HGSANE_IMAGE_STATUS_RESERVE 1L
+#define HGSANE_IMAGE_STATUS_DISCARD 2L
+
/* Sane回调
*/
typedef void (HGAPI* HGSane_DeviceEventFunc)(HGSaneDevice dev, HGUInt event, HGPointer param);
diff --git a/modules/sane_user/HGSaneImpl.cpp b/modules/sane_user/HGSaneImpl.cpp
index 133d4388..b8ed0410 100644
--- a/modules/sane_user/HGSaneImpl.cpp
+++ b/modules/sane_user/HGSaneImpl.cpp
@@ -1121,8 +1121,7 @@ void HGAPI HGSaneDeviceImpl::ThreadFunc(HGThread thread, HGPointer param)
HGUInt type = (SCANNER_ERR_DEVICE_DOUBLE_FEEDING == stat1)
? HGSANE_IMAGE_TYPE_DOUBLE : HGSANE_IMAGE_TYPE_NORMAL;
HGUInt imgRet = p->m_imageFunc((HGSaneDevice)p, img, type, p->m_imageParam);
- if (HGSANE_ERR_STOPSCAN == imgRet)
- stopScan = true;
+
HGBase_DestroyImage(img);
}
}
@@ -1131,13 +1130,13 @@ void HGAPI HGSaneDeviceImpl::ThreadFunc(HGThread thread, HGPointer param)
buffer = NULL;
bufferSize = 0;
- if (stopScan)
- {
- saneAPI.sane_cancel_api(p->m_devHandle);
- if (NULL != p->m_scanNotify)
- p->m_scanNotify((int)SANE_EVENT_SCAN_FINISHED, NULL, 0);
- break;
- }
+// if (stopScan)
+// {
+// saneAPI.sane_cancel_api(p->m_devHandle);
+// if (NULL != p->m_scanNotify)
+// p->m_scanNotify((int)SANE_EVENT_SCAN_FINISHED, NULL, 0);
+// break;
+// }
if (!p->m_cancelScan)
{
diff --git a/modules/twainui/Manager.cpp b/modules/twainui/Manager.cpp
index c887ded0..d3ea3c04 100644
--- a/modules/twainui/Manager.cpp
+++ b/modules/twainui/Manager.cpp
@@ -242,6 +242,7 @@ int Manager::showAbnormalImgUi(bool qt, SANE_Image *img)
#endif
emit createAbnormalImgUi(qt, image);
+ HGBase_DestroyImage(image);
#ifdef HG_CMP_MSC
if (!qt)
diff --git a/modules/twainui/dialog_abnormal_img_select.cpp b/modules/twainui/dialog_abnormal_img_select.cpp
index 988a0b45..54055b58 100644
--- a/modules/twainui/dialog_abnormal_img_select.cpp
+++ b/modules/twainui/dialog_abnormal_img_select.cpp
@@ -8,7 +8,7 @@ Dialog_abnormal_img_select::Dialog_abnormal_img_select(HGImage image, QWidget *p
ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
- m_view = new HGImgView();
+ m_view = new HGImgView(this);
m_view->addImage(image);
ui->stackedWidget->addWidget(m_view);
ui->stackedWidget->setCurrentWidget(m_view);