Merge branch 'master' of http://192.168.100.140:8099/sane/code_production
This commit is contained in:
commit
f3d137d9e7
|
@ -50,7 +50,9 @@ AnalysisJson::json_global AnalysisJson::GetGlobal()
|
|||
return json_global{obj["vid-org"].toInt(),
|
||||
obj["pid-org"].toInt(),
|
||||
obj["vid-to"].toInt(),
|
||||
obj["pid-to"].toInt()};
|
||||
obj["pid-to"].toInt(),
|
||||
obj["speed-mode"].toInt(),
|
||||
obj["sleep-time"].toInt()};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ public:
|
|||
std::int32_t pid_org;
|
||||
std::int32_t vid_to;
|
||||
std::int32_t pid_to;
|
||||
std::int32_t speed_mode;
|
||||
std::int32_t sleep_time;
|
||||
};
|
||||
|
||||
AnalysisJson() = delete ;
|
||||
|
|
|
@ -39,15 +39,7 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
|
|||
ui->lineEdit_ftpHost->setText(getCfgValue("login", "ftpHost", ftpHost));
|
||||
ui->lineEdit_ftpPort->setText(getCfgValue("login", "ftpPort", ftpPort));
|
||||
|
||||
ui->label_dbHost->setVisible(false);
|
||||
ui->label_dbPort->setVisible(false);
|
||||
ui->lineEdit_dbHost->setVisible(false);
|
||||
ui->lineEdit_dbPort->setVisible(false);
|
||||
|
||||
ui->label_ftpHost->setVisible(false);
|
||||
ui->label_ftpPort->setVisible(false);
|
||||
ui->lineEdit_ftpHost->setVisible(false);
|
||||
ui->lineEdit_ftpPort->setVisible(false);
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
Dialog_logIn::~Dialog_logIn()
|
||||
|
@ -133,20 +125,14 @@ void Dialog_logIn::on_pushButton_exit_clicked()
|
|||
|
||||
void Dialog_logIn::on_pbtn_setting_clicked(bool checked)
|
||||
{
|
||||
ui->label_user->setVisible(!checked);
|
||||
ui->label_password->setVisible(!checked);
|
||||
ui->lineEdit_account->setVisible(!checked);
|
||||
ui->lineEdit_password->setVisible(!checked);
|
||||
|
||||
ui->label_dbHost->setVisible(checked);
|
||||
ui->label_dbPort->setVisible(checked);
|
||||
ui->lineEdit_dbHost->setVisible(checked);
|
||||
ui->lineEdit_dbPort->setVisible(checked);
|
||||
|
||||
ui->label_ftpHost->setVisible(checked);
|
||||
ui->label_ftpPort->setVisible(checked);
|
||||
ui->lineEdit_ftpHost->setVisible(checked);
|
||||
ui->lineEdit_ftpPort->setVisible(checked);
|
||||
if (checked)
|
||||
{
|
||||
ui->stackedWidget->setCurrentIndex(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog_logIn::on_pbtn_minum_clicked()
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>389</width>
|
||||
<height>268</height>
|
||||
<width>455</width>
|
||||
<height>278</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -18,7 +18,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>391</width>
|
||||
<width>451</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -141,318 +141,192 @@ QPushButton#pbtn_close::hover
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>230</y>
|
||||
<width>250</width>
|
||||
<height>25</height>
|
||||
<x>40</x>
|
||||
<y>40</y>
|
||||
<width>381</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_login">
|
||||
<property name="text">
|
||||
<string>LOG IN</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_exit">
|
||||
<property name="text">
|
||||
<string>EXIT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<widget class="QLabel" name="label_user">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>30</y>
|
||||
<width>48</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>account:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_account">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>30</y>
|
||||
<width>151</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>90</y>
|
||||
<width>54</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>90</y>
|
||||
<width>151</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<widget class="QLabel" name="label_dbHost">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>dbHost:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_dbHost">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>20</y>
|
||||
<width>151</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_dbPort">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>dbPort:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_dbPort">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>50</y>
|
||||
<width>151</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_ftpHost">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>80</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ftpHost:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_ftpHost">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>80</y>
|
||||
<width>151</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_ftpPort">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>110</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ftpPort:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_ftpPort">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>110</y>
|
||||
<width>151</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<widget class="QPushButton" name="pushButton_exit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>50</y>
|
||||
<width>289</width>
|
||||
<height>164</height>
|
||||
<x>260</x>
|
||||
<y>210</y>
|
||||
<width>75</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0,0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetNoConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<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>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_user">
|
||||
<property name="text">
|
||||
<string>account:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_account"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_password">
|
||||
<property name="text">
|
||||
<string>password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_password"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<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_4">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_dbHost">
|
||||
<property name="text">
|
||||
<string>dbHost:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_dbHost"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<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_5">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_dbPort">
|
||||
<property name="text">
|
||||
<string>dbPort:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_dbPort"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<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_7">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_ftpHost">
|
||||
<property name="text">
|
||||
<string>ftpHost:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_ftpHost"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_13">
|
||||
<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_8">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_14">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_ftpPort">
|
||||
<property name="text">
|
||||
<string>ftpPort:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_ftpPort"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_15">
|
||||
<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>
|
||||
</layout>
|
||||
<property name="text">
|
||||
<string>EXIT</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pbtn_login">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>210</y>
|
||||
<width>75</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>LOG IN</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
|
@ -81,6 +81,7 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, SANE_Handle ha
|
|||
|
||||
connect(this, SIGNAL(testResult(QString)), this, SLOT(on_testResult(QString)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(testResultImg(void*)), this, SLOT(on_testResultImg(void*)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(testCorrectInfo(QString)), this, SLOT(on_testCorrectInfo(QString)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(testFinish()), this, SLOT(on_testFinish()), Qt::QueuedConnection);
|
||||
|
||||
QString str;
|
||||
|
@ -192,6 +193,11 @@ void Form_mainInterface::on_testFinish()
|
|||
m_isTesting = false;
|
||||
}
|
||||
|
||||
void Form_mainInterface::on_testCorrectInfo(QString info)
|
||||
{
|
||||
m_textTips->addContent(info);
|
||||
}
|
||||
|
||||
void Form_mainInterface::on_pbtn_preStep_clicked()
|
||||
{
|
||||
int row = ui->tableWidget->currentRow();
|
||||
|
@ -317,6 +323,8 @@ void Form_mainInterface::initTableWidgetUi()
|
|||
{
|
||||
AnalysisJson analysisJson(QString::fromStdString(cfgPath));
|
||||
|
||||
setGlobalCfg(analysisJson);
|
||||
|
||||
std::map<HGUInt, bool> dbEntryItems;
|
||||
for (int i = HGPDTTOOLDB_ENTRYNAME_DIAL_SWITCH; i <= HGPDTTOOLDB_ENTRYNAME_SCANNING_SENSOR; ++i)
|
||||
dbEntryItems[i] = false;
|
||||
|
@ -473,6 +481,32 @@ void Form_mainInterface::updateUiEnabled(bool enable)
|
|||
ui->pbtn_stop->setEnabled(enable);
|
||||
}
|
||||
|
||||
void Form_mainInterface::setGlobalCfg(AnalysisJson analysisJson)
|
||||
{
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
LPWRITECFG p;
|
||||
|
||||
p->cat = WRITE_CAT_VID;
|
||||
p->val = &jsonGlobal.vid_to;
|
||||
func_test_go((const wchar_t*)WRITE_CFG_NAME, (const wchar_t*)p, m_hg);
|
||||
|
||||
p->cat = WRITE_CAT_PID;
|
||||
p->val = &jsonGlobal.pid_to;
|
||||
func_test_go((const wchar_t*)WRITE_CFG_NAME, (const wchar_t*)p, m_hg);
|
||||
|
||||
p->cat = WRITE_CAT_SPEED;
|
||||
p->val = &jsonGlobal.speed_mode;
|
||||
func_test_go((const wchar_t*)WRITE_CFG_NAME, (const wchar_t*)p, m_hg);
|
||||
|
||||
p->cat = WRITE_CAT_SLEEP;
|
||||
p->val = &jsonGlobal.sleep_time;
|
||||
func_test_go((const wchar_t*)WRITE_CFG_NAME, (const wchar_t*)p, m_hg);
|
||||
|
||||
p->cat = WRITE_CAT_SERIALNUM;
|
||||
p->val = &m_serialNum;
|
||||
func_test_go((const wchar_t*)WRITE_CFG_NAME, (const wchar_t*)p, m_hg);
|
||||
}
|
||||
|
||||
void Form_mainInterface::on_tableWidget_currentItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous)
|
||||
{
|
||||
(void)previous;
|
||||
|
|
|
@ -37,6 +37,7 @@ signals:
|
|||
void testResult(QString text);
|
||||
void testResultImg(void* img);
|
||||
void testDistortion(QString title, void *data);
|
||||
void testCorrectInfo(QString info);
|
||||
void testFinish();
|
||||
|
||||
private slots:
|
||||
|
@ -44,6 +45,7 @@ private slots:
|
|||
void on_testResultImg(void* img);
|
||||
void on_testDistortion(QString title, void *data);
|
||||
void on_testFinish();
|
||||
void on_testCorrectInfo(QString info);
|
||||
|
||||
private slots:
|
||||
void on_pbtn_preStep_clicked();
|
||||
|
@ -75,6 +77,7 @@ private:
|
|||
QString getCachePath();
|
||||
QString getCacheFileName();
|
||||
void updateUiEnabled(bool enable);
|
||||
void setGlobalCfg(AnalysisJson analysisJson);
|
||||
|
||||
private:
|
||||
Ui::Form_mainInterface *ui;
|
||||
|
|
|
@ -9,6 +9,7 @@ Form_textTips::Form_textTips(QWidget *parent)
|
|||
QFont ft;
|
||||
ft.setPointSize(20);
|
||||
ui->textBrowser->setFont(ft);
|
||||
|
||||
}
|
||||
|
||||
Form_textTips::~Form_textTips()
|
||||
|
@ -21,6 +22,11 @@ void Form_textTips::setViewContent(QString content)
|
|||
ui->textBrowser->setText(content);
|
||||
}
|
||||
|
||||
void Form_textTips::addContent(QString content)
|
||||
{
|
||||
ui->textBrowser->insertPlainText(content);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ public:
|
|||
~Form_textTips();
|
||||
|
||||
void setViewContent(QString content);
|
||||
void addContent(QString content);
|
||||
|
||||
private:
|
||||
Ui::Form_textTips *ui;
|
||||
|
|
|
@ -78,7 +78,11 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
|
|||
}
|
||||
else if (ev == TEST_EVENT_FALT_INFO)
|
||||
{
|
||||
std::string str = (char *)data;
|
||||
if (data != nullptr)
|
||||
{
|
||||
QString info = QString::fromStdWString((const wchar_t*)data);
|
||||
emit m_interface->testCorrectInfo(info);
|
||||
}
|
||||
}
|
||||
else if (ev == TEST_EVENT_HAVE_IMAGE)
|
||||
{
|
||||
|
|
|
@ -224,6 +224,8 @@ BOOL CDlgMgr::OnInitDialog()
|
|||
SetDlgItemInt(IDC_EDIT_PID_SRC, 0x200);
|
||||
SetDlgItemInt(IDC_EDIT_VID_TO, 0x3072);
|
||||
SetDlgItemInt(IDC_EDIT_PID_TO, 0x0239);
|
||||
SetDlgItemInt(IDC_EDIT_SLEEP, 5);
|
||||
SetDlgItemInt(IDC_EDIT_SPEED, 60);
|
||||
|
||||
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
|
||||
}
|
||||
|
@ -427,6 +429,8 @@ std::wstring CDlgMgr::export_config(bool *ok, bool used_in_code, int code_ver)
|
|||
pid_f = vid_pid_edit_value(GetDlgItem(IDC_EDIT_PID_SRC)->m_hWnd),
|
||||
vid_t = vid_pid_edit_value(GetDlgItem(IDC_EDIT_VID_TO)->m_hWnd),
|
||||
pid_t = vid_pid_edit_value(GetDlgItem(IDC_EDIT_PID_TO)->m_hWnd),
|
||||
sleep = GetDlgItemInt(IDC_EDIT_SLEEP),
|
||||
speed = GetDlgItemInt(IDC_EDIT_SPEED),
|
||||
port = 0;
|
||||
bool report = is_checked(GetDlgItem(IDC_CHECK2));
|
||||
BYTE ip1 = 0, ip2 = 0, ip3 = 0, ip4 = 0;
|
||||
|
@ -471,6 +475,8 @@ std::wstring CDlgMgr::export_config(bool *ok, bool used_in_code, int code_ver)
|
|||
child->set_value(L"pid-org", pid_f);
|
||||
child->set_value(L"vid-to", vid_t);
|
||||
child->set_value(L"pid-to", pid_t);
|
||||
child->set_value(L"sleep-time", sleep);
|
||||
child->set_value(L"speed-mode", speed);
|
||||
if (report)
|
||||
{
|
||||
::GetDlgItemTextW(m_hWnd, IDC_EDIT_DB, text, _countof(text) - 1);
|
||||
|
@ -619,6 +625,11 @@ void CDlgMgr::reload(std::wstring& cont)
|
|||
SetDlgItemInt(IDC_EDIT_VID_TO, n);
|
||||
child->get_value(L"pid-to", n);
|
||||
SetDlgItemInt(IDC_EDIT_PID_TO, n);
|
||||
|
||||
child->get_value(L"sleep-time", n);
|
||||
SetDlgItemInt(IDC_EDIT_SLEEP, n);
|
||||
child->get_value(L"speed-mode", n);
|
||||
SetDlgItemInt(IDC_EDIT_SPEED, n);
|
||||
if (child->get_value(L"report-url", &val) && val)
|
||||
{
|
||||
size_t pos = 0;
|
||||
|
|
|
@ -33,8 +33,11 @@
|
|||
#define IDC_STATIC_VER 1017
|
||||
#define IDC_EDIT_VER 1018
|
||||
#define IDC_EDIT_NAME 1019
|
||||
#define IDC_EDIT_VID_TO2 1019
|
||||
#define IDC_EDIT_SLEEP 1019
|
||||
#define IDC_EDIT_TITLE 1020
|
||||
#define IDC_EDIT1 1020
|
||||
#define IDC_EDIT_SPEED 1020
|
||||
#define IDC_EDIT_DESC 1021
|
||||
#define ID_LIST_32771 32771
|
||||
#define ID_LIST_PASTE_CLIPBOARD 32772
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -233,6 +233,7 @@ enum write_cat
|
|||
WRITE_CAT_PID, // val = (int*)
|
||||
WRITE_CAT_SPEED, // val = (int*)
|
||||
WRITE_CAT_SLEEP, // val = (int*)
|
||||
WRITE_CAT_SERIALNUM // val = (char*)
|
||||
};
|
||||
|
||||
typedef struct _write_cfg
|
||||
|
|
Loading…
Reference in New Issue