qt_demoe/video/videopanel/videobox.h

121 lines
3.2 KiB
C
Raw Normal View History

2021-11-09 12:39:42 +00:00
#ifndef VIDEOBOX_H
#define VIDEOBOX_H
/**
* :feiyangqingyun(QQ:517216493) 2021-11-08
* 1.
2023-07-15 00:58:15 +00:00
* 2. 便100/255
2021-11-09 12:39:42 +00:00
* 3.
* 4.
* 5.
* 6.
* 7.
*/
#include <QObject>
#include <QWidget>
#include <QMap>
class QMenu;
class QWidget;
class QGridLayout;
#ifdef quc
class Q_DECL_EXPORT VideoBox : public QObject
#else
class VideoBox : public QObject
#endif
{
Q_OBJECT
public:
explicit VideoBox(QObject *parent = 0);
private:
//表格布局存放通道
QGridLayout *gridLayout;
//视频控件集合
QWidgetList widgets;
//通道数量
int videoCount;
//当前画面类型
QString videoType;
2023-07-15 00:58:15 +00:00
//启用其他通道画面(2画面/3画面)
bool enableOther;
2021-11-09 12:39:42 +00:00
//主菜单子菜单文字标识
QString menuFlag;
QString actionFlag;
//布局方案标识集合
2023-12-06 11:15:52 +00:00
QMap<QString, QStringList> types;
void addMenu(QMenu *menu, const QString &type);
2021-11-09 12:39:42 +00:00
public Q_SLOTS:
2023-12-06 11:15:52 +00:00
//获取和设置当前画面类型
QString getVideoType() const;
2021-11-09 12:39:42 +00:00
void setVideoType(const QString &videoType);
2023-12-06 11:15:52 +00:00
//获取和设置视频控件集合
QWidgetList getWidgets() const;
2021-11-09 12:39:42 +00:00
void setWidgets(QWidgetList widgets);
2023-12-06 11:15:52 +00:00
//设置表格布局
void setLayout(QGridLayout *gridLayout);
2023-07-15 00:58:15 +00:00
//设置启用其他通道画面
void setEnableOther(bool enableOther);
2021-11-09 12:39:42 +00:00
//设置主菜单子菜单文字标识
void setMenuFlag(const QString &menuFlag);
void setActionFlag(const QString &actionFlag);
2023-12-06 11:15:52 +00:00
//设置菜单类型集合
void setTypes(const QMap<QString, QStringList> &types);
2021-11-09 12:39:42 +00:00
//初始化菜单
void initMenu(QMenu *menu, const QList<bool> &enable);
//通用设置函数
void show_video(int type, int index);
//菜单切换布局槽函数
void show_video();
//显示和隐藏所有通道
void show_video_all();
void hide_video_all();
//常规及异形通道布局
2023-12-06 11:15:52 +00:00
void change_video_normal(int index, int row, int column);
2021-11-09 12:39:42 +00:00
void change_video_custom(int index, int type);
2023-12-06 11:15:52 +00:00
//设置可见
void change_video_visible(int start, int end);
2021-11-09 12:39:42 +00:00
//异形布局
void change_video_6(const QList<int> &indexs);
void change_video_8(const QList<int> &indexs);
void change_video_13(const QList<int> &indexs);
//具体通道切换函数
void change_video_1(int index);
2023-07-15 00:58:15 +00:00
void change_video_2(int index);
void change_video_3(int index);
2021-11-09 12:39:42 +00:00
void change_video_4(int index);
void change_video_6(int index);
void change_video_8(int index);
void change_video_9(int index);
void change_video_13(int index);
void change_video_16(int index);
void change_video_25(int index);
void change_video_36(int index);
void change_video_64(int index);
Q_SIGNALS:
//画面布局切换信号
void changeVideo(int type, const QString &videoType, bool videoMax);
};
#endif // VIDEOBOX_H