调整华高生产配置文件生成工具

This commit is contained in:
yangjiaxuan 2024-03-06 19:03:18 +08:00
parent d7c1c84414
commit f5f7f10027
9 changed files with 797 additions and 386 deletions

View File

@ -38,8 +38,11 @@ win32 {
contains(QT_ARCH, x86_64) {
MY_ARCH = x64
}
LIBS += -L$$PWD/../../../code_app/build2/build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base
}
INCLUDEPATH += $$PWD/../../../code_app/modules
DESTDIR = $$PWD/../../../code_app/build2/build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE}
win32 {
@ -61,15 +64,18 @@ win32 {
}
SOURCES += \
dialog_mymessagebox.cpp \
main.cpp \
mainwindow.cpp \
analysisjson.cpp
HEADERS += \
dialog_mymessagebox.h \
mainwindow.h \
analysisjson.h
FORMS += \
dialog_mymessagebox.ui \
mainwindow.ui
RESOURCES += \

View File

@ -1,6 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>Dialog_myMessageBox</name>
<message>
<location filename="dialog_mymessagebox.ui" line="14"/>
<source>Dialog</source>
<translation></translation>
</message>
<message>
<location filename="dialog_mymessagebox.ui" line="38"/>
<source>Ok</source>
<translation></translation>
</message>
<message>
<location filename="dialog_mymessagebox.ui" line="45"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="11"/>
<source>Prompt</source>
<translation></translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="18"/>
<source>Please congirm device Target Configuration:</source>
<translation></translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="19"/>
<source>Manufacturer:%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="20"/>
<source>Device type:%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="23"/>
<source>Device model:%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="26"/>
<source>Firmware version:%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="28"/>
<source>VID:%1</source>
<translation>VID%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="29"/>
<source>PID:%1</source>
<translation>PID%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="31"/>
<source>Speed mode:%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="32"/>
<source>Sleep time:%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="33"/>
<source>Is it ockede:%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="34"/>
<source>Cpu size:no less than %1</source>
<translation>CPU大小%1</translation>
</message>
<message>
<location filename="dialog_mymessagebox.cpp" line="35"/>
<source>Disk size:no less than %1</source>
<translation>%1</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
@ -35,7 +118,8 @@
</message>
<message>
<location filename="mainwindow.ui" line="142"/>
<source>Device modle:</source>
<source>Device model:</source>
<oldsource>Device modle:</oldsource>
<translation></translation>
</message>
<message>
@ -65,250 +149,331 @@
</message>
<message>
<location filename="mainwindow.ui" line="270"/>
<source>Test Id:</source>
<translation>ID*</translation>
<source>Test item:</source>
<oldsource>Test Id:</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="293"/>
<source>Test item:</source>
<translation>*</translation>
</message>
<message>
<location filename="mainwindow.ui" line="316"/>
<source>Test station:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="339"/>
<location filename="mainwindow.ui" line="316"/>
<source>Test type:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="362"/>
<source>Add</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="375"/>
<source>Test content:</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="359"/>
<source>Device type:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="408"/>
<source>Import</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="421"/>
<source>Delete</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="434"/>
<location filename="mainwindow.ui" line="385"/>
<source>SelectAll</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<location filename="mainwindow.cpp" line="31"/>
<location filename="mainwindow.cpp" line="155"/>
<source>huagao</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<location filename="mainwindow.cpp" line="31"/>
<location filename="mainwindow.cpp" line="175"/>
<source>microtek</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<location filename="mainwindow.cpp" line="31"/>
<location filename="mainwindow.cpp" line="195"/>
<source>hanvon</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<location filename="mainwindow.cpp" line="31"/>
<location filename="mainwindow.cpp" line="215"/>
<source>lanxum</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<location filename="mainwindow.cpp" line="31"/>
<location filename="mainwindow.cpp" line="235"/>
<source>deli</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<location filename="mainwindow.cpp" line="31"/>
<location filename="mainwindow.cpp" line="251"/>
<source>unis</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<location filename="mainwindow.cpp" line="31"/>
<location filename="mainwindow.cpp" line="263"/>
<source>cumtenn</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="30"/>
<source>nuetral</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="34"/>
<source>G100-3399</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="34"/>
<source>G200-3399</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="34"/>
<source>G300-3288</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="34"/>
<source>G400-3399</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="44"/>
<source>Not dormant</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="44"/>
<source>5 min</source>
<translation>5</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="44"/>
<source>10 min</source>
<translation>10</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="44"/>
<source>20 min</source>
<translation>20</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="44"/>
<source>30 min</source>
<translation>30</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="44"/>
<source>1 hour</source>
<translation>1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="44"/>
<source>2 hours</source>
<translation>2</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="40"/>
<location filename="mainwindow.cpp" line="44"/>
<source>4 hours</source>
<translation>4</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="44"/>
<location filename="mainwindow.cpp" line="48"/>
<source>Lock</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="43"/>
<source>Device Target Configuration:</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Manufacturer:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<source>Device type:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<source>VID:%1</source>
<translation type="vanished">VID%1</translation>
</message>
<message>
<source>PID:%1</source>
<translation type="vanished">PID%1</translation>
</message>
<message>
<source>Device model:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<source>Firmware version:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<source>Speed mode:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<source>Sleep time:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<source>Is it ockede:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<source>Locked</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Cpu size:%1</source>
<translation type="vanished">CPU大小%1</translation>
</message>
<message>
<source>Disk size:%1</source>
<translation type="vanished">%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="47"/>
<source>Not locked</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="46"/>
<location filename="mainwindow.cpp" line="50"/>
<source>Burn</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="46"/>
<location filename="mainwindow.cpp" line="50"/>
<source>Initial inspection</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="46"/>
<location filename="mainwindow.cpp" line="50"/>
<source>Image inspection</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="49"/>
<location filename="mainwindow.cpp" line="127"/>
<location filename="mainwindow.cpp" line="267"/>
<location filename="mainwindow.cpp" line="53"/>
<location filename="mainwindow.cpp" line="134"/>
<location filename="mainwindow.cpp" line="357"/>
<source>automatic testing</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="49"/>
<location filename="mainwindow.cpp" line="267"/>
<location filename="mainwindow.cpp" line="53"/>
<location filename="mainwindow.cpp" line="134"/>
<source>Manual testing</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="52"/>
<source>Fill in hexadecimal format, such as &apos;0xFFFF&apos;</source>
<translation>0xFFFF</translation>
<translation type="vanished">0xFFFF</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="mainwindow.cpp" line="69"/>
<source>selected</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<source>ID</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="mainwindow.cpp" line="69"/>
<source>Test ID</source>
<translation>ID</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="mainwindow.cpp" line="69"/>
<source>Test items</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="mainwindow.cpp" line="69"/>
<source>Test station</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="mainwindow.cpp" line="69"/>
<source>Test type</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="66"/>
<location filename="mainwindow.cpp" line="69"/>
<source>Test content</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="99"/>
<location filename="mainwindow.cpp" line="145"/>
<location filename="mainwindow.cpp" line="149"/>
<location filename="mainwindow.cpp" line="158"/>
<location filename="mainwindow.cpp" line="291"/>
<location filename="mainwindow.cpp" line="298"/>
<location filename="mainwindow.cpp" line="305"/>
<location filename="mainwindow.cpp" line="378"/>
<location filename="mainwindow.cpp" line="382"/>
<source>Prompt</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="99"/>
<location filename="mainwindow.cpp" line="291"/>
<source>Please add test item</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="135"/>
<source>Please add basic device information</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="305"/>
<source>Pid is empty, device not supported</source>
<translation>Pid为空</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="365"/>
<source>Select profile path</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="135"/>
<location filename="mainwindow.cpp" line="209"/>
<location filename="mainwindow.cpp" line="365"/>
<source>Json(*.json)</source>
<translation>(*.json)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="145"/>
<location filename="mainwindow.cpp" line="378"/>
<source>Successfully generated</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="149"/>
<location filename="mainwindow.cpp" line="382"/>
<source>Generate filed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="158"/>
<location filename="mainwindow.cpp" line="298"/>
<source>Incomplete information, please check</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="209"/>
<source>Open File</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
</context>
</TS>

View File

@ -0,0 +1,53 @@
#include "dialog_mymessagebox.h"
#include "ui_dialog_mymessagebox.h"
Dialog_myMessageBox::Dialog_myMessageBox(MainWindow::DeviceInfo deviceInfo, QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog_myMessageBox)
{
ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
setWindowTitle(tr("Prompt"));
QFont ft;
ft.setPointSize(12);
ui->textBrowser->setFont(ft);
QString content;
content.append(tr("Please congirm device Target Configuration:") + "\n\n");
content.append(tr("Manufacturer:%1").arg(deviceInfo.oem) + "\n");
content.append(tr("Device type:%1").arg(deviceInfo.deviceType) + "\n");
if (!deviceInfo.deviceModel.isEmpty())
content.append(tr("Device model:%1").arg(deviceInfo.deviceModel) + "\n");
if (!deviceInfo.fwVersion.isEmpty())
content.append(tr("Firmware version:%1").arg(deviceInfo.fwVersion) + "\n");
content.append(tr("VID:%1").arg(deviceInfo.vid) + "\n");
content.append(tr("PID:%1").arg(deviceInfo.pid) + "\n");
content.append(tr("Speed mode:%1").arg(deviceInfo.speedMode) + "PPM\n");
content.append(tr("Sleep time:%1").arg(deviceInfo.sleepTime) + "\n");
content.append(tr("Is it ockede:%1").arg(deviceInfo.lockDevice) + "\n");
content.append(tr("Cpu size:no less than %1").arg(deviceInfo.cpuSize) + " GB\n");
content.append(tr("Disk size:no less than %1").arg(deviceInfo.diskSize) + " GB\n");
ui->textBrowser->setText(content);
}
Dialog_myMessageBox::~Dialog_myMessageBox()
{
delete ui;
}
void Dialog_myMessageBox::on_pushButton_ok_clicked()
{
accept();
}
void Dialog_myMessageBox::on_pushButton_cancel_clicked()
{
reject();
}

View File

@ -0,0 +1,28 @@
#ifndef DIALOG_MYMESSAGEBOX_H
#define DIALOG_MYMESSAGEBOX_H
#include <QDialog>
#include "mainwindow.h"
namespace Ui {
class Dialog_myMessageBox;
}
class Dialog_myMessageBox : public QDialog
{
Q_OBJECT
public:
explicit Dialog_myMessageBox(MainWindow::DeviceInfo deviceInfo, QWidget *parent = nullptr);
~Dialog_myMessageBox();
private slots:
void on_pushButton_ok_clicked();
void on_pushButton_cancel_clicked();
private:
Ui::Dialog_myMessageBox *ui;
};
#endif // DIALOG_MYMESSAGEBOX_H

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog_myMessageBox</class>
<widget class="QDialog" name="Dialog_myMessageBox">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>293</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextBrowser" name="textBrowser"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<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="pushButton_ok">
<property name="text">
<string>Ok</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_cancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -7,12 +7,13 @@
#include <QJsonArray>
#include <QJsonDocument>
#include <QMessageBox>
#include "base/HGUtility.h"
#include "analysisjson.h"
#include "dialog_mymessagebox.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
, m_curIndex(0)
{
ui->setupUi(this);
@ -27,9 +28,12 @@ MainWindow::~MainWindow()
void MainWindow::initDeviceInfo()
{
QStringList oemName{ tr("huagao"), tr("microtek"), tr("hanvon"), tr("lanxum"), tr("deli"), tr("unis"), tr("cumtenn"), tr("nuetral") };
QStringList oemName{ tr("huagao"), tr("microtek"), tr("hanvon"), tr("lanxum"), tr("deli"), tr("unis"), tr("cumtenn") };
ui->comboBox_OEM->addItems(oemName);
QStringList deviceType{ tr("G100-3399"), tr("G200-3399"), tr("G300-3288"), tr("G400-3399") };
ui->comboBox_deviceType->addItems(deviceType);
int speedTime = 40;
while (speedTime <= 130)
{
@ -49,23 +53,20 @@ void MainWindow::initDeviceInfo()
QStringList testType{ tr("automatic testing"), tr("Manual testing") };
ui->comboBox_testType->addItems(testType);
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);
ui->lineEdit_vid->setReadOnly(true);
ui->lineEdit_pid->setReadOnly(true);
}
void MainWindow::initTableWidgetUi()
{
ui->tableWidget->resizeRowsToContents();
ui->tableWidget->setColumnCount(7);
ui->tableWidget->setColumnCount(6);
ui->tableWidget->horizontalHeader()->setDefaultSectionSize(200);
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
ui->tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
QStringList header;
header << tr("selected") << tr("ID") << tr("Test ID") << tr("Test items") << tr("Test station") << tr("Test type") << tr("Test content");
header << tr("selected") << tr("Test ID") << tr("Test items") << tr("Test station") << tr("Test type") << tr("Test content");
ui->tableWidget->setHorizontalHeaderLabels(header);
QFont font = ui->tableWidget->horizontalHeader()->font();
@ -86,12 +87,200 @@ void MainWindow::initTableWidgetUi()
ui->tableWidget->setStyleSheet("selection-background-color:rgb(193,210,240)");
}
void MainWindow::updateTableWidget()
bool MainWindow::loadDefaultItems(DeviceType deviceType)
{
for(int i = 0; i < ui->tableWidget->rowCount(); i++)
QString processPath = QCoreApplication::applicationDirPath();
QString baseName;
if (deviceType == DeviceType_G100)
baseName = "G100";
else if (deviceType == DeviceType_G200)
baseName = "G200";
else if (deviceType == DeviceType_G300)
baseName = "G300";
else if (deviceType == DeviceType_G400)
baseName = "G400";
processPath.append("/" + baseName + ".json");
QString filePath = getStdFileName(processPath);
QFile file(filePath);
if (!file.exists())
return false;
AnalysisJson analysisJson(filePath);
std::vector<AnalysisJson::json_node> list_jsonNode = analysisJson.GetNode();
int count = list_jsonNode.size();
ui->tableWidget->setRowCount(count);
for(int i = 0; i < count; ++i)
{
ui->tableWidget->setItem(i, 1, new QTableWidgetItem(QString::number(i + 1)));
QTableWidgetItem *check = new QTableWidgetItem();
check->setCheckState(Qt::Unchecked);
ui->tableWidget->setItem(i, 0, check);
ui->tableWidget->item(i, 0)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
AnalysisJson::json_node node = list_jsonNode[i];
ui->tableWidget->setItem(i, 1, new QTableWidgetItem(QString::number(i+1)));
ui->tableWidget->item(i, 1)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(i, 2, new QTableWidgetItem(node.title));
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(i, 3, new QTableWidgetItem(node.station));
ui->tableWidget->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(i, 4, new QTableWidgetItem(node.is_man ? tr("Manual testing") : tr("automatic testing")));
ui->tableWidget->item(i, 4)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(i, 5, new QTableWidgetItem(node.desc));
ui->tableWidget->item(i, 5)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
QTableWidgetItem *item = ui->tableWidget->item(i, 2);
QVariant var = QVariant::fromValue(node.name);
item->setData(Qt::UserRole, var);
}
ui->checkBox_selectAll->setChecked(false);
ui->checkBox_selectAll->setChecked(true);
ui->tableWidget->selectRow(0);
return true;
}
QPair<QString, QString> MainWindow::getVidPid(QString oem, QString deviceType)
{
QString vid;
QString pid;
if (oem == tr("huagao"))
{
vid = "0x3072";
if (deviceType == "G100-3399")
{
pid = "0x0139";
}
else if (deviceType == "G200-3399")
{
pid = "0x0239";
}
else if (deviceType == "G300-3288")
{
pid = "0x0300";
}
else if (deviceType == "G400-3399")
{
pid = "0x0439";
}
}
else if (oem == tr("microtek"))
{
vid = "0x05da";
if (deviceType == "G100-3399")
{
pid = "0x9222";
}
else if (deviceType == "G200-3399")
{
pid = "0x9223";
}
else if (deviceType == "G300-3288")
{
pid = "0";
}
else if (deviceType == "G400-3399")
{
pid = "9220";
}
}
else if (oem == tr("hanvon"))
{
vid = "0x2903";
if (deviceType == "G100-3399")
{
pid = "0x8000";
}
else if (deviceType == "G200-3399")
{
pid = "0x9000";
}
else if (deviceType == "G300-3288")
{
pid = "0x1000";
}
else if (deviceType == "G400-3399")
{
pid = "0x7039";
}
}
else if (oem == tr("lanxum"))
{
vid = "0x31c9";
if (deviceType == "G100-3399")
{
pid = "0x8620";
}
else if (deviceType == "G200-3399")
{
pid = "0x8630";
}
else if (deviceType == "G300-3288")
{
pid = "0x8200";
}
else if (deviceType == "G400-3399")
{
pid = "0x8529";
}
}
else if (oem == tr("deli"))
{
vid = "0x300e";
if (deviceType == "G100-3399" || deviceType == "G200-3399")
{
pid = "0x401c";
}
else if (deviceType == "G300-3288")
{
pid = "0x4015";
}
else if (deviceType == "G400-3399")
{
pid = "0x4019";
}
}
else if (oem == tr("unis"))
{
vid = "0x3308";
if (deviceType == "G100-3399" || deviceType == "G200-3399")
{
pid = "0x0200";
}
else if (deviceType == "G300-3288" || deviceType == "G400-3399")
{
pid = "0";
}
}
else if (oem == tr("cumtenn"))
{
vid = "0x3308";
if (deviceType == "G100-3399" || deviceType == "G200-3399")
{
pid = "0x6006";
}
else if (deviceType == "G300-3288")
{
pid = "0x6005";
}
else if (deviceType == "G400-3399")
{
pid = "0";
}
}
QPair<QString, QString> vidPid;
vidPid.first = vid;
vidPid.second = pid;
return vidPid;
}
void MainWindow::on_pushButton_generate_clicked()
@ -102,8 +291,38 @@ void MainWindow::on_pushButton_generate_clicked()
return;
}
int sleepTime[8] = { 0, 5, 10, 20, 30, 60, 120, 240 };
if (ui->lineEdit_vid->text().isEmpty() || ui->lineEdit_pid->text().isEmpty() || ui->lineEdit_cpuSize->text().isEmpty() ||
ui->lineEdit_diskSize->text().isEmpty())
{
QMessageBox::information(this, tr("Prompt"), tr("Incomplete information, please check"));
return;
}
bool ok = false;
if (ui->lineEdit_pid->text().toInt(&ok, 16) == 0)
{
QMessageBox::information(this, tr("Prompt"), tr("Pid is empty, device not supported"));
return;
}
DeviceInfo deviceInfo;
deviceInfo.oem = ui->comboBox_OEM->currentText();
deviceInfo.deviceType = ui->comboBox_deviceType->currentText();
deviceInfo.deviceModel = ui->lineEdit_deviceModel->text();
deviceInfo.fwVersion = ui->lineEdit_fwVersion->text();
deviceInfo.vid = ui->lineEdit_vid->text();
deviceInfo.pid = ui->lineEdit_pid->text();
deviceInfo.sleepTime = ui->comboBox_sleepTime->currentText();
deviceInfo.speedMode = ui->comboBox_speedMode->currentText();
deviceInfo.cpuSize = ui->lineEdit_cpuSize->text();
deviceInfo.diskSize = ui->lineEdit_diskSize->text();
deviceInfo.lockDevice = ui->comboBox_lockDevice->currentText();
Dialog_myMessageBox dlg(deviceInfo, this);
if (!dlg.exec())
return;
int sleepTime[8] = { 0, 5, 10, 20, 30, 60, 120, 240 };
QJsonObject globalObject;
globalObject.insert("vid-to", ui->lineEdit_vid->text().toInt(&ok, 16));
@ -113,8 +332,8 @@ void MainWindow::on_pushButton_generate_clicked()
globalObject.insert("cpu-size", ui->lineEdit_cpuSize->text().toInt());
globalObject.insert("disk-size", ui->lineEdit_diskSize->text().toInt());
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_deviceModel->text().isEmpty())
globalObject.insert("device-model", ui->lineEdit_deviceModel->text());
if (!ui->lineEdit_fwVersion->text().isEmpty())
globalObject.insert("firmware-version", ui->lineEdit_fwVersion->text());
@ -125,11 +344,17 @@ void MainWindow::on_pushButton_generate_clicked()
int count = ui->tableWidget->rowCount();
for (int i = 0; i < count; i++)
{
testItemObject.insert("name", ui->tableWidget->item(i, 2)->text());
testItemObject.insert("title", ui->tableWidget->item(i, 3)->text());
testItemObject.insert("station", ui->tableWidget->item(i, 4)->text());
testItemObject.insert("man", ui->tableWidget->item(i, 5)->text() == tr("automatic testing") ? false : true);
testItemObject.insert("desc", ui->tableWidget->item(i, 6)->text());
QTableWidgetItem *item = ui->tableWidget->item(i, 0);
if (item->checkState() == Qt::Unchecked)
continue;
QString name = ui->tableWidget->item(i, 2)->data(Qt::UserRole).value<QString>();
testItemObject.insert("name", name);
testItemObject.insert("title", ui->tableWidget->item(i, 2)->text());
testItemObject.insert("station", ui->tableWidget->item(i, 3)->text());
testItemObject.insert("man", ui->tableWidget->item(i, 4)->text() == tr("automatic testing") ? false : true);
testItemObject.insert("desc", ui->tableWidget->item(i, 5)->text());
json.insert(QString::number(i + 1), QJsonValue(testItemObject));
}
@ -157,44 +382,6 @@ void MainWindow::on_pushButton_generate_clicked()
}
}
void MainWindow::on_pushButton_addTestItem_clicked()
{
if (ui->lineEdit_vid->text().isEmpty() || ui->lineEdit_pid->text().isEmpty() || ui->lineEdit_cpuSize->text().isEmpty() ||
ui->lineEdit_diskSize->text().isEmpty() || ui->lineEdit_testID->text().isEmpty() || ui->lineEdit_testItem->text().isEmpty())
{
QMessageBox::information(this, tr("Prompt"), tr("Incomplete information, please check"));
return;
}
ui->tableWidget->setRowCount(m_curIndex + 1);
QTableWidgetItem *check = new QTableWidgetItem();
check->setCheckState(Qt::Unchecked);
ui->tableWidget->setItem(m_curIndex, 0, check);
ui->tableWidget->item(m_curIndex, 0)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(m_curIndex, 1, new QTableWidgetItem(QString::number(m_curIndex + 1)));
ui->tableWidget->item(m_curIndex, 1)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(m_curIndex, 2, new QTableWidgetItem(ui->lineEdit_testID->text()));
ui->tableWidget->item(m_curIndex, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(m_curIndex, 3, new QTableWidgetItem(ui->lineEdit_testItem->text()));
ui->tableWidget->item(m_curIndex, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(m_curIndex, 4, new QTableWidgetItem(ui->comboBox_testStation->currentText()));
ui->tableWidget->item(m_curIndex, 4)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(m_curIndex, 5, new QTableWidgetItem(ui->comboBox_testType->currentText()));
ui->tableWidget->item(m_curIndex, 5)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(m_curIndex, 6, new QTableWidgetItem(ui->textEdit_testContent->toPlainText()));
ui->tableWidget->item(m_curIndex, 6)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->selectRow(m_curIndex);
m_curIndex++;
}
void MainWindow::on_tableWidget_itemClicked(QTableWidgetItem *item)
{
int row = item->row();
@ -204,100 +391,10 @@ void MainWindow::on_tableWidget_itemClicked(QTableWidgetItem *item)
ui->tableWidget->selectRow(row);
}
ui->lineEdit_testID->setText(ui->tableWidget->item(row, 2)->text());
ui->lineEdit_testItem->setText(ui->tableWidget->item(row, 3)->text());
ui->comboBox_testStation->setCurrentText(ui->tableWidget->item(row, 4)->text());
ui->comboBox_testType->setCurrentText(ui->tableWidget->item(row, 5)->text());
ui->textEdit_testContent->setText(ui->tableWidget->item(row, 6)->text());
}
void MainWindow::on_pushButton_import_clicked()
{
QString filePath = QFileDialog::getOpenFileName(this, tr("Open File"), "", tr("Json(*.json)"));
if (filePath.isEmpty())
return;
AnalysisJson analysisJson(filePath);
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
ui->lineEdit_vid->setText(QString("0x") + QString::number(jsonGlobal.vid_to, 16));
ui->lineEdit_pid->setText(QString("0x") + QString::number(jsonGlobal.pid_to, 16));
ui->lineEdit_diskSize->setText(QString::number(jsonGlobal.disk_size));
ui->lineEdit_cpuSize->setText(QString::number(jsonGlobal.cpu_size));
ui->comboBox_lockDevice->setCurrentIndex(jsonGlobal.lock_device ? 1 : 0);
if (!jsonGlobal.device_model.isEmpty())
{
ui->lineEdit_deviceModle->setText(jsonGlobal.device_model);
}
if(!jsonGlobal.firmware_version.isEmpty())
{
ui->lineEdit_fwVersion->setText(jsonGlobal.firmware_version);
}
int sleepTime[8] = { 0, 5, 10, 20, 30, 60, 120, 240 };
for (int i = 0; i < sizeof(sleepTime) / sizeof(0); i++)
{
if (jsonGlobal.sleep_time == sleepTime[i])
ui->comboBox_sleepTime->setCurrentIndex(i);
}
for(int i = 0; i < ui->comboBox_speedMode->count(); i++)
{
if (jsonGlobal.speed_mode == ui->comboBox_speedMode->itemText(i).toInt())
ui->comboBox_speedMode->setCurrentText(QString::number(jsonGlobal.speed_mode));
}
std::vector<AnalysisJson::json_node> list_jsonNode = analysisJson.GetNode();
int count = list_jsonNode.size();
ui->tableWidget->setRowCount(count);
m_curIndex = 0;
for(int i = 0; i < count; ++i)
{
QTableWidgetItem *check = new QTableWidgetItem();
check->setCheckState(Qt::Unchecked);
ui->tableWidget->setItem(i, 0, check);
ui->tableWidget->item(i, 0)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
AnalysisJson::json_node node = list_jsonNode[i];
ui->tableWidget->setItem(i, 1, new QTableWidgetItem(QString::number(i+1)));
ui->tableWidget->item(i, 1)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(i, 2, new QTableWidgetItem(node.name));
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(i, 3, new QTableWidgetItem(node.title));
ui->tableWidget->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
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("Manual testing") : tr("automatic testing")));
ui->tableWidget->item(i, 5)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidget->setItem(i, 6, new QTableWidgetItem(node.desc));
ui->tableWidget->item(i, 6)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
m_curIndex++;
}
ui->tableWidget->selectRow(0);
}
void MainWindow::on_pushButton_delete_clicked()
{
for(int i = 0; i < ui->tableWidget->rowCount(); i++)
{
QTableWidgetItem *item = ui->tableWidget->item(i, 0);
if (item != nullptr)
{
if (item->checkState() == Qt::Checked)
{
ui->tableWidget->removeRow(item->row());
i = 0;
}
}
}
updateTableWidget();
ui->lineEdit_testItem->setText(ui->tableWidget->item(row, 2)->text());
ui->comboBox_testStation->setCurrentText(ui->tableWidget->item(row, 3)->text());
ui->comboBox_testType->setCurrentText(ui->tableWidget->item(row, 4)->text());
ui->textBrowser_testContent->setText(ui->tableWidget->item(row, 5)->text());
}
void MainWindow::on_checkBox_selectAll_stateChanged(int arg1)
@ -317,3 +414,42 @@ void MainWindow::on_checkBox_selectAll_stateChanged(int arg1)
}
}
}
void MainWindow::on_comboBox_OEM_currentIndexChanged(const QString &arg1)
{
QPair<QString, QString> vidPid = getVidPid(arg1, ui->comboBox_deviceType->currentText());
QString vid = vidPid.first;
QString pid = vidPid.second;
ui->lineEdit_vid->setText(vid);
ui->lineEdit_pid->setText(pid);
}
void MainWindow::on_comboBox_deviceType_currentIndexChanged(const QString &arg1)
{
DeviceType deviceType = DeviceType_G100;
if (arg1 == "G100-3399")
deviceType = DeviceType_G100;
else if (arg1 == "G200-3399")
deviceType = DeviceType_G200;
else if (arg1 == "G300-3288")
deviceType = DeviceType_G300;
else if (arg1 == "G400-3399")
deviceType = DeviceType_G400;
loadDefaultItems(deviceType);
QPair<QString, QString> vidPid = getVidPid(ui->comboBox_OEM->currentText(), arg1);
QString vid = vidPid.first;
QString pid = vidPid.second;
ui->lineEdit_vid->setText(vid);
ui->lineEdit_pid->setText(pid);
}
QString MainWindow::getStdFileName(const QString &fileName)
{
char result[512] = {0};
HGBase_StandardiseFileName(fileName.toStdString().c_str(), result, 512);
return result;
}

