1.增加整机测试工厂信息输入; 2. 增加前后板连接后自动发送获取设备版本信息指令; 3. 优化UI布局代码
This commit is contained in:
@@ -28,12 +28,15 @@
|
||||
#define YUV420 1
|
||||
#define YUV422 2
|
||||
|
||||
#define BACK_MAC_ADDRESS_LEN 11
|
||||
|
||||
class DataHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DataHandler(QLabel* videoLabel, QLineEdit* VideoResolutionEdit, QSize labelSize, QMap<QString, QLineEdit*>* devInfoLineEdits,
|
||||
explicit DataHandler(QLabel* videoLabel, QLabel* video_Label_back, QLineEdit* VideoResolutionEdit, QLineEdit* VideoResolutionEdit_back,
|
||||
QSize labelSize, QMap<QString, QLineEdit*>* devInfoLineEdits, int isBackBoardOrAllBoard,
|
||||
QJsonArray frontBoardOneClickTest, QJsonArray frontBoardTest, QJsonArray frontBoardFuncConfig,
|
||||
QJsonArray frontBoardDevInfoJson, QJsonArray frontBoardLicenseJson,
|
||||
QJsonArray backBoardOneClickTest, QJsonArray backBoardTest, QJsonArray backBoardFuncConfig,
|
||||
@@ -46,14 +49,14 @@ public slots:
|
||||
int currentRecvFuncItemIndex, const QString& itemData, const QString& funcItemData,
|
||||
const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
signals:
|
||||
void statusUpdated(const QString& clientAddress, int currentItemIndex, int currentFuncItemIndex,
|
||||
bool success, const QString& currentItemLabel, const QString& currentFuncItemLabel,
|
||||
const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
void statusUpdated(const QString& clientAddress, bool success, const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
void updateLicenseHwInfoEdit(const QString& text);
|
||||
void updateUuidHwInfoEdit(const QString& text);
|
||||
void updateLeftLensImage(const QPixmap& pixmap);
|
||||
void updateRightLensImage(const QPixmap& pixmap);
|
||||
void updateVideoLabel(const QPixmap& pixmap);
|
||||
void updateVideoResolution(const QString& resolutionText);
|
||||
void picRecvFinished();
|
||||
private:
|
||||
QJsonArray frontBoardOneClickTest; // 前板一键功能测试 JSON
|
||||
QJsonArray frontBoardTest; // 前板单项测试 JSON
|
||||
@@ -71,12 +74,15 @@ private:
|
||||
//QLabel* leftLens_m_imageLabel;
|
||||
//QLabel* rightLens_m_imageLabel;
|
||||
QLabel* videoLabel;
|
||||
QLineEdit* VideoResolutionEdit;
|
||||
QLabel* video_Label_back;
|
||||
QLineEdit* VideoResolutionEdit;
|
||||
QLineEdit* VideoResolutionEdit_back;
|
||||
//QTextEdit* licenseHwInfoEdit;
|
||||
QByteArray allRecvData; // 完整的一帧数据
|
||||
int remain = 0;
|
||||
int start_run = 0;
|
||||
long dataLen = 0;
|
||||
int isBackBoardOrAllBoard = 0;
|
||||
FFmpegDecoder* ffmpegDecoder;
|
||||
QByteArray* buffer;
|
||||
QByteArray* picBuffer;
|
||||
@@ -84,15 +90,16 @@ private:
|
||||
QMap<QString, QLineEdit*>* devInfoLineEdits;
|
||||
QMap<int, QString> msgIdToCmdMap;
|
||||
QSize labelSize;
|
||||
bool isStartVideo = false;
|
||||
|
||||
// 如果接收十六进制数据,转为二进制
|
||||
QByteArray hexStringToByteArray(const QString& hexString);
|
||||
void showVideo(const QString& client, const QByteArray& valData);
|
||||
void clearAllRecvData();
|
||||
void handleCmd(int msg_id, const QString& client, QByteArray actual_data);
|
||||
void handleFrontCmd(int msg_id, const QString& client, QByteArray actual_data);
|
||||
void handleCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
void handleFrontCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
void handleDevInfo(int msg_id, const QString& client, QByteArray actual_data);
|
||||
void handleBackCmd(int msg_id, const QString& client, QByteArray actual_data);
|
||||
void handleBackCmd(int msg_id, const QString& client, QByteArray actual_data, const QJsonArray& jsonArray, int itemJsonIndex);
|
||||
void initializeMsgIdToCmdMap();
|
||||
void updateLineEdit(int msg_id, const QByteArray& actual_data);
|
||||
void showPic(QSize labelSize, int lens_n,
|
||||
|
||||
Reference in New Issue
Block a user