feat(摄像头登录状态):返回摄像头登录状态

This commit is contained in:
徐超 2024-10-24 17:32:07 +08:00
parent 3f1ffca856
commit 709b20ef53
4 changed files with 18 additions and 1 deletions

View File

@ -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)
{
// 清除已有的布局项

View File

@ -98,6 +98,12 @@ private slots:
*/
void changeWindowNumber(int index);
/**
* @brief <EFBFBD>.
* @author XuChao (xxu715737@163.com)
* @date 2024-10-24
*/
void loginResult(int a, int b);
private:

View File

@ -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)

View File

@ -22,7 +22,7 @@ public:
~CameraThread();
signals:
void loginResultSignal(long loginId, int iRealPlayHandle, int hWndIndex);
void loginResultSignal(long loginId, int iRealPlayHandle);
public slots:
/**