View File

@ -16,26 +16,46 @@ public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
enum DeviceType
{
DeviceType_G100 = 0,
DeviceType_G200,
DeviceType_G300,
DeviceType_G400,
};
struct DeviceInfo
{
QString oem;
QString deviceType;
QString deviceModel;
QString fwVersion;
QString vid;
QString pid;
QString sleepTime;
QString speedMode;
QString cpuSize;
QString diskSize;
QString lockDevice;
};
private slots:
void on_pushButton_generate_clicked();
void on_pushButton_addTestItem_clicked();
void on_tableWidget_itemClicked(QTableWidgetItem *item);
void on_pushButton_import_clicked();
void on_pushButton_delete_clicked();
void on_checkBox_selectAll_stateChanged(int arg1);
private:
void initDeviceInfo();
void initTableWidgetUi();
void updateTableWidget();
void on_comboBox_OEM_currentIndexChanged(const QString &arg1);
void on_comboBox_deviceType_currentIndexChanged(const QString &arg1);
private:
int m_curIndex;
QString getStdFileName(const QString &fileName);
void initDeviceInfo();
void initTableWidgetUi();
bool loadDefaultItems(DeviceType deviceType);
QPair<QString, QString> getVidPid(QString oem, QString deviceType);
private:
Ui::MainWindow *ui;

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>988</width>
<height>758</height>
<width>1010</width>
<height>787</height>
</rect>
</property>
<property name="windowTitle">
@ -18,7 +18,7 @@
<property name="geometry">
<rect>
<x>740</x>
<y>30</y>
<y>40</y>
<width>161</width>
<height>20</height>
</rect>
@ -28,7 +28,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>30</y>
<y>20</y>
<width>161</width>
<height>22</height>
</rect>
@ -37,8 +37,8 @@
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>690</x>
<y>30</y>
<x>680</x>
<y>40</y>
<width>41</width>
<height>21</height>
</rect>
@ -50,8 +50,8 @@
<widget class="QLineEdit" name="lineEdit_fwVersion">
<property name="geometry">
<rect>
<x>130</x>
<y>140</y>
<x>440</x>
<y>90</y>
<width>161</width>
<height>20</height>
</rect>
@ -60,8 +60,8 @@
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>90</x>
<y>30</y>
<x>80</x>
<y>20</y>
<width>31</width>
<height>20</height>
</rect>
@ -73,8 +73,8 @@
<widget class="QLineEdit" name="lineEdit_vid">
<property name="geometry">
<rect>
<x>440</x>
<y>30</y>
<x>740</x>
<y>10</y>
<width>161</width>
<height>20</height>
</rect>
@ -83,8 +83,8 @@
<widget class="QLabel" name="label_15">
<property name="geometry">
<rect>
<x>50</x>
<y>140</y>
<x>330</x>
<y>90</y>
<width>101</width>
<height>21</height>
</rect>
@ -96,8 +96,8 @@
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>400</x>
<y>30</y>
<x>680</x>
<y>10</y>
<width>41</width>
<height>21</height>
</rect>
@ -109,9 +109,9 @@
<widget class="QPushButton" name="pushButton_generate">
<property name="geometry">
<rect>
<x>800</x>
<y>540</y>
<width>121</width>
<x>430</x>
<y>690</y>
<width>131</width>
<height>51</height>
</rect>
</property>
@ -119,10 +119,10 @@
<string>Generate</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_deviceModle">
<widget class="QLineEdit" name="lineEdit_deviceModel">
<property name="geometry">
<rect>
<x>740</x>
<x>130</x>
<y>90</y>
<width>161</width>
<height>20</height>
@ -132,21 +132,21 @@
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>660</x>
<x>40</x>
<y>90</y>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Device modle:</string>
<string>Device model:</string>
</property>
</widget>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>340</x>
<y>140</y>
<x>650</x>
<y>110</y>
<width>91</width>
<height>20</height>
</rect>
@ -159,7 +159,7 @@
<property name="geometry">
<rect>
<x>740</x>
<y>140</y>
<y>80</y>
<width>161</width>
<height>20</height>
</rect>
@ -168,8 +168,8 @@
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>20</x>
<y>90</y>
<x>30</x>
<y>160</y>
<width>101</width>
<height>21</height>
</rect>
@ -182,7 +182,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>90</y>
<y>160</y>
<width>161</width>
<height>22</height>
</rect>
@ -191,8 +191,8 @@
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>370</x>
<y>90</y>
<x>360</x>
<y>160</y>
<width>71</width>
<height>21</height>
</rect>
@ -204,8 +204,8 @@
<widget class="QComboBox" name="comboBox_lockDevice">
<property name="geometry">
<rect>
<x>130</x>
<y>190</y>
<x>740</x>
<y>160</y>
<width>161</width>
<height>22</height>
</rect>
@ -214,8 +214,8 @@
<widget class="QLabel" name="label_8">
<property name="geometry">
<rect>
<x>640</x>
<y>140</y>
<x>650</x>
<y>80</y>
<width>91</width>
<height>20</height>
</rect>
@ -227,8 +227,8 @@
<widget class="QLineEdit" name="lineEdit_diskSize">
<property name="geometry">
<rect>
<x>440</x>
<y>140</y>
<x>740</x>
<y>110</y>
<width>161</width>
<height>20</height>
</rect>
@ -238,7 +238,7 @@
<property name="geometry">
<rect>
<x>440</x>
<y>90</y>
<y>160</y>
<width>161</width>
<height>22</height>
</rect>
@ -247,8 +247,8 @@
<widget class="QLabel" name="label_9">
<property name="geometry">
<rect>
<x>60</x>
<y>190</y>
<x>650</x>
<y>160</y>
<width>71</width>
<height>21</height>
</rect>
@ -257,34 +257,11 @@
<string>Lock device:</string>
</property>
</widget>
<widget class="QLabel" name="label_10">
<property name="geometry">
<rect>
<x>360</x>
<y>190</y>
<width>71</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Test Id:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_testID">
<property name="geometry">
<rect>
<x>440</x>
<y>190</y>
<width>161</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_11">
<property name="geometry">
<rect>
<x>660</x>
<y>190</y>
<x>40</x>
<y>260</y>
<width>71</width>
<height>16</height>
</rect>
@ -296,8 +273,8 @@
<widget class="QLineEdit" name="lineEdit_testItem">
<property name="geometry">
<rect>
<x>740</x>
<y>190</y>
<x>130</x>
<y>260</y>
<width>161</width>
<height>20</height>
</rect>
@ -306,9 +283,9 @@
<widget class="QLabel" name="label_14">
<property name="geometry">
<rect>
<x>60</x>
<y>250</y>
<width>61</width>
<x>350</x>
<y>260</y>
<width>81</width>
<height>21</height>
</rect>
</property>
@ -319,8 +296,8 @@
<widget class="QComboBox" name="comboBox_testStation">
<property name="geometry">
<rect>
<x>130</x>
<y>250</y>
<x>440</x>
<y>260</y>
<width>161</width>
<height>22</height>
</rect>
@ -329,8 +306,8 @@
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>360</x>
<y>250</y>
<x>660</x>
<y>260</y>
<width>71</width>
<height>21</height>
</rect>
@ -342,110 +319,81 @@
<widget class="QComboBox" name="comboBox_testType">
<property name="geometry">
<rect>
<x>440</x>
<y>250</y>
<x>740</x>
<y>260</y>
<width>161</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_addTestItem">
<property name="geometry">
<rect>
<x>390</x>
<y>310</y>
<width>121</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
<widget class="QLabel" name="label_12">
<property name="geometry">
<rect>
<x>660</x>
<y>250</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Test content:</string>
</property>
</widget>
<widget class="QTextEdit" name="textEdit_testContent">
<property name="geometry">
<rect>
<x>740</x>
<y>230</y>
<width>221</width>
<height>71</height>
</rect>
</property>
</widget>
<widget class="QTableWidget" name="tableWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>380</y>
<width>721</width>
<height>281</height>
<y>320</y>
<width>611</width>
<height>291</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_import">
<widget class="QComboBox" name="comboBox_deviceType">
<property name="geometry">
<rect>
<x>800</x>
<y>430</y>
<width>121</width>
<height>51</height>
<x>440</x>
<y>20</y>
<width>161</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_16">
<property name="geometry">
<rect>
<x>360</x>
<y>20</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Import</string>
<string>Device type:</string>
</property>
</widget>
<widget class="QWidget" name="">
<widget class="Line" name="line">
<property name="geometry">
<rect>
<x>10</x>
<y>220</y>
<width>971</width>
<height>16</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_selectAll">
<property name="geometry">
<rect>
<x>20</x>
<y>670</y>
<width>531</width>
<height>41</height>
<y>630</y>
<width>77</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>SelectAll</string>
</property>
</widget>
<widget class="QTextBrowser" name="textBrowser_testContent">
<property name="geometry">
<rect>
<x>640</x>
<y>320</y>
<width>341</width>
<height>291</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="checkBox_selectAll">
<property name="text">
<string>SelectAll</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_delete">
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<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>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
@ -453,7 +401,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>988</width>
<width>1010</width>
<height>22</height>
</rect>
</property>