diff --git a/app/HGPdtJsonTool/HGPdtJsonTool.pro b/app/HGPdtJsonTool/HGPdtJsonTool.pro index b91bb93..3bb1389 100644 --- a/app/HGPdtJsonTool/HGPdtJsonTool.pro +++ b/app/HGPdtJsonTool/HGPdtJsonTool.pro @@ -19,6 +19,47 @@ TARGET = HGPdtJsonTool RC_ICONS = image_rsc/logo/logo.ico +CONFIG(debug, debug|release) { + MY_CONFIGURE = Debug +} +CONFIG(release, debug|release) { + MY_CONFIGURE = Release +} + +MY_OS = windows +OEM_NAME = huagao +OEM_PREFIX = HG + +win32 { + + contains(QT_ARCH, i386) { + MY_ARCH = x86 + } + contains(QT_ARCH, x86_64) { + MY_ARCH = x64 + } +} + +DESTDIR = $$PWD/../../../code_app/build2/build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} + +win32 { + + CONFIG(release, debug|release) { + DESTEXE_PATH = $${PWD}/../../../release/win/$${MY_ARCH}/$${MY_CONFIGURE}/ + DESTEXE_PATH = $$replace(DESTEXE_PATH, /, \\) + message(DESTEXE_PATH: $$DESTEXE_PATH) + + SRCEXE_FILE = $${DESTDIR}/$${TARGET}.exe + SRCEXE_FILE = $$replace(SRCEXE_FILE, /, \\) + message(SRCEXE_FILE: $$SRCEXE_FILE) + SRCPDB_FILE = $${DESTDIR}/$${TARGET}.pdb + SRCPDB_FILE = $$replace(SRCPDB_FILE, /, \\) + message(SRCPDB_FILE: $$SRCPDB_FILE) + + QMAKE_POST_LINK += xcopy /y $$SRCEXE_FILE $$DESTEXE_PATH && xcopy /y $$SRCPDB_FILE $$DESTEXE_PATH + } +} + SOURCES += \ main.cpp \ mainwindow.cpp \ @@ -39,8 +80,3 @@ TRANSLATIONS += \ DISTFILES += \ HGPdtJsonTool_zh_CN.qm - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target diff --git a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm index bd8cb96..7f49c0f 100644 Binary files a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm and b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm differ diff --git a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts index 8a266de..52c7510 100644 --- a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts +++ b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts @@ -101,7 +101,7 @@ Delete - 删除选中项 + 删除勾选项 @@ -229,7 +229,7 @@ Fill in hexadecimal format, such as '0xFFFF' - 16进制格式填写,如“0xFFFF” + 例如:0xFFFF diff --git a/app/HGPdtJsonTool/mainwindow.cpp b/app/HGPdtJsonTool/mainwindow.cpp index 30885ee..b78ee5c 100644 --- a/app/HGPdtJsonTool/mainwindow.cpp +++ b/app/HGPdtJsonTool/mainwindow.cpp @@ -52,6 +52,8 @@ void MainWindow::initDeviceInfo() QString prompt(tr("Fill in hexadecimal format, such as '0xFFFF'")); ui->lineEdit_vid->setToolTip(prompt); ui->lineEdit_pid->setToolTip(prompt); + ui->lineEdit_vid->setPlaceholderText(prompt); + ui->lineEdit_pid->setPlaceholderText(prompt); } void MainWindow::initTableWidgetUi() @@ -108,11 +110,13 @@ void MainWindow::on_pushButton_generate_clicked() globalObject.insert("pid-to", ui->lineEdit_pid->text().toInt(&ok, 16)); globalObject.insert("sleep-time", sleepTime[ui->comboBox_sleepTime->currentIndex()]); globalObject.insert("speed-mode", ui->comboBox_speedMode->currentText().toInt()); - globalObject.insert("device-model", ui->lineEdit_deviceModle->text()); globalObject.insert("cpu-size", ui->lineEdit_cpuSize->text().toInt()); globalObject.insert("disk-size", ui->lineEdit_diskSize->text().toInt()); - globalObject.insert("firmware-version", ui->lineEdit_fwVersion->text()); globalObject.insert("lock-device", ui->comboBox_lockDevice->currentIndex() == 0 ? false : true); + if (!ui->lineEdit_deviceModle->text().isEmpty()) + globalObject.insert("device-model", ui->lineEdit_deviceModle->text()); + if (!ui->lineEdit_fwVersion->text().isEmpty()) + globalObject.insert("firmware-version", ui->lineEdit_fwVersion->text()); QJsonObject json; json.insert("global", QJsonValue(globalObject)); @@ -133,6 +137,9 @@ void MainWindow::on_pushButton_generate_clicked() doc.setObject(json); QString fileName = QFileDialog::getSaveFileName(this, tr("Select profile path"), "", tr("Json(*.json)")); + if (fileName.isEmpty()) + return; + if (!fileName.endsWith(".json")) fileName.append(".json"); @@ -264,7 +271,7 @@ void MainWindow::on_pushButton_import_clicked() ui->tableWidget->setItem(i, 4, new QTableWidgetItem(node.station)); ui->tableWidget->item(i, 4)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter); - ui->tableWidget->setItem(i, 5, new QTableWidgetItem(node.is_man ? tr("automatic testing") : tr("Manual testing"))); + ui->tableWidget->setItem(i, 5, new QTableWidgetItem(node.is_man ? tr("Manual testing") : tr("automatic testing"))); ui->tableWidget->item(i, 5)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter); ui->tableWidget->setItem(i, 6, new QTableWidgetItem(node.desc)); @@ -284,7 +291,10 @@ void MainWindow::on_pushButton_delete_clicked() if (item != nullptr) { if (item->checkState() == Qt::Checked) - ui->tableWidget->removeRow(i); + { + ui->tableWidget->removeRow(item->row()); + i = 0; + } } } updateTableWidget(); diff --git a/app/HGPdtJsonTool/mainwindow.ui b/app/HGPdtJsonTool/mainwindow.ui index 26c4287..bc81dc1 100644 --- a/app/HGPdtJsonTool/mainwindow.ui +++ b/app/HGPdtJsonTool/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 965 - 752 + 988 + 758 @@ -17,7 +17,7 @@ - 720 + 740 30 161 20 @@ -37,9 +37,9 @@ - 680 + 690 30 - 51 + 41 21 @@ -83,7 +83,7 @@ - 20 + 50 140 101 21 @@ -96,9 +96,9 @@ - 360 + 400 30 - 54 + 41 21 @@ -122,7 +122,7 @@ - 720 + 740 90 161 20 @@ -132,9 +132,9 @@ - 630 + 660 90 - 91 + 81 16 @@ -145,10 +145,10 @@ - 350 + 340 140 - 81 - 16 + 91 + 20 @@ -158,7 +158,7 @@ - 720 + 740 140 161 20 @@ -168,7 +168,7 @@ - 30 + 20 90 101 21 @@ -191,10 +191,10 @@ - 350 + 370 90 - 81 - 16 + 71 + 21 @@ -216,8 +216,8 @@ 640 140 - 71 - 16 + 91 + 20 @@ -247,10 +247,10 @@ - 50 + 60 190 71 - 16 + 21 @@ -260,10 +260,10 @@ - 350 + 360 190 71 - 16 + 21 @@ -283,7 +283,7 @@ - 640 + 660 190 71 16 @@ -296,7 +296,7 @@ - 720 + 740 190 161 20 @@ -329,10 +329,10 @@ - 350 + 360 250 71 - 16 + 21 @@ -365,7 +365,7 @@ - 630 + 660 250 81 21 @@ -378,9 +378,9 @@ - 720 + 740 230 - 231 + 221 71 @@ -408,31 +408,44 @@ Import - + - 150 + 20 670 - 141 - 31 + 531 + 41 - - Delete - - - - - - 40 - 680 - 91 - 16 - - - - SelectAll - + + + + + SelectAll + + + + + + + Delete + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + @@ -440,7 +453,7 @@ 0 0 - 965 + 988 22 diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp index 4c15704..e8524f3 100644 --- a/app/HGProductionTool/form_maininterface.cpp +++ b/app/HGProductionTool/form_maininterface.cpp @@ -833,8 +833,19 @@ void Form_mainInterface::on_pbtn_start_clicked() { QString title = item->text(); QString name = m_map_title_name.value(title).name; - int correct_value = m_map_title_name.value(title).correct_value; - int dpi = m_map_title_name.value(title).resolution; + + int dpi = 0; + if (title == "扫描图像彩色质量确认_200dpi" || title == "扫描图像灰度质量确认_200dpi" || title == "计算畸变修正值_200dpi" || title == "设置畸变修正值_200dpi") + dpi = 200; + else if (title == "扫描图像彩色质量确认_300dpi" || title == "扫描图像灰度质量确认_300dpi" || title == "计算畸变修正值_300dpi" || title == "设置畸变修正值_300dpi") + dpi = 300; + else if (title == "扫描图像彩色质量确认_600dpi" || title == "扫描图像灰度质量确认_600dpi" || title == "计算畸变修正值_600dpi" || title == "设置畸变修正值_600dpi") + dpi = 600; + + int correct_value = -1; + if (name == "AUTO_FLAT_FIELD") + correct_value = 0; + wchar_t buf[5] = {0}; if (dpi > 0) {