优化线程退出时资源的释放问题
This commit is contained in:
@@ -1,42 +1,45 @@
|
||||
// UI_Name.h
|
||||
#ifndef UI_NAME_H
|
||||
#define UI_NAME_H
|
||||
|
||||
#define SL100_FACTORY_TOOL_W 1340
|
||||
#define SL100_FACTORY_TOOL_H 900
|
||||
#define START_LISTENING "开始监听\n(Start Listening...)"
|
||||
#define ONE_CLICKED_TEST "一键功能测试"
|
||||
#define TOOL_VERSION "SL100 工厂产测工具 - V0.0.7"
|
||||
#define FRONT_BOARD_NAME "前 板"
|
||||
#define BACK_BOARD_NAME "后 板"
|
||||
#define ALL_BOARD_NAME "整 机"
|
||||
|
||||
#define FRONT_BOARD_TEST "前板测试项"
|
||||
#define IMAGE_DISPLAYAREA "图像显示区"
|
||||
#define VIDEO_DISPLAYAREA "视频显示区"
|
||||
#define RESOLUTION_EDIT "分辨率:"
|
||||
#define LEFT_LENS "左边镜头"
|
||||
#define RIGHT_LENS "右边镜头"
|
||||
#define CAT_EYE_LENS_RGB "猫眼镜头(RGB)"
|
||||
#define CAT_EYE_LENS_IR "猫眼镜头(IR)"
|
||||
#define BIG_WINDOW_PRE_VIDEO "大窗口播放视频"
|
||||
#define IMAGE_DISPLAY_TAB "图像显示区"
|
||||
#define VIDEO_DISPLAY_TAB "视频显示区"
|
||||
#define INPUT_CONFIG_PARA "请输入配置参数..."
|
||||
#define FRONT_TEST_ITEM "前板测试项"
|
||||
#define FRONT_CONFID_ITEM "前板配置项"
|
||||
#define FRONT_DEVICE_INFO "前板设备信息"
|
||||
#define FRONT_TUYU_LICENSE "算法 license"
|
||||
#define BACK_TEST_ITEM "后板测试项"
|
||||
#define BACK_CONFID_ITEM "后板配置项"
|
||||
#define BACK_GET_UUID_SN "后板获取 UUID/SN"
|
||||
#define BACK_DEVICE_INFO "后板设备信息"
|
||||
#define ALL_BOARD "整机设备信息"
|
||||
#define ALL_PRODUCT_INFO "工厂生产信息"
|
||||
|
||||
#define FRONT_BOARD_VIDEO_BUTTON_INDEX_PROPERTY "getVideoIndex"
|
||||
#define BACK_BOARD_VIDEO_BUTTON_INDEX_PROPERTY "BackGetVideoIndex"
|
||||
#define ALL_BOARD_VIDEO_BUTTON_INDEX_PROPERTY "AllGetVideoIndex"
|
||||
|
||||
struct UI_config {
|
||||
int SL100_FACTORY_TOOL_W;
|
||||
int SL100_FACTORY_TOOL_H;
|
||||
|
||||
QString TOOL_VERSION; // "SL100 工厂产测工具 - V0.0.7"
|
||||
QString START_LISTENING; // "开始监听\n(Start Listening...)"
|
||||
QString ONE_CLICKED_TEST; // "一键功能测试"
|
||||
QString FRONT_BOARD_NAME; // "前 板"
|
||||
QString BACK_BOARD_NAME; // "后 板"
|
||||
QString ALL_BOARD_NAME; // "整 机"
|
||||
QString FRONT_DEVICE_INFO; // "前板设备信息"
|
||||
QString BACK_DEVICE_INFO; // "后板设备信息"
|
||||
QString ALL_PRODUCT_INFO; // "工厂生产信息"
|
||||
QString ALL_DEVICE_INFO; // "整机设备信息"
|
||||
QString FRONT_TUYU_LICENSE; // "算法 license"
|
||||
QString BACK_GET_UUID_SN; // "后板获取 UUID/SN"
|
||||
QString FRONT_TEST_ITEM; // "前板测试项"
|
||||
QString FRONT_CONFID_ITEM; // "前板配置项"
|
||||
QString INPUT_CONFIG_PARA; // "请输入配置参数..."
|
||||
QString BACK_TEST_ITEM; // "后板测试项"
|
||||
QString BACK_CONFID_ITEM; // "后板配置项"
|
||||
QString IMAGE_DISPLAY_TAB; // "图像显示区"
|
||||
QString VIDEO_DISPLAY_TAB; // "视频显示区"
|
||||
QString LEFT_LENS; // "左边镜头"
|
||||
QString RIGHT_LENS; // "右边镜头"
|
||||
QString CAT_EYE_LENS_RGB; // "猫眼镜头(RGB)"
|
||||
QString CAT_EYE_LENS_IR; // "猫眼镜头(IR)"
|
||||
QString BIG_WINDOW_PRE_VIDEO; // "大窗口播放视频"
|
||||
QString RESOLUTION_EDIT; // "分辨率:"
|
||||
|
||||
};
|
||||
|
||||
QMap<QString, QString> parseIniFile(const QString& filePath);
|
||||
UI_config loadConfig(const QString& filePath);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,81 @@
|
||||
#include "../MainWidget.h"
|
||||
//#include "UI_Name.h"
|
||||
|
||||
QMap<QString, QString> parseIniFile(const QString& filePath)
|
||||
{
|
||||
QMap<QString, QString> configMap;
|
||||
QFile file(filePath);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
qWarning() << "Cannot open config file:" << filePath;
|
||||
return configMap;
|
||||
}
|
||||
qDebug() << "Successfully open config file path :" << filePath;
|
||||
QTextStream in(&file);
|
||||
in.setCodec("UTF-8"); // 强制使用 UTF-8 编码
|
||||
|
||||
QString currentSection;
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine().trimmed();
|
||||
if (line.isEmpty() || line.startsWith(";") || line.startsWith("#")) {
|
||||
continue;
|
||||
}
|
||||
if (line.startsWith("[") && line.endsWith("]")) {
|
||||
currentSection = line.mid(1, line.length() - 2);
|
||||
continue;
|
||||
}
|
||||
if (line.contains("=")) {
|
||||
QStringList parts = line.split("=", QString::KeepEmptyParts);
|
||||
if (parts.size() == 2) {
|
||||
QString key = parts[0].trimmed();
|
||||
QString value = parts[1].trimmed();
|
||||
QString fullKey = currentSection.isEmpty() ? key : currentSection + "/" + key;
|
||||
value.replace("\\n", "\n");
|
||||
configMap[fullKey] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return configMap;
|
||||
}
|
||||
|
||||
UI_config loadConfig(const QString& filePath)
|
||||
{
|
||||
UI_config config;
|
||||
QMap<QString, QString> settings = parseIniFile(filePath);
|
||||
|
||||
config.SL100_FACTORY_TOOL_W = settings.value("Window/width", "1340").toInt();
|
||||
config.SL100_FACTORY_TOOL_H = settings.value("Window/height", "900").toInt();
|
||||
config.TOOL_VERSION = settings.value("Labels/tool_version", "SL100 工厂产测工具 - V0.0.8");
|
||||
config.START_LISTENING = settings.value("Labels/start_listening", "开始监听\n(Start Listening...)");
|
||||
config.ONE_CLICKED_TEST = settings.value("Labels/one_clicked_test", "一键功能测试");
|
||||
config.FRONT_BOARD_NAME = settings.value("Labels/front_board_name", "前 板");
|
||||
config.BACK_BOARD_NAME = settings.value("Labels/back_board_name", "后 板");
|
||||
config.ALL_BOARD_NAME = settings.value("Labels/all_board_name", "整 机");
|
||||
config.FRONT_DEVICE_INFO = settings.value("Labels/front_device_info", "前板设备信息");
|
||||
config.BACK_DEVICE_INFO = settings.value("Labels/back_device_info", "后板设备信息");
|
||||
config.ALL_PRODUCT_INFO = settings.value("Labels/all_product_info", "工厂生产信息");
|
||||
config.ALL_DEVICE_INFO = settings.value("Labels/all_device_info", "整机设备信息");
|
||||
config.FRONT_TUYU_LICENSE = settings.value("Labels/front_TUYU_license", "图语算法 License");
|
||||
config.BACK_GET_UUID_SN = settings.value("Labels/back_get_uuid_sn", "后板获取 UUID/SN");
|
||||
config.FRONT_TEST_ITEM = settings.value("Labels/front_test_item", "前板测试项");
|
||||
config.FRONT_CONFID_ITEM = settings.value("Labels/front_config_item", "前板配置项");
|
||||
config.INPUT_CONFIG_PARA = settings.value("Labels/input_config_para", "请输入配置参数...");
|
||||
config.BACK_TEST_ITEM = settings.value("Labels/back_test_item", "后板测试项");
|
||||
config.BACK_CONFID_ITEM = settings.value("Labels/back_config_item", "后板配置项");
|
||||
config.IMAGE_DISPLAY_TAB = settings.value("Labels/image_display_tab", "图像显示区");
|
||||
config.VIDEO_DISPLAY_TAB = settings.value("Labels/video_display_tab", "视频显示区");
|
||||
config.LEFT_LENS = settings.value("Labels/left_lens", "左边镜头");
|
||||
config.RIGHT_LENS = settings.value("Labels/right_lens", "右边镜头");
|
||||
config.CAT_EYE_LENS_RGB = settings.value("Labels/cat_eye_lens_rgb", "猫眼镜头(RGB)");
|
||||
config.CAT_EYE_LENS_IR = settings.value("Labels/cat_eye_lens_ir", "猫眼镜头(IR)");
|
||||
config.BIG_WINDOW_PRE_VIDEO = settings.value("Labels/big_window_pre_video", "大窗口播放视频");
|
||||
config.RESOLUTION_EDIT = settings.value("Labels/resolution_edit", "分辨率:");
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
QGroupBox* MainWidget::createLicenseGroupBox()
|
||||
{
|
||||
QGroupBox* groupBox = new QGroupBox(QString(FRONT_TUYU_LICENSE), this);
|
||||
QGroupBox* groupBox = new QGroupBox(TOOL_UI.FRONT_TUYU_LICENSE, this);
|
||||
QHBoxLayout* buttonRowLayout = new QHBoxLayout;
|
||||
|
||||
for (int i = 0; i < frontBoardLicenseJson.size(); ++i) {
|
||||
@@ -29,7 +102,7 @@ QGroupBox* MainWidget::createLicenseGroupBox()
|
||||
|
||||
QGroupBox* MainWidget::createFrontDeviceInfoGroupBox()
|
||||
{
|
||||
QGroupBox* frontDeviceInfoGroupBox = new QGroupBox(QString(FRONT_DEVICE_INFO), this);
|
||||
QGroupBox* frontDeviceInfoGroupBox = new QGroupBox(TOOL_UI.FRONT_DEVICE_INFO, this);
|
||||
QFormLayout* formLayout = new QFormLayout(frontDeviceInfoGroupBox);
|
||||
for (const QJsonValue& value : frontBoardDevInfoJson) {
|
||||
QJsonObject item = value.toObject();
|
||||
@@ -47,7 +120,7 @@ QGroupBox* MainWidget::createFrontDeviceInfoGroupBox()
|
||||
|
||||
QGroupBox* MainWidget::createBackDeviceInfoGroupBox()
|
||||
{
|
||||
QGroupBox* backDeviceInfoGroupBox = new QGroupBox(QString(BACK_DEVICE_INFO), this);
|
||||
QGroupBox* backDeviceInfoGroupBox = new QGroupBox(TOOL_UI.BACK_DEVICE_INFO, this);
|
||||
QFormLayout* formLayout = new QFormLayout(backDeviceInfoGroupBox);
|
||||
for (const QJsonValue& value : backBoardDevInfoJson) {
|
||||
QJsonObject item = value.toObject();
|
||||
@@ -65,7 +138,7 @@ QGroupBox* MainWidget::createBackDeviceInfoGroupBox()
|
||||
|
||||
QGroupBox* MainWidget::createBackConnectServerGroupBox()
|
||||
{
|
||||
QGroupBox* BackConnectServerGroupBox = new QGroupBox(QString(BACK_GET_UUID_SN), this);
|
||||
QGroupBox* BackConnectServerGroupBox = new QGroupBox(TOOL_UI.BACK_GET_UUID_SN, this);
|
||||
QHBoxLayout* frontDeviceInfoLayout = new QHBoxLayout;
|
||||
|
||||
for (int i = 0; i < backBoardUuidJson.size(); ++i) {
|
||||
@@ -137,11 +210,11 @@ QWidget* MainWidget::createFunctionConfigTab(const QJsonArray& BoardFuncConfig,
|
||||
QWidget* functionConfigTab = new QWidget(this);
|
||||
QVBoxLayout* functionConfigLayout = new QVBoxLayout(functionConfigTab);
|
||||
if (propertyName == "frontBoardFuncConfig") {
|
||||
frontFuncConfigLineEdit->setPlaceholderText(QString(INPUT_CONFIG_PARA));
|
||||
frontFuncConfigLineEdit->setPlaceholderText(TOOL_UI.INPUT_CONFIG_PARA);
|
||||
functionConfigLayout->addWidget(frontFuncConfigLineEdit);
|
||||
}
|
||||
else if (propertyName == "backBoardFuncConfig") {
|
||||
backFuncConfigLineEdit->setPlaceholderText(QString(INPUT_CONFIG_PARA));
|
||||
backFuncConfigLineEdit->setPlaceholderText(TOOL_UI.INPUT_CONFIG_PARA);
|
||||
functionConfigLayout->addWidget(backFuncConfigLineEdit);
|
||||
}
|
||||
|
||||
@@ -193,7 +266,7 @@ QWidget* MainWidget::createImageDisplayTab(QLabel* leftLensLabel, QLabel* rightL
|
||||
for (int j = 0; j < 2; ++j) {
|
||||
QPushButton* button;
|
||||
if (i == 0 && j == 0) {
|
||||
button = new QPushButton(QString(LEFT_LENS), this);
|
||||
button = new QPushButton(TOOL_UI.LEFT_LENS, this);
|
||||
button->setFixedSize(73, 50);
|
||||
imageButtonsRowLayout->addWidget(button);
|
||||
button->setProperty("getPicIndex", i * 2 + j);
|
||||
@@ -202,7 +275,7 @@ QWidget* MainWidget::createImageDisplayTab(QLabel* leftLensLabel, QLabel* rightL
|
||||
continue;
|
||||
}
|
||||
else if (i == 0 && j == 1) {
|
||||
button = new QPushButton(QString(RIGHT_LENS), this);
|
||||
button = new QPushButton(TOOL_UI.RIGHT_LENS, this);
|
||||
button->setFixedSize(73, 50);
|
||||
imageButtonsRowLayout->addWidget(button);
|
||||
button->setProperty("getPicIndex", i * 2 + j);
|
||||
@@ -210,7 +283,6 @@ QWidget* MainWidget::createImageDisplayTab(QLabel* leftLensLabel, QLabel* rightL
|
||||
getPicButtons.append(button);
|
||||
continue;
|
||||
}
|
||||
|
||||
button = new QPushButton(QString("Device %1\n取图").arg(i * 2 + j - 1), this);
|
||||
button->setFixedSize(73, 50);
|
||||
imageButtonsRowLayout->addWidget(button);
|
||||
@@ -244,13 +316,13 @@ QWidget* MainWidget::createVideoDisplayTab(QLabel* video_Label, QLineEdit* Video
|
||||
QVBoxLayout* videoButtonsColumnLayout = new QVBoxLayout;
|
||||
|
||||
const char* videoIndexProperty;
|
||||
if (tabName == QString(FRONT_BOARD_NAME)) {
|
||||
if (tabName == TOOL_UI.FRONT_BOARD_NAME) {
|
||||
videoIndexProperty = FRONT_BOARD_VIDEO_BUTTON_INDEX_PROPERTY;
|
||||
}
|
||||
else if (tabName == QString(BACK_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.BACK_BOARD_NAME) {
|
||||
videoIndexProperty = BACK_BOARD_VIDEO_BUTTON_INDEX_PROPERTY;
|
||||
}
|
||||
else if(tabName == QString(ALL_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.ALL_BOARD_NAME) {
|
||||
videoIndexProperty = ALL_BOARD_VIDEO_BUTTON_INDEX_PROPERTY;
|
||||
}
|
||||
|
||||
@@ -261,94 +333,93 @@ QWidget* MainWidget::createVideoDisplayTab(QLabel* video_Label, QLineEdit* Video
|
||||
QPushButton* button;
|
||||
|
||||
if (i == 0 && j == 0) {
|
||||
button = new QPushButton(QString(CAT_EYE_LENS_IR), this);
|
||||
button = new QPushButton(TOOL_UI.CAT_EYE_LENS_IR, this);
|
||||
button->setFixedSize(110, 50);
|
||||
videoButtonsRowLayout->addWidget(button);
|
||||
button->setProperty(videoIndexProperty, i * 2 + j);
|
||||
connect(button, &QPushButton::clicked, this, &MainWidget::onSendGetVideoClicked);
|
||||
if (tabName == QString(FRONT_BOARD_NAME)) {
|
||||
if (tabName == TOOL_UI.FRONT_BOARD_NAME) {
|
||||
getVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(BACK_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.BACK_BOARD_NAME) {
|
||||
getBackVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(ALL_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.ALL_BOARD_NAME) {
|
||||
getAllVideoButtons.append(button);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (i == 0 && j == 1) {
|
||||
button = new QPushButton(QString(CAT_EYE_LENS_RGB), this);
|
||||
button = new QPushButton(TOOL_UI.CAT_EYE_LENS_RGB, this);
|
||||
button->setFixedSize(110, 50);
|
||||
videoButtonsRowLayout->addWidget(button);
|
||||
button->setProperty(videoIndexProperty, i * 2 + j);
|
||||
connect(button, &QPushButton::clicked, this, &MainWidget::onSendGetVideoClicked);
|
||||
if (tabName == QString(FRONT_BOARD_NAME)) {
|
||||
if (tabName == TOOL_UI.FRONT_BOARD_NAME) {
|
||||
getVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(BACK_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.BACK_BOARD_NAME) {
|
||||
getBackVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(ALL_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.ALL_BOARD_NAME) {
|
||||
getAllVideoButtons.append(button);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (tabName != QString(BACK_BOARD_NAME)) {
|
||||
if (tabName != TOOL_UI.BACK_BOARD_NAME) {
|
||||
if (i == 1 && j == 0) {
|
||||
button = new QPushButton(QString(LEFT_LENS), this);
|
||||
button = new QPushButton(TOOL_UI.LEFT_LENS, this);
|
||||
button->setFixedSize(110, 50);
|
||||
videoButtonsRowLayout->addWidget(button);
|
||||
button->setProperty(videoIndexProperty, i * 2 + j);
|
||||
connect(button, &QPushButton::clicked, this, &MainWidget::onSendGetVideoClicked);
|
||||
if (tabName == QString(FRONT_BOARD_NAME)) {
|
||||
if (tabName == TOOL_UI.FRONT_BOARD_NAME) {
|
||||
getVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(BACK_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.BACK_BOARD_NAME) {
|
||||
getBackVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(ALL_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.ALL_BOARD_NAME) {
|
||||
getAllVideoButtons.append(button);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (i == 1 && j == 1) {
|
||||
button = new QPushButton(QString(RIGHT_LENS), this);
|
||||
button = new QPushButton(TOOL_UI.RIGHT_LENS, this);
|
||||
button->setFixedSize(110, 50);
|
||||
videoButtonsRowLayout->addWidget(button);
|
||||
button->setProperty(videoIndexProperty, i * 2 + j);
|
||||
connect(button, &QPushButton::clicked, this, &MainWidget::onSendGetVideoClicked);
|
||||
if (tabName == QString(FRONT_BOARD_NAME)) {
|
||||
if (tabName == TOOL_UI.FRONT_BOARD_NAME) {
|
||||
getVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(BACK_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.BACK_BOARD_NAME) {
|
||||
getBackVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(ALL_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.ALL_BOARD_NAME) {
|
||||
getAllVideoButtons.append(button);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (i == 2 && j == 0) {
|
||||
button = new QPushButton(QString(BIG_WINDOW_PRE_VIDEO), this);
|
||||
button = new QPushButton(TOOL_UI.BIG_WINDOW_PRE_VIDEO, this);
|
||||
button->setFixedSize(224, 50);
|
||||
button->setEnabled(false);
|
||||
videoButtonsRowLayout->addWidget(button);
|
||||
button->setProperty(videoIndexProperty, i * 2 + j);
|
||||
connect(button, &QPushButton::clicked, this, &MainWidget::onOpenFocusWindowClicked);
|
||||
if (tabName == QString(FRONT_BOARD_NAME)) {
|
||||
if (tabName == TOOL_UI.FRONT_BOARD_NAME) {
|
||||
getVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(BACK_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.BACK_BOARD_NAME) {
|
||||
getBackVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(ALL_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.ALL_BOARD_NAME) {
|
||||
getAllVideoButtons.append(button);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (i >= 3 && i <= 5) {
|
||||
if (j == 0)
|
||||
button = new QPushButton(QString("Device %1\n打开视频").arg(i - 2), this);
|
||||
@@ -363,13 +434,13 @@ QWidget* MainWidget::createVideoDisplayTab(QLabel* video_Label, QLineEdit* Video
|
||||
videoButtonsRowLayout->addWidget(button);
|
||||
button->setProperty(videoIndexProperty, i * 2 + j + 1);
|
||||
connect(button, &QPushButton::clicked, this, &MainWidget::onSendGetVideoClicked);
|
||||
if (tabName == QString(FRONT_BOARD_NAME)) {
|
||||
if (tabName == TOOL_UI.FRONT_BOARD_NAME) {
|
||||
getVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(BACK_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.BACK_BOARD_NAME) {
|
||||
getBackVideoButtons.append(button);
|
||||
}
|
||||
else if (tabName == QString(ALL_BOARD_NAME)) {
|
||||
else if (tabName == TOOL_UI.ALL_BOARD_NAME) {
|
||||
getAllVideoButtons.append(button);
|
||||
}
|
||||
}
|
||||
@@ -378,7 +449,7 @@ QWidget* MainWidget::createVideoDisplayTab(QLabel* video_Label, QLineEdit* Video
|
||||
|
||||
QHBoxLayout* videoAndButtonsLayout = new QHBoxLayout;
|
||||
QFormLayout* formLayout = new QFormLayout;
|
||||
QLabel* VideoResolution = new QLabel(QString(RESOLUTION_EDIT));
|
||||
QLabel* VideoResolution = new QLabel(TOOL_UI.RESOLUTION_EDIT);
|
||||
VideoResolutionEdit_type->setFixedWidth(120);
|
||||
formLayout->addRow(VideoResolution, VideoResolutionEdit_type);
|
||||
video_Label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
@@ -429,8 +500,8 @@ void MainWidget::addAllDeviceAreaTab(QTabWidget* mainTabWidget, const QString& t
|
||||
QLineEdit* VideoResolutionEdit_type)
|
||||
{
|
||||
QHBoxLayout* groupBoxLayout = new QHBoxLayout;
|
||||
QGroupBox* allDeviceInfoGroupBox = new QGroupBox(QString(ALL_BOARD), this);
|
||||
QGroupBox* allProductInfoGroupBox = new QGroupBox(QString(ALL_PRODUCT_INFO), this);
|
||||
QGroupBox* allDeviceInfoGroupBox = new QGroupBox(TOOL_UI.ALL_DEVICE_INFO, this);
|
||||
QGroupBox* allProductInfoGroupBox = new QGroupBox(TOOL_UI.ALL_PRODUCT_INFO, this);
|
||||
QFormLayout* formLayout = new QFormLayout(allProductInfoGroupBox);
|
||||
for (const QJsonValue& value : factoryProductInfo) {
|
||||
QJsonObject item = value.toObject();
|
||||
@@ -458,12 +529,12 @@ QTabWidget* MainWidget::createMediaTabWidget(QLabel* leftLensLabel, QLabel* righ
|
||||
QLineEdit* VideoResolutionEdit_type, const QString& tabName)
|
||||
{
|
||||
QTabWidget* tabWidget_media = new QTabWidget(this);
|
||||
if (tabName != QString(BACK_BOARD_NAME)){
|
||||
if (tabName != TOOL_UI.BACK_BOARD_NAME) {
|
||||
QWidget* imageDisplayTab = createImageDisplayTab(leftLensLabel, rightLensLabel);
|
||||
tabWidget_media->addTab(imageDisplayTab, IMAGE_DISPLAY_TAB);
|
||||
tabWidget_media->addTab(imageDisplayTab, TOOL_UI.IMAGE_DISPLAY_TAB);
|
||||
}
|
||||
QWidget* videoDisplayTab = createVideoDisplayTab(video_Label, VideoResolutionEdit_type, tabName);
|
||||
tabWidget_media->addTab(videoDisplayTab, VIDEO_DISPLAY_TAB);
|
||||
tabWidget_media->addTab(videoDisplayTab, TOOL_UI.VIDEO_DISPLAY_TAB);
|
||||
|
||||
return tabWidget_media;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user