diff --git a/app/twaintest/TwainTest_zh_CN.qm b/app/twaintest/TwainTest_zh_CN.qm
index 40fb282d..22a7bf43 100644
Binary files a/app/twaintest/TwainTest_zh_CN.qm and b/app/twaintest/TwainTest_zh_CN.qm differ
diff --git a/app/twaintest/TwainTest_zh_CN.ts b/app/twaintest/TwainTest_zh_CN.ts
index 226d0b59..6917aba9 100644
--- a/app/twaintest/TwainTest_zh_CN.ts
+++ b/app/twaintest/TwainTest_zh_CN.ts
@@ -283,5 +283,530 @@
(获取设备IP)
+
+
+
+ (多流输出)
+
+
+
+
+ (多流输出类型)
+
+
+
+
+ (颜色模式)
+
+
+
+
+ (除色或增强)
+
+
+
+
+ (多流输出除红)
+
+
+
+
+ (试卷除红)
+
+
+
+
+ (背景移除)
+
+
+
+
+ (背景色彩范围)
+
+
+
+
+ (锐化与模糊)
+
+
+
+
+ (除摩尔纹)
+
+
+
+
+ (除网纹)
+
+
+
+
+ (错误扩散)
+
+
+
+
+ (噪点优化)
+
+
+
+
+ (噪点优化尺寸)
+
+
+
+
+ (纸张尺寸)
+
+
+
+
+ (自定义扫描区域)
+
+
+
+
+ (自定义扫描区域 左)
+
+
+
+
+ (自定义扫描区域 右)
+
+
+
+
+ (自定义扫描区域 上)
+
+
+
+
+ (自定义扫描区域 下)
+
+
+
+
+ (尺寸检测)
+
+
+
+
+ (扫描页面)
+
+
+
+
+ (跳过空白页灵敏度)
+
+
+
+
+ (分辨率)
+
+
+
+
+ (图像质量)
+
+
+
+
+ (交换正反面)
+
+
+
+
+ (图像拆分)
+
+
+
+
+ (自动纠偏)
+
+
+
+
+ (自定义gamma)
+
+
+
+
+ (亮度)
+
+
+
+
+ (对比度)
+
+
+
+
+ (gamma)
+
+
+
+
+ (消除黑框)
+
+
+
+
+ (深色样张)
+
+
+
+
+ (阈值)
+
+
+
+
+ (背景抗噪等级)
+
+
+
+
+ (边缘缩进)
+
+
+
+
+ (背景填充方式)
+
+
+
+
+ (防止渗透)
+
+
+
+
+ (防止渗透等级)
+
+
+
+
+ (色彩填充)
+
+
+
+
+ (超声波检测)
+
+
+
+
+ (装订检测)
+
+
+
+
+ (扫描张数)
+
+
+
+
+ (扫描数量)
+
+
+
+
+ (文稿方向)
+
+
+
+
+ (背面旋转180度)
+
+
+
+
+ (折角检测)
+
+
+
+
+ (折角检测大小)
+
+
+
+
+ (歪斜检测)
+
+
+
+
+ (歪斜容忍度)
+
+
+
+
+ (转为黑白图像时的阈值)
+
+
+
+
+ (照片模式)
+
+
+
+
+ (双张图片处理方式)
+
+
+
+
+ (待纸扫描)
+
+
+
+
+ (分纸强度)
+
+
+
+
+ (休眠时间)
+
+
+
+
+ (是否自动调节搓纸强度)
+
+
+
+
+ (搓纸阈值)
+
+
+
+
+ (黑白图像是否反色输出)
+
+
+
+
+ (穿孔移除—左侧)
+
+
+
+
+ (左侧穿孔搜索范围)
+
+
+
+
+ (穿孔移除—右侧)
+
+
+
+
+ (右侧穿孔搜索范围)
+
+
+
+
+ (穿孔移除—上侧)
+
+
+
+
+ (上侧穿孔搜索范围)
+
+
+
+
+ (穿孔移除—下侧)
+
+
+
+
+ (下侧穿孔搜索范围)
+
+
+
+
+ (对折模式)
+
+
+
+
+ (色偏校正)
+
+
+
+
+ (历史张数-Get)
+
+
+
+
+ (驱动版本-Get)
+
+
+
+
+ (制造商/开发商-Get)
+
+
+
+
+ (版权信息-Get)
+
+
+
+
+ (公司网址-Get)
+
+
+
+
+ (公司电话-Get)
+
+
+
+
+ (公司地址-Get)
+
+
+
+
+ (公司地图定位-Get)
+
+
+
+
+ (显示帮助文档-Get)
+
+
+
+
+ (获取设备VID-Get)
+
+
+
+
+ (获取设备PID-Get)
+
+
+
+
+ (获取设备名称-Get)
+
+
+
+
+ (获取设备型号-Get)
+
+
+
+
+ (获取设备序列号-Get)
+
+
+
+
+ (获取设备固件版本-Get)
+
+
+
+
+ (获取设备IP-Get)
+
+
+
+
+ (获取设备MAC-Get)
+
+
+
+
+ (自定义GAMMA)
+
+
+
+
+ (滚轴寿命)
+
+
+
+
+ (语言环境)
+
+
+
+
+ (电机固件版本)
+
+
+
+
+ (是否有纸张)
+
+
+
+
+ (自定义GAMMA,灰度分量)
+
+
+
+
+ (自定义GAMMA,彩色分量)
+
+
+
+
+ (自定义GAMMA,红色分量)
+
+
+
+
+ (自定义GAMMA,绿色分量)
+
+
+
+
+ (自定义GAMMA,蓝色分量)
+
+
+
+
+ (获取初始开机时间)
+
+
+
+
+ (跳过空白页)
+
+
+
+
+ (设备镜头脏污检测)
+
+
+
+
+ (用户登录-Set)
+
+
+
+
+ (用户登出-Set)
+
+
+
+
+ (滚轴计数-Get/Reset)
+
+
+
+
+ (驱动日志-Get/Reset)
+
+
+
+
+ (设备日志-Get/Reset)
+
diff --git a/app/twaintest/mainwindow.cpp b/app/twaintest/mainwindow.cpp
index 65acf1e8..86d08ede 100644
--- a/app/twaintest/mainwindow.cpp
+++ b/app/twaintest/mainwindow.cpp
@@ -1,4 +1,4 @@
-#include "mainwindow.h"
+#include "mainwindow.h"
#include "ui_mainwindow.h"
#include
@@ -120,9 +120,6 @@ void MainWindow::on_pushButton_getCap_clicked()
bool ok = false;
HGUShort cap = capCode.left(6).toInt(&ok, 16);
- HGCapValue value2;
- HGTwain_GetCapbility(m_twainDS, 0x8803, &value2);
-
HGCapValue value;
HGResult ret = HGTwain_GetCapbility(m_twainDS, cap, &value);
if (ret != HGBASE_ERR_OK)
@@ -226,6 +223,56 @@ void MainWindow::initCapbility()
{
QStringList cap = {};
+ //标准协议↓↓↓
+ cap.append(QString("0x0001") + tr("(CAP_XFERCOUNT)"));
+ cap.append(QString("0x0100") + tr("(ICAP_COMPRESSION)"));
+ cap.append(QString("0x0101") + tr("(ICAP_PIXELTYPE)"));
+ cap.append(QString("0x0102") + tr("(ICAP_UNITS)"));
+ cap.append(QString("0x0103") + tr("(ICAP_XFERMECH)"));
+
+ cap.append(QString("0x1002") + tr("(CAP_FEEDERENABLED)"));
+ cap.append(QString("0x1003") + tr("(CAP_FEEDERLOADED)"));
+ cap.append(QString("0x1007") + tr("(CAP_AUTOFEED)"));
+ cap.append(QString("0x100b") + tr("(CAP_INDICATORS)"));
+ cap.append(QString("0x100d") + tr("(CAP_PAPERDETECTABLE)"));
+ cap.append(QString("0x100e") + tr("(CAP_UICONTROLLABLE)"));
+ cap.append(QString("0x100f") + tr("(CAP_DEVICEONLINE)"));
+ cap.append(QString("0x1010") + tr("(CAP_AUTOSCAN)"));
+ cap.append(QString("0x1012") + tr("(CAP_DUPLEX)"));
+ cap.append(QString("0x1013") + tr("(CAP_DUPLEXENABLED)"));
+ cap.append(QString("0x1014") + tr("(CAP_ENABLEDSUIONLY)"));
+ cap.append(QString("0x1015") + tr("(CAP_CUSTOMDSDATA)"));
+ cap.append(QString("0x1024") + tr("(CAP_SERIALNUMBER)"));
+ cap.append(QString("0x1101") + tr("(ICAP_BRIGHTNESS)"));
+ cap.append(QString("0x1103") + tr("(ICAP_CONTRAST)"));
+ cap.append(QString("0x1106") + tr("(ICAP_FILTER)"));
+ cap.append(QString("0x1108") + tr("(ICAP_GAMMA)"));
+ cap.append(QString("0x110c") + tr("(ICAP_IMAGEFILEFORMAT)"));
+ cap.append(QString("0x1110") + tr("(ICAP_ORIENTATION)"));
+ cap.append(QString("0x1111") + tr("(ICAP_PHYSICALWIDTH)"));
+ cap.append(QString("0x1112") + tr("(ICAP_PHYSICALHEIGHT)"));
+ cap.append(QString("0x1116") + tr("(ICAP_XNATIVERESOLUTION)"));
+ cap.append(QString("0x1117") + tr("(ICAP_YNATIVERESOLUTION)"));
+ cap.append(QString("0x1118") + tr("(ICAP_XRESOLUTION)"));
+ cap.append(QString("0x1119") + tr("(ICAP_YRESOLUTION)"));
+ cap.append(QString("0x111c") + tr("(ICAP_BITORDER)"));
+ cap.append(QString("0x111f") + tr("(ICAP_PIXELFLAVOR)"));
+ cap.append(QString("0x1120") + tr("(ICAP_PLANARCHUNKY)"));
+ cap.append(QString("0x1121") + tr("(ICAP_ROTATION)"));
+ cap.append(QString("0x1122") + tr("(ICAP_SUPPORTEDSIZES)"));
+ cap.append(QString("0x112b") + tr("(ICAP_BITDEPTH)"));
+ cap.append(QString("0x1134") + tr("(ICAP_AUTODISCARDBLANKPAGES)"));
+ cap.append(QString("0x1150") + tr("(ICAP_AUTOMATICBORDERDETECTION)"));
+ cap.append(QString("0x1151") + tr("(ICAP_AUTOMATICDESKEW)"));
+ cap.append(QString("0x1152") + tr("(ICAP_AUTOMATICROTATE)"));
+ cap.append(QString("0x1153") + tr("(ICAP_JpegQuality)"));
+ cap.append(QString("0x1156") + tr("(ICAP_AutoSize)"));
+ cap.append(QString("0x1157") + tr("(ICAP_AutomaticCropUsesFrame)"));
+ cap.append(QString("0x1159") + tr("(ICAP_AutomaticColorEnabled)"));
+ cap.append(QString("0x1151") + tr("(ICAP_AutomaticColorNonColorPixelType)"));
+ cap.append(QString("0x115e") + tr("(ICAP_SupportedExtImageInfo)"));
+
+ //扩展协议↓↓↓
cap.append(QString("0x8004") + tr("(FillBackground)"));
cap.append(QString("0x8005") + tr("(BackRotate180)"));
cap.append(QString("0x8006") + tr("(ScrewDetectEnable)"));
@@ -264,7 +311,112 @@ void MainWindow::initCapbility()
cap.append(QString("0x8114") + tr("(SCAN_WITH_HOLE)"));
cap.append(QString("0x8200") + tr("(IP)"));
- //TODO 还需要添加剩余的twain测试项
+ cap.append(QString("0x8801") + tr("(is_multiout)"));
+ cap.append(QString("0x8802") + tr("(multiout_type)"));
+ cap.append(QString("0x8803") + tr("(color_mode)"));
+ cap.append(QString("0x8804") + tr("erase_color"));
+ cap.append(QString("0x8805") + tr("(erase_multiout_red)"));
+ cap.append(QString("0x8806") + tr("(erase_paper_red)"));
+ cap.append(QString("0x8807") + tr("(is_erase_background)"));
+ cap.append(QString("0x8808") + tr("(background_color_range)"));
+ cap.append(QString("0x8809") + tr("(sharpen)"));
+ cap.append(QString("0x880A") + tr("(erase_morr)"));
+ cap.append(QString("0x880B") + tr("(erase_grids)"));
+ cap.append(QString("0x880C") + tr("(error_extend)"));
+ cap.append(QString("0x880D") + tr("(is_noise_modify)"));
+ cap.append(QString("0x880E") + tr("(noise_threshold)"));
+ cap.append(QString("0x880F") + tr("(paper)"));
+ cap.append(QString("0x8810") + tr("(is_custom_area)"));
+ cap.append(QString("0x8811") + tr("(curstom_area_l)"));
+ cap.append(QString("0x8812") + tr("(curstom_area_r)"));
+ cap.append(QString("0x8813") + tr("(curstom_area_t)"));
+ cap.append(QString("0x8814") + tr("(curstom_area_b)"));
+ cap.append(QString("0x8815") + tr("(is_size_check)"));
+ cap.append(QString("0x8816") + tr("(page)"));
+ cap.append(QString("0x8817") + tr("(blank_page_threshold)"));
+ cap.append(QString("0x8818") + tr("(resolution)"));
+ cap.append(QString("0x8819") + tr("(image_quality)"));
+ cap.append(QString("0x881A") + tr("(is_swap)"));
+ cap.append(QString("0x881B") + tr("(is_split)"));
+ cap.append(QString("0x881C") + tr("(is_auto_deskew)"));
+ cap.append(QString("0x881D") + tr("(is_custom_gamma)"));
+ cap.append(QString("0x881E") + tr("(bright)"));
+ cap.append(QString("0x881F") + tr("(contrast)"));
+ cap.append(QString("0x8820") + tr("(gamma)"));
+ cap.append(QString("0x8821") + tr("(is_erase_black_frame)"));
+ cap.append(QString("0x8822") + tr("(deep_sample)"));
+ cap.append(QString("0x8823") + tr("(threshold)"));
+ cap.append(QString("0x8824") + tr("(anti_noise)"));
+ cap.append(QString("0x8825") + tr("(margin)"));
+ cap.append(QString("0x8826") + tr("(fill_background)"));
+ cap.append(QString("0x8827") + tr("(is_anti_permeate)"));
+ cap.append(QString("0x8828") + tr("(anti_permeate_level)"));
+ cap.append(QString("0x882B") + tr("(is_filling_color)"));
+ cap.append(QString("0x882C") + tr("(is_ultrasonic_check)"));
+ cap.append(QString("0x882D") + tr("(is_check_staple)"));
+ cap.append(QString("0x882E") + tr("(scan_mode)"));
+ cap.append(QString("0x882F") + tr("(scan_count)"));
+ cap.append(QString("0x8830") + tr("(text_direction)"));
+ cap.append(QString("0x8831") + tr("(is_rotate_bkg180)"));
+ cap.append(QString("0x8832") + tr("(is_check_dogear)"));
+ cap.append(QString("0x8833") + tr("(dogear_size)"));
+ cap.append(QString("0x8834") + tr("(is_check_skew)"));
+ cap.append(QString("0x8835") + tr("(skew_range)"));
+ cap.append(QString("0x8836") + tr("(black_white_threshold)"));
+ cap.append(QString("0x8837") + tr("(is_photo_mode)"));
+ cap.append(QString("0x8838") + tr("(double_feed_handle)"));
+ cap.append(QString("0x8839") + tr("(scan_when_paper_on)"));
+ cap.append(QString("0x883A") + tr("(feed_strength)"));
+ cap.append(QString("0x883B") + tr("(power_scheme)"));
+ cap.append(QString("0x883C") + tr("(is_auto_strength)"));
+ cap.append(QString("0x883D") + tr("(feed_strength_value)"));
+ cap.append(QString("0x883E") + tr("(is_reverse_bw)"));
+ cap.append(QString("0x883F") + tr("(is_erase_hole_l)"));
+ cap.append(QString("0x8840") + tr("(search_hole_range_l)"));
+ cap.append(QString("0x8841") + tr("(is_erase_hole_r)"));
+ cap.append(QString("0x8842") + tr("(search_hole_range_r)"));
+ cap.append(QString("0x8843") + tr("(is_erase_hole_t)"));
+ cap.append(QString("0x8844") + tr("(search_hole_range_t)"));
+ cap.append(QString("0x8845") + tr("(is_erase_hole_b)"));
+ cap.append(QString("0x8846") + tr("(search_hole_range_b)"));
+ cap.append(QString("0x8847") + tr("(fold_direction)"));
+ cap.append(QString("0x8848") + tr("(color_correction)"));
+ cap.append(QString("0x8849") + tr("(history_count)"));
+ cap.append(QString("0x884A") + tr("(driver_version)"));
+ cap.append(QString("0x884B") + tr("(manufacturer)"));
+ cap.append(QString("0x884C") + tr("(copyright)"));
+ cap.append(QString("0x884D") + tr("(company_url)"));
+ cap.append(QString("0x884E") + tr("(company_tel)"));
+ cap.append(QString("0x884F") + tr("(company_addr)"));
+ cap.append(QString("0x8850") + tr("(gps)"));
+ cap.append(QString("0x8851") + tr("(help)"));
+ cap.append(QString("0x8852") + tr("(dev_vid)"));
+ cap.append(QString("0x8853") + tr("(dev_pid)"));
+ cap.append(QString("0x8854") + tr("(dev_name)"));
+ cap.append(QString("0x8855") + tr("(dev_family)"));
+ cap.append(QString("0x8856") + tr("(Device_sn)"));
+ cap.append(QString("0x8857") + tr("(Firm_ver)"));
+ cap.append(QString("0x8858") + tr("(IP_addr)"));
+ cap.append(QString("0x8859") + tr("(MAC_addr)"));
+ cap.append(QString("0x885A") + tr("(CUSTOM_GAMMA)"));
+ cap.append(QString("0x885B") + tr("(ROLLER_LIFE)"));
+ cap.append(QString("0x885C") + tr("(LANGUAGE)"));
+ cap.append(QString("0x885D") + tr("(MOTOR_VER)"));
+ cap.append(QString("0x8860") + tr("(PAPER_ON)"));
+ cap.append(QString("0x8861") + tr("(GRAY_GAMMA)"));
+ cap.append(QString("0x8862") + tr("(COLOR_GAMMA)"));
+ cap.append(QString("0x8863") + tr("(RED_GAMMA)"));
+ cap.append(QString("0x8864") + tr("(GREEN_GAMMA)"));
+ cap.append(QString("0x8865") + tr("(BLUE_GAMMA)"));
+ cap.append(QString("0x8866") + tr("(INITIAL_BOOT_TIME)"));
+ cap.append(QString("0x8867") + tr("(DISCARDBLANK)"));
+ cap.append(QString("0x8868") + tr("(LENS_DIRTY)"));
+
+ cap.append(QString("0x9900") + tr("(login)"));
+ cap.append(QString("0x9901") + tr("(logout)"));
+ cap.append(QString("0x9902") + tr("(roller_count)"));
+ cap.append(QString("0x9903") + tr("(driver_log)"));
+ cap.append(QString("0x9904") + tr("(device_log)"));
ui->comboBox_setCap->addItems(cap);
}