2024-01-18 15:41:43 +08:00
|
|
|
#ifndef WIDG_H
|
|
|
|
#define WIDG_H
|
|
|
|
|
2024-03-04 16:22:40 +08:00
|
|
|
#include "Channel.h"
|
2024-01-18 15:41:43 +08:00
|
|
|
#include "Menu.h"
|
2024-01-25 09:57:08 +08:00
|
|
|
#include "ProgressBar.h"
|
|
|
|
#include <QDir>
|
2024-01-18 15:41:43 +08:00
|
|
|
#include <QMap>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class Widget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Widget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit Widget(QWidget* parent = 0);
|
|
|
|
~Widget();
|
|
|
|
|
2024-08-12 11:26:42 +08:00
|
|
|
signals:
|
|
|
|
void needPlayVideo(QString types);
|
2024-01-18 15:41:43 +08:00
|
|
|
|
|
|
|
private slots:
|
2024-01-25 09:57:08 +08:00
|
|
|
void onProgressTimeout();
|
|
|
|
void onPlayEnd();
|
2024-03-04 16:22:40 +08:00
|
|
|
void onShowRecordLabel(bool show);
|
2024-08-12 11:26:42 +08:00
|
|
|
|
|
|
|
// 按键操作。上下左右确认返回
|
|
|
|
void onBtnMenuClicked();
|
|
|
|
void onBtnUpClicked();
|
|
|
|
void onBtnDownClicked();
|
|
|
|
void onBtnLeftClicked();
|
|
|
|
void onBtnRightClicked();
|
|
|
|
void onBtnConfirmClicked();
|
2024-05-07 15:06:36 +08:00
|
|
|
void onBtnReturnClicked();
|
2024-08-22 15:29:39 +08:00
|
|
|
void onBtnVolumnUpClicked();
|
|
|
|
void onBtnVolumnDownClicked();
|
2024-08-12 11:26:42 +08:00
|
|
|
|
|
|
|
// 播放视频
|
|
|
|
void onBtnVideoClicked(QString filename);
|
2024-05-07 15:06:36 +08:00
|
|
|
|
2024-01-18 15:41:43 +08:00
|
|
|
private:
|
|
|
|
Ui::Widget* ui;
|
|
|
|
|
2024-01-25 09:57:08 +08:00
|
|
|
QTimer* progressTimer;
|
2024-01-18 15:41:43 +08:00
|
|
|
bool isPlayback = false;
|
|
|
|
Menu* menu;
|
|
|
|
|
|
|
|
private:
|
2024-03-04 16:22:40 +08:00
|
|
|
void seek(QString type);
|
2024-08-12 11:26:42 +08:00
|
|
|
void playOneChannel(QString filename);
|
|
|
|
void playTwoChannels(QString filename);
|
2024-03-04 16:22:40 +08:00
|
|
|
Channel* findChannelByName(QString name);
|
|
|
|
};
|
2024-01-25 09:57:08 +08:00
|
|
|
|
2024-01-18 15:41:43 +08:00
|
|
|
#endif // WIDG_H
|