TwainTest工具,微调界面,增加twain测试项

This commit is contained in:
yangjiaxuan 2024-02-20 18:24:51 +08:00
parent feff858a04
commit bd15a99d11
9 changed files with 591 additions and 90 deletions

View File

@ -0,0 +1,9 @@
<RCC>
<qresource prefix="/Resource"/>
<qresource prefix="/translation">
<file>TwainTest_zh_CN.qm</file>
</qresource>
<qresource prefix="/images">
<file>image_rsc/logo/logo.ico</file>
</qresource>
</RCC>

Binary file not shown.

View File

@ -0,0 +1,287 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>MainWindow</name>
<message>
<location filename="mainwindow.ui" line="14"/>
<source>MainWindow</source>
<translation>Twain测试工具</translation>
</message>
<message>
<location filename="mainwindow.ui" line="27"/>
<source>Set Capbility:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="40"/>
<source>Scan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="53"/>
<source>Set Cap</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="66"/>
<source>Device Status:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="89"/>
<source>Capbility Type:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="102"/>
<source>Reset Capbility</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="125"/>
<source>Set cap Content:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="148"/>
<source>Get Cap</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="161"/>
<source>Get cap Content:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="186"/>
<source>menu_scan</source>
<oldsource>act_scan</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="195"/>
<source>act_selectDevice</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="35"/>
<location filename="mainwindow.cpp" line="68"/>
<source>No device connected</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="85"/>
<source>Device %1 is open</source>
<translation> %1 </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="93"/>
<location filename="mainwindow.cpp" line="109"/>
<location filename="mainwindow.cpp" line="113"/>
<location filename="mainwindow.cpp" line="130"/>
<source>Prompt</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="93"/>
<source>Device source not found!</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="109"/>
<source>Set successfully</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="113"/>
<source>Set failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="130"/>
<source>Get failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="229"/>
<source>(FillBackground)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="230"/>
<source>(BackRotate180)</source>
<translation>(180)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="231"/>
<source>(ScrewDetectEnable)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="232"/>
<source>(EnhanceColor)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="233"/>
<source>(DARK_SAMPLE)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="234"/>
<source>(FillHole)</source>
<translation>(穿)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="235"/>
<source>(ScrewLevel)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="236"/>
<source>(Sharpen)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="237"/>
<source>(HardwareVersion)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="238"/>
<source>(MultiOutputRed)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="239"/>
<source>(EnFold)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="241"/>
<source>(StableDetectEnable)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="242"/>
<source>(DiscardBlankVince)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="243"/>
<source>(FillHoleRatio)</source>
<translation>(穿)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="244"/>
<source>(SwitchFrontBack)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="245"/>
<source>(HsvCorrect)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="246"/>
<source>(DogEarDelection)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="247"/>
<source>(FillBackgroundMode)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="248"/>
<source>(CroporDesaskewIndent)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="249"/>
<source>(CropNoise)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="250"/>
<source>(CroporDesaskewThreshold)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="251"/>
<source>(DetachNoise)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="252"/>
<source>(DetachNoiseValue)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="253"/>
<source>(SizeDetect)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="254"/>
<source>(LowPowerMode)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="255"/>
<source>(ENCODE)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="256"/>
<source>(CropModel)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="257"/>
<source>(DogEarDistance)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="258"/>
<source>(ImageSplit)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="259"/>
<source>(FadeBackground)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="260"/>
<source>(FADE_BKG_VALUE)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="261"/>
<source>(TO_BE_SCAN)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="262"/>
<source>(MULTI_OUT)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="263"/>
<source>(MULTI_OUT_TYPE)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="264"/>
<source>(SCAN_WITH_HOLE)</source>
<translation>()</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="265"/>
<source>(IP)</source>
<translation>(IP)</translation>
</message>
</context>
</TS>

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,10 +1,16 @@
#include "mainwindow.h"
#include <QApplication>
#include <QTranslator>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator translator_app;
if (translator_app.load(":translation/TwainTest_zh_CN.qm"))
a.installTranslator(&translator_app);
MainWindow w;
w.show();
return a.exec();

View File

