This commit is contained in:
13038267101 2022-12-28 17:14:34 +08:00
commit 1a77bb1708
22 changed files with 357 additions and 185 deletions

View File

@ -490,29 +490,39 @@
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="73"/>
<location filename="form_maininterface.ui" line="80"/>
<source>Privious Step</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="87"/>
<location filename="form_maininterface.ui" line="94"/>
<source>PASS</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="94"/>
<location filename="form_maininterface.ui" line="101"/>
<source>FAIL</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="101"/>
<location filename="form_maininterface.ui" line="108"/>
<source>START</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="108"/>
<location filename="form_maininterface.ui" line="122"/>
<source>LeftRotate</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="129"/>
<source>RightRotate</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="42"/>
<source>STOP</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="115"/>
@ -520,7 +530,7 @@
<translation></translation>
</message>
<message>
<location filename="form_maininterface.ui" line="80"/>
<location filename="form_maininterface.ui" line="87"/>
<source>Next Step</source>
<translation></translation>
</message>
@ -556,47 +566,57 @@
</message>
<message>
<location filename="form_maininterface.cpp" line="150"/>
<location filename="form_maininterface.cpp" line="478"/>
<location filename="form_maininterface.cpp" line="494"/>
<source>tips</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="251"/>
<location filename="form_maininterface.cpp" line="181"/>
<source>yes</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="182"/>
<source>no</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="263"/>
<source>ID</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="251"/>
<location filename="form_maininterface.cpp" line="263"/>
<source>Test items</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="251"/>
<location filename="form_maininterface.cpp" line="263"/>
<source>status</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="399"/>
<location filename="form_maininterface.cpp" line="411"/>
<source>not test</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="399"/>
<location filename="form_maininterface.cpp" line="411"/>
<source>not pass</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="399"/>
<location filename="form_maininterface.cpp" line="411"/>
<source>not support</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="399"/>
<location filename="form_maininterface.cpp" line="411"/>
<source>pass</source>
<translation></translation>
</message>
<message>
<location filename="form_maininterface.cpp" line="478"/>
<location filename="form_maininterface.cpp" line="494"/>
<source>no image</source>
<translation></translation>
</message>
@ -662,7 +682,7 @@
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="372"/>
<location filename="mainwindow.cpp" line="371"/>
<source>Account login elsewhere</source>
<translation></translation>
</message>
@ -671,94 +691,94 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="375"/>
<location filename="mainwindow.cpp" line="374"/>
<source>You have been forced offline by the administrator account</source>
<translation>线</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="378"/>
<location filename="mainwindow.cpp" line="377"/>
<source>Data base error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="321"/>
<location filename="mainwindow.cpp" line="342"/>
<location filename="mainwindow.cpp" line="358"/>
<location filename="mainwindow.cpp" line="386"/>
<location filename="mainwindow.cpp" line="403"/>
<location filename="mainwindow.cpp" line="428"/>
<location filename="mainwindow.cpp" line="432"/>
<location filename="mainwindow.cpp" line="320"/>
<location filename="mainwindow.cpp" line="341"/>
<location filename="mainwindow.cpp" line="357"/>
<location filename="mainwindow.cpp" line="385"/>
<location filename="mainwindow.cpp" line="402"/>
<location filename="mainwindow.cpp" line="427"/>
<location filename="mainwindow.cpp" line="431"/>
<source>tips</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="322"/>
<location filename="mainwindow.cpp" line="321"/>
<source>Are you sure to connect the new device</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="324"/>
<location filename="mainwindow.cpp" line="323"/>
<source>yes</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="325"/>
<location filename="mainwindow.cpp" line="324"/>
<source>no</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="342"/>
<location filename="mainwindow.cpp" line="403"/>
<location filename="mainwindow.cpp" line="341"/>
<location filename="mainwindow.cpp" line="402"/>
<source>cannot create more table</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="358"/>
<location filename="mainwindow.cpp" line="357"/>
<source>The device has disconnected</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="423"/>
<location filename="mainwindow.cpp" line="422"/>
<source>save</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="423"/>
<location filename="mainwindow.cpp" line="422"/>
<source>xls(*.xls)</source>
<translation>xls表格(*.xls)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="428"/>
<location filename="mainwindow.cpp" line="427"/>
<source>export succeed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="432"/>
<location filename="mainwindow.cpp" line="431"/>
<source>export failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="454"/>
<location filename="mainwindow.cpp" line="453"/>
<source>Illegal user</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="458"/>
<location filename="mainwindow.cpp" line="457"/>
<source>Wrong password</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="462"/>
<location filename="mainwindow.cpp" line="461"/>
<source>Database error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="466"/>
<location filename="mainwindow.cpp" line="465"/>
<source>connect error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="470"/>
<location filename="mainwindow.cpp" line="469"/>
<source>Failed</source>
<translation></translation>
</message>
@ -766,17 +786,17 @@
<context>
<name>QObject</name>
<message>
<location filename="hgscanner.cpp" line="41"/>
<location filename="hgscanner.cpp" line="42"/>
<source>success</source>
<translation></translation>
</message>
<message>
<location filename="hgscanner.cpp" line="43"/>
<location filename="hgscanner.cpp" line="44"/>
<source>failed: </source>
<translation> </translation>
</message>
<message>
<location filename="hgscanner.cpp" line="49"/>
<location filename="hgscanner.cpp" line="50"/>
<source>Not find test item</source>
<translation></translation>
</message>

