添加OpenCv
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
#define P10_INTELLIGENTPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPixmap>
|
||||
#include <QTimer>
|
||||
#include <QEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <PublicFunctions/RtspPlayer.h> // 引入RTSP播放器头文件
|
||||
#include <GlobalDefinitions/Variable.h>
|
||||
|
||||
namespace Ui {
|
||||
class P10_IntelligentPage;
|
||||
@@ -14,9 +20,38 @@ class P10_IntelligentPage : public QWidget
|
||||
public:
|
||||
explicit P10_IntelligentPage(QWidget *parent = nullptr);
|
||||
~P10_IntelligentPage();
|
||||
void setRtspUrl(const QString &url); // 设置RTSP地址接口
|
||||
void WinInit(); // 初始化界面与逻辑
|
||||
|
||||
private slots:
|
||||
void onFrameReady(const QImage &frame); // 接收新视频帧并显示
|
||||
void onErrorOccurred(const QString &msg); // 接收错误信息并提示
|
||||
|
||||
// 按钮点击事件(UI自动关联,需确保.ui文件中按钮对象名一致)
|
||||
void on_But_Atlas_1_clicked(); // 切换摄像头1
|
||||
void on_But_Atlas_2_clicked(); // 切换摄像头2
|
||||
void on_But_Atlas_3_clicked(); // 暂停/继续播放
|
||||
void on_But_Magnify_clicked(); // 图像放大
|
||||
void on_But_Reduce_clicked(); // 图像缩小
|
||||
|
||||
private:
|
||||
Ui::P10_IntelligentPage *ui;
|
||||
|
||||
// 事件过滤器(处理鼠标拖拽平移)
|
||||
bool eventFilter(QObject *obj, QEvent *ev) override;
|
||||
|
||||
/* 图像尺寸与缩放参数 */
|
||||
uint32_t Img_W = 0; // 图像原始宽度
|
||||
uint32_t Img_H = 0; // 图像原始高度
|
||||
float Img_Zoom = 1.0f; // 缩放比例(默认100%)
|
||||
|
||||
/* 鼠标拖拽参数 */
|
||||
QPoint dragStart; // 拖拽起始点
|
||||
bool dragging = false; // 拖拽状态标记
|
||||
|
||||
/* RTSP播放相关 */
|
||||
RtspPlayer *m_rtspPlayer; // RTSP播放器实例
|
||||
QString m_rtspUrl; // 当前使用的RTSP地址
|
||||
};
|
||||
|
||||
#endif // P10_INTELLIGENTPAGE_H
|
||||
|
||||
Reference in New Issue
Block a user