@ -16,17 +16,22 @@ MainWindow::MainWindow(QWidget *parent)
, m_cacheUuid("")
{
ui->setupUi(this);
this->setWindowIcon(QIcon(":images/image_rsc/logo/logo.ico"));
HGChar cacheUuid[256] = { 0 };
HGBase_GetUuid(cacheUuid, 256);
m_cacheUuid = cacheUuid;
updateUiEnable(false);
initCapbility();
QStringList capTypes = { "TWTY_INT8", "TWTY_UINT8", "TWTY_INT16", "TWTY_UINT16", "TWTY_INT32", "TWTY_UINT32", "TWTY_BOOL","TWTY_FIX32",
"TWTY_STR32", "TWTY_STR64", "TWTY_STR128", "TWTY_STR255" };
ui->comboBox_capType->addItems(capTypes);
ui->comboBox_capType->setCurrentIndex(0);
ui->comboBox_capType->setEditable(true);
ui->comboBox_setCap->setEditable(true);
ui->label_deviceStatus->setText(tr("No device connected"));
HGTwain_CreateDSM((HWND)this->winId(), &m_twainDSM);
@ -61,6 +66,7 @@ MainWindow::~MainWindow()
void MainWindow::on_act_selectDevice_triggered()
{
ui->label_deviceStatus->setText(tr("No device connected"));
updateUiEnable(false);
if (m_twainDS != nullptr)
{
@ -77,6 +83,7 @@ void MainWindow::on_act_selectDevice_triggered()
{
HGTwain_LoginDS(m_twainDS, "user", "huagoscan");
ui->label_deviceStatus->setText(tr("Device %1 is open").arg(getDeviceName()));
updateUiEnable(true);
}
}
else
@ -88,19 +95,13 @@ void MainWindow::on_act_selectDevice_triggered()
}
}
void MainWindow::on_pushButton_SetCap_clicked()
void MainWindow::on_pushButton_setCap_clicked()
{
QString capCode = ui->lineEdit_setCap->text();
QString capCode = ui->comboBox_setCap->currentText();
bool ok = false;
HGUShort cap = capCode.toInt(&ok, 16);
HGUShort cap = capCode.left(6).toInt(&ok, 16);
HGCapValue value;
QString capType = ui->comboBox_capType->currentText();
if (capType == "TWTY_BOOL")
{
value.type = HGCAPVALUE_TYPE_BOOL;
value.valueBool = ui->lineEdit_setCapContent->text().toInt();
}
HGCapValue value = getHGCapValue();
HGResult ret = HGTwain_SetCapbility(m_twainDS, cap, &value, ui->checkBox_resetCap->isChecked());
if (ret == HGBASE_ERR_OK)
@ -113,9 +114,76 @@ void MainWindow::on_pushButton_SetCap_clicked()
}
}
void MainWindow::on_pushButton_getCap_clicked()
{
QString capCode = ui->comboBox_setCap->currentText();
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)
{
QMessageBox::information(this, tr("Prompt"), tr("Get failed"));
return;
}
if (value.type == HGCAPVALUE_TYPE_CHAR)
{
ui->lineEdit_getCapContent->setText(QString(value.valueChar));
}
else if (value.type == HGCAPVALUE_TYPE_BYTE)
{
ui->lineEdit_getCapContent->setText(QString(value.valueByte));
}
else if (value.type == HGCAPVALUE_TYPE_SHORT)
{
ui->lineEdit_getCapContent->setText(QString::number(value.valueShort));
}
else if (value.type == HGCAPVALUE_TYPE_USHORT)
{
ui->lineEdit_getCapContent->setText(QString::number(value.valueUShort));
}
else if (value.type == HGCAPVALUE_TYPE_INT)
{
ui->lineEdit_getCapContent->setText(QString::number(value.valueInt));
}
else if (value.type == HGCAPVALUE_TYPE_UINT)
{
ui->lineEdit_getCapContent->setText(QString::number(value.valueUInt));
}
else if (value.type == HGCAPVALUE_TYPE_BOOL)
{
ui->lineEdit_getCapContent->setText(value.valueBool ? QString("true") : QString("false"));
}
else if (value.type == HGCAPVALUE_TYPE_FLOAT)
{
ui->lineEdit_getCapContent->setText(QString::number(value.valueFloat, 'f', 4));
}
else if (value.type == HGCAPVALUE_TYPE_STR32)
{
ui->lineEdit_getCapContent->setText(QString::fromLocal8Bit(value.valueStr32));
}
else if (value.type == HGCAPVALUE_TYPE_STR64)
{
ui->lineEdit_getCapContent->setText(QString::fromLocal8Bit(value.valueStr64));
}
else if (value.type == HGCAPVALUE_TYPE_STR128)
{
ui->lineEdit_getCapContent->setText(QString::fromLocal8Bit(value.valueStr128));
}
else if (value.type == HGCAPVALUE_TYPE_STR255)
{
ui->lineEdit_getCapContent->setText(QString::fromLocal8Bit(value.valueStr255));
}
}
void MainWindow::on_pushButton_scan_clicked()
{
HGResult ret = HGTwain_EnableDS(m_twainDS, HGFALSE, (HWND)this->winId(), DSEventFunc, this, DSImageFunc, this);
HGTwain_EnableDS(m_twainDS, HGFALSE, (HWND)this->winId(), DSEventFunc, this, DSImageFunc, this);
}
void MainWindow::on_newImage(void *image)
@ -127,7 +195,7 @@ void MainWindow::on_newImage(void *image)
info.jpegQuality = 100;
info.tiffCompression = HGIMGFMT_TIFFCOMP_LZW;
info.tiffJpegQuality = 0;
HGResult ret = HGImgFmt_SaveImage((HGImage)image, 0, &info, getStdString(scanFileName).c_str());
HGImgFmt_SaveImage((HGImage)image, 0, &info, getStdString(scanFileName).c_str());
}
void MainWindow::on_clearRes()
@ -137,6 +205,7 @@ void MainWindow::on_clearRes()
void MainWindow::DSEventFunc(HGTwainDS ds, HGUInt event, HGPointer param)
{
(void)ds;
MainWindow* p = (MainWindow*)param;
if (HGTWAIN_EVENT_TYPE_SCANFINISHED == event || HGTWAIN_EVENT_TYPE_CLOSEDSREQ == event)
{
@ -146,11 +215,139 @@ void MainWindow::DSEventFunc(HGTwainDS ds, HGUInt event, HGPointer param)
HGUInt MainWindow::DSImageFunc(HGTwainDS ds, HGImage image, HGUInt type, HGPointer param)
{
(void)ds;
(void)type;
MainWindow* p = (MainWindow*)param;
emit p->newImage(image);
return HGBASE_ERR_OK;
}
void MainWindow::initCapbility()
{
QStringList cap = {};
cap.append(QString("0x8004") + tr("(FillBackground)"));
cap.append(QString("0x8005") + tr("(BackRotate180)"));
cap.append(QString("0x8006") + tr("(ScrewDetectEnable)"));
cap.append(QString("0x8007") + tr("(EnhanceColor)"));
cap.append(QString("0x8016") + tr("(DARK_SAMPLE)"));
cap.append(QString("0x8018") + tr("(FillHole)"));
cap.append(QString("0x8021") + tr("(ScrewLevel)"));
cap.append(QString("0x8022") + tr("(Sharpen)"));
cap.append(QString("0x8025") + tr("(HardwareVersion)"));
cap.append(QString("0x8026") + tr("(MultiOutputRed)"));
cap.append(QString("0x8037") + tr("(EnFold)"));
cap.append(QString("0x8090") + tr("(StableDetectEnable)"));
cap.append(QString("0x8091") + tr("(DiscardBlankVince)"));
cap.append(QString("0x8092") + tr("(FillHoleRatio)"));
cap.append(QString("0x8094") + tr("(SwitchFrontBack)"));
cap.append(QString("0x8095") + tr("(HsvCorrect)"));
cap.append(QString("0x8096") + tr("(DogEarDelection)"));
cap.append(QString("0x8097") + tr("(FillBackgroundMode)"));
cap.append(QString("0x8098") + tr("(CroporDesaskewIndent)"));
cap.append(QString("0x8099") + tr("(CropNoise)"));
cap.append(QString("0x8100") + tr("(CroporDesaskewThreshold)"));
cap.append(QString("0x8101") + tr("(DetachNoise)"));
cap.append(QString("0x8102") + tr("(DetachNoiseValue)"));
cap.append(QString("0x8103") + tr("(SizeDetect)"));
cap.append(QString("0x8104") + tr("(LowPowerMode)"));
cap.append(QString("0x8105") + tr("(ENCODE)"));
cap.append(QString("0x8106") + tr("(CropModel)"));
cap.append(QString("0x8107") + tr("(DogEarDistance)"));
cap.append(QString("0x8108") + tr("(ImageSplit)"));
cap.append(QString("0x8109") + tr("(FadeBackground)"));
cap.append(QString("0x8110") + tr("(FADE_BKG_VALUE)"));
cap.append(QString("0x8111") + tr("(TO_BE_SCAN)"));
cap.append(QString("0x8112") + tr("(MULTI_OUT)"));
cap.append(QString("0x8113") + tr("(MULTI_OUT_TYPE)"));
cap.append(QString("0x8114") + tr("(SCAN_WITH_HOLE)"));
cap.append(QString("0x8200") + tr("(IP)"));
//TODO 还需要添加剩余的twain测试项
ui->comboBox_setCap->addItems(cap);
}
HGCapValue MainWindow::getHGCapValue()
{
HGCapValue value;
QString capType = ui->comboBox_capType->currentText();
if (capType == "TWTY_INT8")
{
value.type = HGCAPVALUE_TYPE_CHAR;
QString text = ui->lineEdit_setCapContent->text();
if (!text.isEmpty())
value.valueChar = text.at(0).toLatin1();
}
else if (capType == "TWTY_UINT8")
{
value.type = HGCAPVALUE_TYPE_BYTE;
QString text = ui->lineEdit_setCapContent->text();
if (!text.isEmpty())
value.valueChar = text.at(0).toLatin1();
}
else if (capType == "TWTY_UINT8")
{
value.type = HGCAPVALUE_TYPE_SHORT;
value.valueShort = ui->lineEdit_setCapContent->text().toShort();
}
else if (capType == "TWTY_INT16")
{
value.type = HGCAPVALUE_TYPE_USHORT;
value.valueUShort = ui->lineEdit_setCapContent->text().toUShort();
}
else if (capType == "TWTY_INT32")
{
value.type = HGCAPVALUE_TYPE_INT;
value.valueInt = ui->lineEdit_setCapContent->text().toInt();
}
else if (capType == "TWTY_UINT32")
{
value.type = HGCAPVALUE_TYPE_UINT;
value.valueUInt = ui->lineEdit_setCapContent->text().toUInt();
}
else if (capType == "TWTY_BOOL")
{
value.type = HGCAPVALUE_TYPE_BOOL;
value.valueBool = (HGBool)ui->lineEdit_setCapContent->text().toInt();
}
else if (capType == "TWTY_FIX32")
{
value.type = HGCAPVALUE_TYPE_FLOAT;
value.valueFloat = ui->lineEdit_setCapContent->text().toFloat();
}
else if (capType == "TWTY_STR32")
{
value.type = HGCAPVALUE_TYPE_BYTE;
strcpy(value.valueStr32, ui->lineEdit_setCapContent->text().toStdString().c_str());
}
else if (capType == "TWTY_STR64")
{
value.type = HGCAPVALUE_TYPE_BYTE;
strcpy(value.valueStr64, ui->lineEdit_setCapContent->text().toStdString().c_str());
}
else if (capType == "TWTY_STR128")
{
value.type = HGCAPVALUE_TYPE_BYTE;
strcpy(value.valueStr128, ui->lineEdit_setCapContent->text().toStdString().c_str());
}
else if (capType == "TWTY_STR255")
{
value.type = HGCAPVALUE_TYPE_BYTE;
strcpy(value.valueStr255, ui->lineEdit_setCapContent->text().toStdString().c_str());
}
return value;
}
void MainWindow::updateUiEnable(bool enable)
{
ui->pushButton_setCap->setEnabled(enable);
ui->pushButton_getCap->setEnabled(enable);
ui->pushButton_scan->setEnabled(enable);
}
QString MainWindow::getDeviceName()
{
HGChar devName[256] = {0};

View File

@ -20,7 +20,9 @@ public:
private slots:
void on_act_selectDevice_triggered();
void on_pushButton_SetCap_clicked();
void on_pushButton_setCap_clicked();
void on_pushButton_getCap_clicked();
void on_pushButton_scan_clicked();
@ -36,6 +38,10 @@ private:
static void HGAPI DSEventFunc(HGTwainDS ds, HGUInt event, HGPointer param);
static HGUInt HGAPI DSImageFunc(HGTwainDS ds, HGImage image, HGUInt type, HGPointer param);
void initCapbility();
HGCapValue getHGCapValue();
void updateUiEnable(bool enable);
QString getDeviceName();
QString getCachePath();
QString getCacheFileName(HGImage img);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
<width>706</width>
<height>506</height>
</rect>
</property>
<property name="windowTitle">
@ -17,7 +17,7 @@
<widget class="QLabel" name="label_setCap">
<property name="geometry">
<rect>
<x>30</x>
<x>60</x>
<y>80</y>
<width>91</width>
<height>16</height>
@ -27,21 +27,11 @@
<string>Set Capbility:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_setCap">
<property name="geometry">
<rect>
<x>130</x>
<y>70</y>
<width>161</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_scan">
<property name="geometry">
<rect>
<x>310</x>
<y>450</y>
<x>290</x>
<y>400</y>
<width>101</width>
<height>41</height>
</rect>
@ -50,11 +40,11 @@
<string>Scan</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_SetCap">
<widget class="QPushButton" name="pushButton_setCap">
<property name="geometry">
<rect>
<x>240</x>
<y>200</y>
<x>430</x>
<y>210</y>
<width>111</width>
<height>41</height>
</rect>
@ -66,9 +56,9 @@
<widget class="QLabel" name="label_deviceStatus">
<property name="geometry">
<rect>
<x>30</x>
<x>60</x>
<y>30</y>
<width>331</width>
<width>361</width>
<height>16</height>
</rect>
</property>
@ -79,9 +69,9 @@
<widget class="QComboBox" name="comboBox_capType">
<property name="geometry">
<rect>
<x>130</x>
<y>130</y>
<width>161</width>
<x>160</x>
<y>140</y>
<width>231</width>
<height>31</height>
</rect>
</property>
@ -89,8 +79,8 @@
<widget class="QLabel" name="label_capType">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<x>50</x>
<y>140</y>
<width>101</width>
<height>16</height>
</rect>
@ -102,8 +92,8 @@
<widget class="QCheckBox" name="checkBox_resetCap">
<property name="geometry">
<rect>
<x>370</x>
<y>210</y>
<x>560</x>
<y>220</y>
<width>121</width>
<height>16</height>
</rect>
@ -115,89 +105,89 @@
<widget class="QLineEdit" name="lineEdit_setCapContent">
<property name="geometry">
<rect>
<x>410</x>
<y>70</y>
<x>160</x>
<y>210</y>
<width>231</width>
<height>31</height>
<height>41</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_setCapContent">
<property name="geometry">
<rect>
<x>330</x>
<y>80</y>
<width>71</width>
<x>40</x>
<y>220</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Content:</string>
<string>Set cap Content:</string>
</property>
</widget>
<widget class="QLabel" name="label">
<widget class="QComboBox" name="comboBox_setCap">
<property name="geometry">
<rect>
<x>20</x>
<y>320</y>
<width>91</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Get Capbility:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_getCap">
<property name="geometry">
<rect>
<x>130</x>
<y>310</y>
<width>161</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_setCapContent_2">
<property name="geometry">
<rect>
<x>330</x>
<y>320</y>
<width>71</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Content:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_GetCapContent">
<property name="geometry">
<rect>
<x>410</x>
<y>310</y>
<x>160</x>
<y>70</y>
<width>231</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_getCap">
<property name="geometry">
<rect>
<x>430</x>
<y>290</y>
<width>111</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Get Cap</string>
</property>
</widget>
<widget class="QLabel" name="label_getCapContent">
<property name="geometry">
<rect>
<x>40</x>
<y>300</y>
<width>101</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Get cap Content:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_getCapContent">
<property name="geometry">
<rect>
<x>160</x>
<y>290</y>
<width>231</width>
<height>41</height>
</rect>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<width>706</width>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuact_scan">
<widget class="QMenu" name="menu_scan">
<property name="title">
<string>act_scan</string>
<string>menu_scan</string>
</property>
<addaction name="act_selectDevice"/>
</widget>
<addaction name="menuact_scan"/>
<addaction name="menu_scan"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="act_selectDevice">

View File

@ -106,3 +106,9 @@ HEADERS += \
FORMS += \
../../../app/twaintest/mainwindow.ui
RESOURCES += \
../../../app/twaintest/TwainTest_resource.qrc
TRANSLATIONS += \
../../../app/twaintest/TwainTest_zh_CN.ts