View File

@ -14,6 +14,10 @@ Dialog_accountManage::Dialog_accountManage(HGPdtToolDbUserMgr pdtToolDbuserMgr,
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
HGChar* userNameList[100];
HGUInt count = 0;
HGPdtToolDb_GetUserList(pdtToolDbuserMgr, userNameList, 100, &count);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>425</width>
<height>209</height>
<width>485</width>
<height>264</height>
</rect>
</property>
<property name="windowTitle">

View File

@ -12,6 +12,10 @@ Dialog_changePwd::Dialog_changePwd(HGPdtToolDbUserMgr pdtToolDbuserMgr, QWidget
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
ui->lineEdit_oldPwd->setEchoMode(QLineEdit::EchoMode::Password);
ui->lineEdit_newPwd->setEchoMode(QLineEdit::EchoMode::Password);
ui->lineEdit_confirmNewPwd->setEchoMode(QLineEdit::EchoMode::Password);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>213</height>
<width>454</width>
<height>243</height>
</rect>
</property>
<property name="windowTitle">
@ -19,7 +19,7 @@
<x>310</x>
<y>160</y>
<width>75</width>
<height>23</height>
<height>31</height>
</rect>
</property>
<property name="text">
@ -32,126 +32,126 @@
<x>200</x>
<y>160</y>
<width>75</width>
<height>23</height>
<height>31</height>
</rect>
</property>
<property name="text">
<string>OK</string>
</property>
</widget>
<widget class="QWidget" name="">
<widget class="QLineEdit" name="lineEdit_confirmNewPwd">
<property name="geometry">
<rect>
<x>110</x>
<y>20</y>
<width>219</width>
<height>22</height>
<x>195</x>
<y>101</y>
<width>150</width>
<height>20</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>old password:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_oldPwd">
<property name="minimumSize">
<size>
<width>133</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>133</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>133</width>
<height>16777215</height>
</size>
</property>
</widget>
<widget class="QWidget" name="">
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>70</x>
<y>100</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>cfm password:</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>111</x>
<y>21</y>
<width>78</width>
<height>21</height>
</rect>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>old password:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_oldPwd">
<property name="geometry">
<rect>
<x>195</x>
<y>21</y>
<width>150</width>
<height>20</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>133</width>
<height>16777215</height>
</size>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>110</x>
<y>60</y>
<width>219</width>
<height>22</height>
<width>78</width>
<height>21</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>new password:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_newPwd">
<property name="minimumSize">
<size>
<width>133</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>133</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>new password:</string>
</property>
</widget>
<widget class="QWidget" name="">
<widget class="QLineEdit" name="lineEdit_newPwd">
<property name="geometry">
<rect>
<x>110</x>
<y>100</y>
<width>219</width>
<height>22</height>
<x>195</x>
<y>61</y>
<width>150</width>
<height>20</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_3">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>cfm password:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_confirmNewPwd">
<property name="minimumSize">
<size>
<width>133</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>133</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>133</width>
<height>16777215</height>
</size>
</property>
</widget>
</widget>
<resources/>

View File

@ -6,6 +6,11 @@ Dialog_ExcepDesc::Dialog_ExcepDesc(QWidget *parent) :
ui(new Ui::Dialog_ExcepDesc)
{
ui->setupUi(this);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
ui->label->setText(tr("input excep desc: "));
}

View File

@ -13,6 +13,10 @@ Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, const QS
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
ui->lineEdit_sn->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9]+$")));
ui->lineEdit_sn->setText(m_serialNum);
if (m_devType.isEmpty() || m_serialNum.isEmpty())

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>474</width>
<width>511</width>
<height>206</height>
</rect>
</property>
@ -19,7 +19,7 @@
<x>210</x>
<y>150</y>
<width>75</width>
<height>23</height>
<height>31</height>
</rect>
</property>
<property name="text">
@ -32,7 +32,7 @@
<x>330</x>
<y>150</y>
<width>75</width>
<height>23</height>
<height>31</height>
</rect>
</property>
<property name="text">
@ -44,7 +44,7 @@
<rect>
<x>190</x>
<y>80</y>
<width>150</width>
<width>191</width>
<height>20</height>
</rect>
</property>
@ -78,10 +78,10 @@
<widget class="QLabel" name="label_type">
<property name="geometry">
<rect>
<x>120</x>
<x>80</x>
<y>80</y>
<width>61</width>
<height>16</height>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="text">
@ -91,10 +91,10 @@
<widget class="QLabel" name="label_sn">
<property name="geometry">
<rect>
<x>123</x>
<x>100</x>
<y>30</y>
<width>61</width>
<height>20</height>
<width>71</width>
<height>21</height>
</rect>
</property>
<property name="text">
@ -106,7 +106,7 @@
<rect>
<x>190</x>
<y>30</y>
<width>150</width>
<width>191</width>
<height>20</height>
</rect>
</property>

View File

@ -16,6 +16,10 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
setWindowFlags(Qt::FramelessWindowHint);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
ui->pbtn_setting->setToolTip(tr("Set host and port"));
ui->pbtn_minum->setToolTip(tr("Minimize"));
ui->pbtn_close->setToolTip(tr("Close"));

View File

@ -11,6 +11,10 @@ Dialog_rootFuntion::Dialog_rootFuntion(bool resetPassword, QWidget *parent) :
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
setWindowTitle(tr("Create account"));
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
ui->lineEdit_password->setEchoMode(QLineEdit::EchoMode::Password);
if (m_resetPassword)

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>425</width>
<height>117</height>
<width>427</width>
<height>137</height>
</rect>
</property>
<property name="windowTitle">

View File

@ -13,6 +13,10 @@ Dialog_uploadCfgFile::Dialog_uploadCfgFile(HGPdtToolDbUserMgr pdtToolDbuserMgr,
{
ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
}
Dialog_uploadCfgFile::~Dialog_uploadCfgFile()

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>371</width>
<height>133</height>
<width>479</width>
<height>181</height>
</rect>
</property>
<property name="windowTitle">

View File

@ -1,5 +1,6 @@
#include "dialog_userinput.h"
#include "ui_dialog_userinput.h"
#include <QRegExpValidator>
Dialog_UserInput::Dialog_UserInput(ui_helper::value_type type, const QString &title, const QString &desc, QWidget *parent) :
QDialog(parent),
@ -24,7 +25,13 @@ Dialog_UserInput::Dialog_UserInput(ui_helper::value_type type, const QString &ti
}
setWindowTitle(m_title);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
ui->label->setText(m_desc);
ui->lineEdit->setValidator(new QRegExpValidator(QRegExp("[0-9]+$")));
}
Dialog_UserInput::~Dialog_UserInput()

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>408</width>
<height>164</height>
<width>426</width>
<height>147</height>
</rect>
</property>
<property name="windowTitle">
@ -39,25 +39,78 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QRadioButton" name="radioButton_yes">
<property name="text">
<string>YES</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="radioButton_yes">
<property name="minimumSize">
<size>
<width>87</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>YES</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_no">
<property name="minimumSize">
<size>
<width>86</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>NO</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QRadioButton" name="radioButton_no">
<property name="text">
<string>NO</string>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="minimumSize">
<size>
<width>171</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">

View File

@ -73,6 +73,10 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, SANE_Handle ha
{
ui->setupUi(this);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
connect(this, SIGNAL(testResult(QString)), this, SLOT(on_testResult(QString)), Qt::QueuedConnection);
connect(this, SIGNAL(testResultImg(void*)), this, SLOT(on_testResultImg(void*)), Qt::QueuedConnection);
@ -84,8 +88,8 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, SANE_Handle ha
ui->label_sn->setText(tr("Device type:") + m_devType + tr(" SerialNum:") + m_serialNum + tr(" connect status:") + str);
setMinimumWidth(500);
ui->tableWidget->setMinimumWidth(300);
ui->tableWidget->setMaximumWidth(300);
ui->tableWidget->setMinimumWidth(400);
ui->tableWidget->setMaximumWidth(400);
m_textTips = new Form_textTips();
m_view = new HGImgView();
ui->stackedWidget->addWidget(m_textTips);
@ -155,6 +159,8 @@ void Form_mainInterface::on_testResultImg(void *img)
HGImage image = (HGImage)img;
ui->stackedWidget->setCurrentWidget(m_view);
m_view->addImage(image);
ui->pbtn_leftRotate->setVisible(true);
ui->pbtn_rightRotate->setVisible(true);
QString fileName = getCacheFileName();
HGResult ret = HGImgFmt_SaveImage(image, 0, 0, getStdString(fileName).c_str());
@ -174,6 +180,19 @@ void Form_mainInterface::on_testResultImg(void *img)
HGBase_DestroyImage(image);
}
void Form_mainInterface::on_testDistortion(QString name, void *data)
{
QString info = QString::fromStdWString((const wchar_t*)data);
QMessageBox msg(QMessageBox::Question, name, info, QMessageBox::Yes | QMessageBox::No, this);
msg.setButtonText(QMessageBox::Yes, tr("yes"));
msg.setButtonText(QMessageBox::No, tr("no"));
msg.exec();
if (msg.clickedButton() == msg.button(QMessageBox::Yes))
{
func_test_go(HGPDTTOOLDB_NAME_SINGLE_PAGE_TEST_1, L"null", m_hg);
}
}
void Form_mainInterface::on_pbtn_preStep_clicked()
{
int row = ui->tableWidget->currentRow();
@ -424,6 +443,8 @@ void Form_mainInterface::on_tableWidget_currentItemChanged(QTableWidgetItem *cur
{
(void)previous;
ui->pbtn_showImg->setVisible(false);
ui->pbtn_leftRotate->setVisible(false);
ui->pbtn_rightRotate->setVisible(false);
int row = current->row();
int count = ui->tableWidget->rowCount();
ui->pbtn_preStep->setEnabled(row != 0);
@ -465,6 +486,8 @@ void Form_mainInterface::on_pbtn_showImg_clicked()
m_mainwnd->m_ftpPort, fileName.toStdString().c_str());
if(ret == HGBASE_ERR_OK)
{
ui->pbtn_leftRotate->setVisible(true);
ui->pbtn_rightRotate->setVisible(true);
ui->stackedWidget->setCurrentWidget(m_view);
HGImage img;
HGImgFmt_LoadImage(fileName.toStdString().c_str(), 0, 0, 0, 0, &img);
@ -477,3 +500,13 @@ void Form_mainInterface::on_pbtn_showImg_clicked()
QMessageBox::information(this, tr("tips"), tr("no image"));
}
}
void Form_mainInterface::on_pbtn_leftRotate_clicked()
{
m_view->rotateLeft();
}
void Form_mainInterface::on_pbtn_rightRotate_clicked()
{
m_view->rotateRight();
}

View File

@ -35,10 +35,12 @@ protected:
signals:
void testResult(QString text);
void testResultImg(void* img);
void testDistortion(QString title, void *data);
private slots:
void on_testResult(QString text);
void on_testResultImg(void* img);
void on_testDistortion(QString title, void *data);
private slots:
void on_pbtn_preStep_clicked();
@ -57,6 +59,10 @@ private slots:
void on_pbtn_showImg_clicked();
void on_pbtn_leftRotate_clicked();
void on_pbtn_rightRotate_clicked();
private:
void initTableWidgetUi();
HGUInt getTestItem(const QString &title);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>691</width>
<height>401</height>
<width>716</width>
<height>407</height>
</rect>
</property>
<property name="windowTitle">
@ -36,6 +36,13 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pbtn_stop">
<property name="text">
<string>STOP</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -103,16 +110,23 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="pbtn_stop">
<widget class="QPushButton" name="pbtn_showImg">
<property name="text">
<string>STOP</string>
<string>SHOWIMG</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbtn_showImg">
<widget class="QPushButton" name="pbtn_leftRotate">
<property name="text">
<string>SHOWIMG</string>
<string>LeftRotate</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbtn_rightRotate">
<property name="text">
<string>RightRotate</string>
</property>
</widget>
</item>

View File

@ -7,7 +7,7 @@ Form_textTips::Form_textTips(QWidget *parent)
{
ui->setupUi(this);
QFont ft;
ft.setPointSize(35);
ft.setPointSize(20);
ui->textBrowser->setFont(ft);
}

View File

@ -50,6 +50,11 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
QString info = QObject::tr("Not find test item");
emit m_interface->testResult(info);
}
else if (ev == TEST_EVENT_DISTORTION)
{
QString title = QString::fromStdWString(name);
emit m_interface->testDistortion(title, data);
}
else if (ev == TEST_EVENT_HAVE_IMAGE)
{
SANE_Image *sane_img = (SANE_Image *)data;

View File

@ -22,6 +22,11 @@ MainWindow::MainWindow(HGPdtToolDbUserMgr pdtToolDbuserMgr, const QString &ftpHo
, m_isLogOut(false)
{
ui->setupUi(this);
QFont ft;
ft.setPointSize(15);
this->setFont(ft);
setWindowIcon(QIcon(":image/image_rsc/logo/logo.ico"));
HGBase_CreateLock(&m_lock);
@ -242,7 +247,7 @@ int MainWindow::sane_ex_callback(SANE_Handle hdev, int code, void *data, unsigne
emit p->sane_dev_remove(sane_dev->name);
}
if (code == SANE_EVENT_IMAGE_OK || code == SANE_EVENT_SCAN_FINISHED)
if (code == SANE_EVENT_IMAGE_OK || code == SANE_EVENT_SCAN_FINISHED || code == SANE_EVENT_ERROR)
{
HGBase_EnterLock(p->m_lock);
Form_mainInterface* interface = p->FindInterface(hdev);