RecordControlApplication/Widget.h
2024-08-11 20:26:42 -07:00

63 lines
1.2 KiB
C++
Executable File

#ifndef WIDG_H
#define WIDG_H
#include "Channel.h"
#include "Menu.h"
#include "Message.h"
#include "ProgressBar.h"
#include <QDir>
#include <QMap>
#include <QTimer>
#include <QWidget>
namespace Ui {
class Widget;
}
class Widget : public QWidget {
Q_OBJECT
public:
explicit Widget(QWidget* parent = 0);
~Widget();
signals:
void needPlayVideo(QString types);
private slots:
void onProgressTimeout();
void onPlayEnd();
void onShowRecordLabel(bool show);
// 按键操作。上下左右确认返回
void onBtnMenuClicked();
void onBtnUpClicked();
void onBtnDownClicked();
void onBtnLeftClicked();
void onBtnRightClicked();
void onBtnConfirmClicked();
void onBtnReturnClicked();
// 播放视频
void onBtnVideoClicked(QString filename);
void onCurChannelChanged(QString channel);
private:
Ui::Widget* ui;
QTimer* progressTimer;
bool isPlayback = false;
QString curPlayChannel;
QString curSelectChannel;
QString curPlayFilename;
Menu* menu;
private:
void seek(QString type);
void playOneChannel(QString filename);
void playTwoChannels(QString filename);
Channel* findChannelByName(QString name);
};
#endif // WIDG_H