diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm index 1526d69..bc30cf2 100644 Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts index 034d9ca..d58c558 100644 --- a/app/HGProductionTool/ProductionTool_zh_CN.ts +++ b/app/HGProductionTool/ProductionTool_zh_CN.ts @@ -130,35 +130,35 @@ 取消 - - - - + + + + tips 提示 - + Speed mode 速度模式 - + Failed! 失败! - + Succeed! 成功! - + Sleep time 休眠时间 - + Vid and Pid Vid和Pid @@ -171,32 +171,32 @@ 检测到配置%1不一致,已重新配置,请再次检查 - + Consistent configuration 配置一致! - + device is lost 设备已丢失 - + Serial num is empty 序列号为空 - + sn is illegal 序列号不合法 - + The device is testing 该设备正在进行测试 - + set sn failed 设置序列号失败 @@ -206,80 +206,80 @@ 设备名: %1 - + Target Configration: Target Configration: 目标配置: - - - - + + + + Speep mode: %1PPM Speep mode: %1PPM 速度模式: %1PPM - + Pass Pass - - - + + + Set 设置 - - - - + + + + Sleep time: %1minute Sleep time: %1minute 休眠时间: %1分钟 - - - - + + + + Vid: %1 Pid: %2 Vid: %1 Pid: %2 Vid: %1 Pid: %2 - + Current Configration of device: 当前设备配置: - + Fail Fail - - - + + + Set serial number: %1 设置序列号: %1 - - + + Detected that the current device's vid-pid and device object are not consistent. 检测到当前设备的vid-pid和设备对象不一致. - - + + Please reboot device to update. 请重启设备刷新. @@ -300,23 +300,23 @@ 测试结果:成功! - - + + Inconsistent configuration %1detected, please reconfigure, and check again 检测到配置 %1不一致,请重新配置后再次检查 - + Inconsistent configuration %1detected, please reboot and reconfigure, and check again 检测到配置 %1不一致,请重启后再次检查 - + Set configuration to device 将目标配置设置到设备 - + Test content: 测试内容: @@ -325,21 +325,21 @@ 成功,请检查配置 - - - - + + + + Sleep time: Not sleeping 休眠时间: 不休眠 - - + + Tester: %1, Test item: %2 测试员: %1, 测试项: %2 - + set sn succeed 设置序列号成功 @@ -1371,7 +1371,7 @@ - + Not sleeping 不休眠 @@ -1398,65 +1398,63 @@ 设备序列号: %1, 测试项: %2, 测试结果: 通过! - - + + device history scan count: 设备历史扫描张数: - - + + Prompt 提示 - + please verify the size of the device's cpu and disk: 请验证设备内存和硬盘容量大小: - Cpu size:%1 - 内存大小:%1 + 内存大小:%1 - Disk size:%1 - 硬盘总容量大小:%1 + 硬盘总容量大小:%1 - + Tester: %1, Test item: %2, Test result: Failed! Reason: %3 测试员: %1, 测试项: %2, 测试结果: 不通过! 原因: %3 - + Tester: %1, Test item: %2, Test result: Pass! 测试员: %1, 测试项: %2, 测试结果: 通过! - + No paper 无纸 - + Device is sleeping 设备处于休眠模式 - + Counting mode 设备处于计数模式 - + Other error 其他错误 @@ -1465,39 +1463,39 @@ 设备序列号:%1 - + ID 序号 - + Test items 测试项 - + status 测试状态 - + not test 未测试 - - + + not pass 不通过 - + not support 不支持 - - + + pass 通过 @@ -1523,14 +1521,14 @@ Pid: - - + + device roller count: 设备滚轴张数: - + image pixel: 标准圆:宽 * 高: @@ -1555,7 +1553,27 @@ - + + Target cpu size:%1 + 目标内存大小:%1 + + + + Target disk size:%1 + 目标硬盘容量:%1 + + + + Actual pu size:%1 + 实际内存大小:%1 + + + + Actual disk size:%1 + 实际硬盘容量:%1 + + + minute 分钟 diff --git a/app/HGProductionTool/analysisjson.cpp b/app/HGProductionTool/analysisjson.cpp index 3af8bb7..a4b5e39 100644 --- a/app/HGProductionTool/analysisjson.cpp +++ b/app/HGProductionTool/analysisjson.cpp @@ -56,7 +56,9 @@ AnalysisJson::json_global AnalysisJson::GetGlobal() obj["pid-to"].toInt(), obj["speed-mode"].toInt(), obj["sleep-time"].toInt(), - obj["device-model"].toString()}; + obj["device-model"].toString(), + obj["cpu-size"].toString(), + obj["disk-size"].toString()}; } diff --git a/app/HGProductionTool/analysisjson.h b/app/HGProductionTool/analysisjson.h index 3ea46b1..ac0abe9 100644 --- a/app/HGProductionTool/analysisjson.h +++ b/app/HGProductionTool/analysisjson.h @@ -26,6 +26,8 @@ public: std::int32_t speed_mode; std::int32_t sleep_time; QString device_model; + QString cpu_size; + QString disk_size; }; AnalysisJson() = delete ; diff --git a/app/HGProductionTool/dialog_inputserialnum.cpp b/app/HGProductionTool/dialog_inputserialnum.cpp index fb5819b..c0d4a97 100644 --- a/app/HGProductionTool/dialog_inputserialnum.cpp +++ b/app/HGProductionTool/dialog_inputserialnum.cpp @@ -302,7 +302,7 @@ QString Dialog_InputSerialNum::getLogPath() strcat(logPath, m_devType.toStdString().c_str()); strcat(logPath, "/"); - return getCfgValue("save", "logPath", getStdFileName(StdStringToUtf8(logPath).c_str())); + return getCfgValue(m_devType.toStdString().c_str(), "logPath", getStdFileName(StdStringToUtf8(logPath).c_str())); } void Dialog_InputSerialNum::writeTestLog(QString logContent) diff --git a/app/HGProductionTool/dialog_setlogpath.cpp b/app/HGProductionTool/dialog_setlogpath.cpp index 77b7cf1..90b0025 100644 --- a/app/HGProductionTool/dialog_setlogpath.cpp +++ b/app/HGProductionTool/dialog_setlogpath.cpp @@ -18,6 +18,9 @@ Dialog_SetLogPath::Dialog_SetLogPath(const QString &devType, QWidget *parent) : QFont ft; ft.setPointSize(15); this->setFont(ft); + + ui->lineEdit->setReadOnly(true); + ui->lineEdit->setText(getCfgValue(m_devType.toStdString().c_str(), "logPath", QString(""))); } Dialog_SetLogPath::~Dialog_SetLogPath() @@ -40,7 +43,7 @@ void Dialog_SetLogPath::on_pushButton_ok_clicked() return; } - saveCfgValue("save", "logPath", getStdFileName(filePath)); + saveCfgValue(m_devType.toStdString().c_str(), "logPath", getStdFileName(filePath)); close(); } diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp index a7894ce..57ef998 100644 --- a/app/HGProductionTool/form_maininterface.cpp +++ b/app/HGProductionTool/form_maininterface.cpp @@ -279,9 +279,17 @@ void Form_mainInterface::on_testGetDevCfgInfo(int vid, int pid, int sleepTime, i void Form_mainInterface::on_testGetDevCpuDisk(QString cpu, QString disk) { - QString str = (tr("please verify the size of the device's cpu and disk:") + "\n\t"); - str.append(tr("Cpu size:%1\n\t").arg(cpu)); - str.append(tr("Disk size:%1\n\t").arg(disk)); + AnalysisJson analysisJson(m_profileName); + AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal(); + QString cpu_size = jsonGlobal.cpu_size; + QString disk_size = jsonGlobal.disk_size; + + QString str = (tr("please verify the size of the device's cpu and disk:") + "\n\n\t"); + str.append(tr("Target cpu size:%1").arg(cpu_size) + "\n\t"); + str.append(tr("Target disk size:%1").arg(disk_size) + "\n\n\t"); + + str.append(tr("Actual pu size:%1").arg(cpu) + "\n\t"); + str.append(tr("Actual disk size:%1").arg(disk) + "\n\t"); m_textTips->setViewContent(str); } @@ -691,7 +699,7 @@ QString Form_mainInterface::getLogPath() strcat(logPath, m_devType.toStdString().c_str()); strcat(logPath, "/"); - return getCfgValue("save", "logPath", getStdFileName(StdStringToUtf8(logPath).c_str())); + return getCfgValue(m_devType.toStdString().c_str(), "logPath", getStdFileName(StdStringToUtf8(logPath).c_str())); } void Form_mainInterface::writeTestLog(QString logContent) diff --git a/app/HGProductionTool/mainwindow.cpp b/app/HGProductionTool/mainwindow.cpp index 33654ff..700c67c 100644 --- a/app/HGProductionTool/mainwindow.cpp +++ b/app/HGProductionTool/mainwindow.cpp @@ -27,6 +27,7 @@ MainWindow::MainWindow(Dialog_logIn::LogInType loginType, const QString &profile , m_bot_splitter(nullptr) , m_isLogOut(false) , m_inputSnDlg(nullptr) + , m_tmpDevType("") { ui->setupUi(this); @@ -679,6 +680,7 @@ void MainWindow::on_act_refreshDevice_triggered() QMessageBox::information(this, tr("tips"), tr("cannot create more table")); delete mainInterface; } + m_tmpDevType = getDevType(devHandle); } else { @@ -702,7 +704,7 @@ void MainWindow::on_act_openLog_triggered() QString defaultFileName = logPath + m_accountName + ".log"; - QString fileName = getCfgValue("save", "logPath", defaultFileName); + QString fileName = getCfgValue(m_tmpDevType.toStdString().c_str(), "logPath", defaultFileName); QFileInfo fileInfo(getStdFileName(fileName)); auto pathDir = fileInfo.path(); QString strFilePath = "file:///" + pathDir; diff --git a/app/HGProductionTool/mainwindow.h b/app/HGProductionTool/mainwindow.h index e0b02d3..9fc0294 100644 --- a/app/HGProductionTool/mainwindow.h +++ b/app/HGProductionTool/mainwindow.h @@ -95,5 +95,6 @@ private: public: QString m_ftpHost; unsigned short m_ftpPort; + QString m_tmpDevType; }; #endif // MAINWINDOW_H