From 709b20ef53f6e8f8276db4bab6a2bdfba2647ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=B6=85?= Date: Thu, 24 Oct 2024 17:32:07 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=88=E6=91=84=E5=83=8F=E5=A4=B4?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81=EF=BC=89=EF=BC=9A=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=91=84=E5=83=8F=E5=A4=B4=E7=99=BB=E5=BD=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HX_CameraLoopPlay/CameraLoopPlay.cpp | 10 ++++++++++ HX_CameraLoopPlay/CameraLoopPlay.h | 6 ++++++ HX_CameraLoopPlay/CameraThread.cpp | 1 + HX_CameraLoopPlay/CameraThread.h | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/HX_CameraLoopPlay/CameraLoopPlay.cpp b/HX_CameraLoopPlay/CameraLoopPlay.cpp index f6aeb28..35d83c2 100644 --- a/HX_CameraLoopPlay/CameraLoopPlay.cpp +++ b/HX_CameraLoopPlay/CameraLoopPlay.cpp @@ -35,6 +35,8 @@ CameraLoopPlay::CameraLoopPlay(QWidget* parent) connect(this, &CameraLoopPlay::realPlaySignal, m_cameraThread, &CameraThread::realPlay); connect(this, &CameraLoopPlay::stopReadPlaySignal, m_cameraThread, &CameraThread::stopRealPlay); + connect(m_cameraThread, &CameraThread::loginResultSignal, this, &CameraLoopPlay::loginResult); + m_cameraLoopThread->start(); calendarTimerUpdater(); @@ -119,6 +121,14 @@ void CameraLoopPlay::changeWindowNumber(int index) } } +void CameraLoopPlay::loginResult(int a, int b) +{ + if (a >= 0) { + m_treeCameraItemList[b]->setIcon( + QIcon(":/CameraLoopPlay/Resource/image/online.png")); + } +} + void CameraLoopPlay::addCameraWidgetToCameraFarmes(int rows, int cols) { // 清除已有的布局项 diff --git a/HX_CameraLoopPlay/CameraLoopPlay.h b/HX_CameraLoopPlay/CameraLoopPlay.h index 0ef84b0..7d02130 100644 --- a/HX_CameraLoopPlay/CameraLoopPlay.h +++ b/HX_CameraLoopPlay/CameraLoopPlay.h @@ -98,6 +98,12 @@ private slots: */ void changeWindowNumber(int index); + /** + * @brief ÉãÏñÍ·µÇ¼½á¹û. + * @author XuChao (xxu715737@163.com) + * @date 2024-10-24 + */ + void loginResult(int a, int b); private: diff --git a/HX_CameraLoopPlay/CameraThread.cpp b/HX_CameraLoopPlay/CameraThread.cpp index bc76b18..8b60595 100644 --- a/HX_CameraLoopPlay/CameraThread.cpp +++ b/HX_CameraLoopPlay/CameraThread.cpp @@ -51,6 +51,7 @@ void CameraThread::login(QString strIP, QString strUser, QString strPwd, int hWn HWNDlogin.insert(hWndIndex, loginId); iIpcStartChan.insert(hWndIndex, struDeviceInfoV40.struDeviceV30.byStartChan); + emit loginResultSignal(loginId, hWndIndex); } bool CameraThread::realPlay(HWND hWnd, int index) diff --git a/HX_CameraLoopPlay/CameraThread.h b/HX_CameraLoopPlay/CameraThread.h index 9fd7f44..c3ef629 100644 --- a/HX_CameraLoopPlay/CameraThread.h +++ b/HX_CameraLoopPlay/CameraThread.h @@ -22,7 +22,7 @@ public: ~CameraThread(); signals: - void loginResultSignal(long loginId, int iRealPlayHandle, int hWndIndex); + void loginResultSignal(long loginId, int iRealPlayHandle); public slots: /**