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) (获取设备IP) + + + (is_multiout) + (多流输出) + + + + (multiout_type) + (多流输出类型) + + + + (color_mode) + (颜色模式) + + + + erase_color + (除色或增强) + + + + (erase_multiout_red) + (多流输出除红) + + + + (erase_paper_red) + (试卷除红) + + + + (is_erase_background) + (背景移除) + + + + (background_color_range) + (背景色彩范围) + + + + (sharpen) + (锐化与模糊) + + + + (erase_morr) + (除摩尔纹) + + + + (erase_grids) + (除网纹) + + + + (error_extend) + (错误扩散) + + + + (is_noise_modify) + (噪点优化) + + + + (noise_threshold) + (噪点优化尺寸) + + + + (paper) + (纸张尺寸) + + + + (is_custom_area) + (自定义扫描区域) + + + + (curstom_area_l) + (自定义扫描区域 左) + + + + (curstom_area_r) + (自定义扫描区域 右) + + + + (curstom_area_t) + (自定义扫描区域 上) + + + + (curstom_area_b) + (自定义扫描区域 下) + + + + (is_size_check) + (尺寸检测) + + + + (page) + (扫描页面) + + + + (blank_page_threshold) + (跳过空白页灵敏度) + + + + (resolution) + (分辨率) + + + + (image_quality) + (图像质量) + + + + (is_swap) + (交换正反面) + + + + (is_split) + (图像拆分) + + + + (is_auto_deskew) + (自动纠偏) + + + + (is_custom_gamma) + (自定义gamma) + + + + (bright) + (亮度) + + + + (contrast) + (对比度) + + + + (gamma) + (gamma) + + + + (is_erase_black_frame) + (消除黑框) + + + + (deep_sample) + (深色样张) + + + + (threshold) + (阈值) + + + + (anti_noise) + (背景抗噪等级) + + + + (margin) + (边缘缩进) + + + + (fill_background) + (背景填充方式) + + + + (is_anti_permeate) + (防止渗透) + + + + (anti_permeate_level) + (防止渗透等级) + + + + (is_filling_color) + (色彩填充) + + + + (is_ultrasonic_check) + (超声波检测) + + + + (is_check_staple) + (装订检测) + + + + (scan_mode) + (扫描张数) + + + + (scan_count) + (扫描数量) + + + + (text_direction) + (文稿方向) + + + + (is_rotate_bkg180) + (背面旋转180度) + + + + (is_check_dogear) + (折角检测) + + + + (dogear_size) + (折角检测大小) + + + + (is_check_skew) + (歪斜检测) + + + + (skew_range) + (歪斜容忍度) + + + + (black_white_threshold) + (转为黑白图像时的阈值) + + + + (is_photo_mode) + (照片模式) + + + + (double_feed_handle) + (双张图片处理方式) + + + + (scan_when_paper_on) + (待纸扫描) + + + + (feed_strength) + (分纸强度) + + + + (power_scheme) + (休眠时间) + + + + (is_auto_strength) + (是否自动调节搓纸强度) + + + + (feed_strength_value) + (搓纸阈值) + + + + (is_reverse_bw) + (黑白图像是否反色输出) + + + + (is_erase_hole_l) + (穿孔移除—左侧) + + + + (search_hole_range_l) + (左侧穿孔搜索范围) + + + + (is_erase_hole_r) + (穿孔移除—右侧) + + + + (search_hole_range_r) + (右侧穿孔搜索范围) + + + + (is_erase_hole_t) + (穿孔移除—上侧) + + + + (search_hole_range_t) + (上侧穿孔搜索范围) + + + + (is_erase_hole_b) + (穿孔移除—下侧) + + + + (search_hole_range_b) + (下侧穿孔搜索范围) + + + + (fold_direction) + (对折模式) + + + + (color_correction) + (色偏校正) + + + + (history_count) + (历史张数-Get) + + + + (driver_version) + (驱动版本-Get) + + + + (manufacturer) + (制造商/开发商-Get) + + + + (copyright) + (版权信息-Get) + + + + (company_url) + (公司网址-Get) + + + + (company_tel) + (公司电话-Get) + + + + (company_addr) + (公司地址-Get) + + + + (gps) + (公司地图定位-Get) + + + + (help) + (显示帮助文档-Get) + + + + (dev_vid) + (获取设备VID-Get) + + + + (dev_pid) + (获取设备PID-Get) + + + + (dev_name) + (获取设备名称-Get) + + + + (dev_family) + (获取设备型号-Get) + + + + (Device_sn) + (获取设备序列号-Get) + + + + (Firm_ver) + (获取设备固件版本-Get) + + + + (IP_addr) + (获取设备IP-Get) + + + + (MAC_addr) + (获取设备MAC-Get) + + + + (CUSTOM_GAMMA) + (自定义GAMMA) + + + + (ROLLER_LIFE) + (滚轴寿命) + + + + (LANGUAGE) + (语言环境) + + + + (MOTOR_VER) + (电机固件版本) + + + + (PAPER_ON) + (是否有纸张) + + + + (GRAY_GAMMA) + (自定义GAMMA,灰度分量) + + + + (COLOR_GAMMA) + (自定义GAMMA,彩色分量) + + + + (RED_GAMMA) + (自定义GAMMA,红色分量) + + + + (GREEN_GAMMA) + (自定义GAMMA,绿色分量) + + + + (BLUE_GAMMA) + (自定义GAMMA,蓝色分量) + + + + (INITIAL_BOOT_TIME) + (获取初始开机时间) + + + + (DISCARDBLANK) + (跳过空白页) + + + + (LENS_DIRTY) + (设备镜头脏污检测) + + + + (login) + (用户登录-Set) + + + + (logout) + (用户登出-Set) + + + + (roller_count) + (滚轴计数-Get/Reset) + + + + (driver_log) + (驱动日志-Get/Reset) + + + + (device_log) + (设备日志-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); }