1.增加整机测试工厂信息输入; 2. 增加前后板连接后自动发送获取设备版本信息指令; 3. 优化UI布局代码
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <QMessageAuthenticationCode>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "./UI_Widget/UI_Name.h"
|
||||
#include "../Json/readJsonFile.h"
|
||||
#include "../RecvDataHandler/RecvDataHandler.h"
|
||||
#include "../LicenseGenerate/LicenseGenerate.h"
|
||||
@@ -64,6 +65,9 @@
|
||||
#define START_MDNS 1
|
||||
#define FOCUS_WINDOWS_BUTTON 4 // 大窗口播放视频的按键编号
|
||||
#define TCP_CONNECT_PORT 12412 // TCP监听的端口
|
||||
#define GET_PIC_DATA_SIZE (480 * 640 * 1.5)
|
||||
|
||||
#define NEW_MAP 1
|
||||
|
||||
class MainWidget : public QWidget
|
||||
{
|
||||
@@ -105,9 +109,7 @@ private slots:
|
||||
// 处理数据接收信号
|
||||
//void onDataReceived(const QString& client, const QByteArray& data);
|
||||
// 处理状态更新信号
|
||||
void onStatusUpdated(const QString& client, int itemIndex, int funcItemIndex,
|
||||
bool success, const QString& itemData, const QString& funcItemData,
|
||||
const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
void onStatusUpdated(const QString& client, bool success, const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
// 处理所有项目处理完毕信号
|
||||
void onAllItemsProcessed(const QString& client, int itemsProcessedCount);
|
||||
// 处理客户端断开连接
|
||||
@@ -138,18 +140,34 @@ private:
|
||||
void readJsonConfig();
|
||||
// 设置 UI
|
||||
void setupUI();
|
||||
#if NEW_MAP
|
||||
void addDeviceAreaTab(QTabWidget* mainTabWidget, const QString& tabName,
|
||||
QGroupBox* deviceInfoGroupBox, QGroupBox* licenseGroupBox,
|
||||
const QJsonArray& boardTest, const QJsonArray& boardFuncConfig,
|
||||
const QString& boardTestName, const QString& boardFuncConfigName,
|
||||
const QString& boardTestTitle, const QString& boardConfigTitle,
|
||||
QLabel* leftLensLabel, QLabel* rightLensLabel, QLabel* videoLabel,
|
||||
QLineEdit* VideoResolutionEdit_type);
|
||||
void addAllDeviceAreaTab(QTabWidget* mainTabWidget, const QString& tabName,
|
||||
QLabel* leftLensLabel, QLabel* rightLensLabel, QLabel* videoLabel,
|
||||
QLineEdit* VideoResolutionEdit_type);
|
||||
QTabWidget* createMediaTabWidget(QLabel* leftLensLabel, QLabel* rightLensLabel, QLabel* videoLabel,
|
||||
QLineEdit* VideoResolutionEdit_type, const QString& tabName);
|
||||
|
||||
#endif
|
||||
QGroupBox* createLicenseGroupBox();
|
||||
QGroupBox* createFrontDeviceInfoGroupBox();
|
||||
QGroupBox* createBackDeviceInfoGroupBox();
|
||||
QWidget* createFunctionTestTab(const QJsonArray& BoardFuncTest, const QString& propertyName);
|
||||
QWidget* createFunctionConfigTab(const QJsonArray& BoardFuncConfig, const QString& propertyName);
|
||||
QWidget* createImageDisplayTab();
|
||||
QWidget* createVideoDisplayTab();
|
||||
QWidget* createImageDisplayTab(QLabel* leftLensLabel, QLabel* rightLensLabel);
|
||||
QWidget* createVideoDisplayTab(QLabel* videoLabel, QLineEdit* VideoResolutionEdit_type, const QString& tabName);
|
||||
QGroupBox* createBackConnectServerGroupBox();
|
||||
// 保存日志到文件
|
||||
void saveStatusListToFile(const QString& filePath);
|
||||
// 用于更新按键文本的函数
|
||||
void updateServerButtonText();
|
||||
void onHandleInvalidOperate(const QString& text);
|
||||
void onDisconnectClient(int clientId);
|
||||
void setupTimerForThreadPoolInfo();
|
||||
void sendDataToClient(int clientId, const QByteArray& data);
|
||||
@@ -172,6 +190,7 @@ private:
|
||||
QJsonArray backBoardFuncConfig; // 后板功能配置参数 JSON
|
||||
QJsonArray backBoardDevInfoJson; // 后板设备信息参数 JSON
|
||||
QJsonArray backBoardUuidJson; // 后板UUID JSON
|
||||
QJsonArray factoryProductInfo; // 整机:工厂生产信息
|
||||
QJsonArray testJsonConfig; // 功能测试区 JSON 配置
|
||||
QJsonArray funcJsonConfig; // 功能配置区 JSON 配置
|
||||
QJsonArray getDevInfoJson; // 获取设备信息 JSON 配置
|
||||
@@ -199,19 +218,30 @@ private:
|
||||
QVector<QPushButton*> funcItemButtons; // 功能配置项目按键集合
|
||||
QVector<QPushButton*> getPicButtons; // 保存两个取图的摄像头的按键的指针
|
||||
QVector<QPushButton*> getVideoButtons; // 保存拉视频设备的按键的指针
|
||||
QVector<QPushButton*> getBackVideoButtons;
|
||||
QVector<QPushButton*> getAllVideoButtons;
|
||||
QList<ClientHandler*> clients; // 客户端处理器集合
|
||||
QMap<int, QTimer*> clientTimers; // 每个客户端的定时器
|
||||
QMap<QString, QLineEdit*> devInfoLineEdits;// msg_id 和对应的 QLineEdit 的映射关系
|
||||
QMap<QString, QLineEdit*> productInfoLineEdits;
|
||||
|
||||
QCheckBox* saveCheckBox; // 保存文件复选框
|
||||
QPushButton* selectFileButton; // Save Log 按键
|
||||
QPushButton* clearLogButton; // clear Log 按键
|
||||
QLineEdit* filePathLineEdit; // 文件路径显示
|
||||
QLineEdit* VideoResolutionEdit; // 视频分辨率显示
|
||||
QLineEdit* VideoResolutionEdit_back; // 视频分辨率显示
|
||||
QLineEdit* VideoResolutionEdit_all; // 视频分辨率显示
|
||||
//QLineEdit* frameRateEdit; // 视频帧率显示
|
||||
QLabel* leftLens_imageLabel; // 左边镜头图像显示
|
||||
QLabel* rightLens_imageLabel; // 右边镜头图像显示
|
||||
QLabel* videoLabel; // 视频显示
|
||||
QLabel* leftLens_imageLabel; // 前板左边镜头图像显示
|
||||
QLabel* rightLens_imageLabel; // 前板右边镜头图像显示
|
||||
QLabel* leftLens_imageLabel_back; // 后板左边镜头图像显示
|
||||
QLabel* rightLens_imageLabel_back; // 后板右边镜头图像显示
|
||||
QLabel* leftLens_imageLabel_all; // 整机左边镜头图像显示
|
||||
QLabel* rightLens_imageLabel_all; // 整机右边镜头图像显示
|
||||
QLabel* videoLabel; // 前板视频显示
|
||||
QLabel* video_Label_back; // 后板视频显示
|
||||
QLabel* video_Label_all; // 整机视频显示
|
||||
QLineEdit* frontFuncConfigLineEdit; // 前板功能配置编辑框
|
||||
QLineEdit* backFuncConfigLineEdit; // 后板功能配置编辑框
|
||||
QTextEdit* licenseHwInfoEdit; // 获取license的硬件信息
|
||||
|
||||
Reference in New Issue
Block a user