RecordControlApplication/Widget.h

59 lines
1.1 KiB
C
Raw Normal View History

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"
#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:
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();
void onBtnReturnClicked();
void onBtnVolumnUpClicked();
void onBtnVolumnDownClicked();
2024-08-12 11:26:42 +08:00
// 播放视频
void onBtnVideoClicked(QString filename);
2024-01-18 15:41:43 +08:00
private:
Ui::Widget* ui;
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-18 15:41:43 +08:00
#endif // WIDG_H