#ifndef WIDG_H #define WIDG_H #include "Channel.h" #include "Menu.h" #include "ProgressBar.h" #include #include #include #include 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 onBtnVolumnUpClicked(); void onBtnVolumnDownClicked(); // 播放视频 void onBtnVideoClicked(QString filename); private: Ui::Widget* ui; QTimer* progressTimer; bool isPlayback = false; Menu* menu; private: void seek(QString type); void playOneChannel(QString filename); void playTwoChannels(QString filename); Channel* findChannelByName(QString name); }; #endif // WIDG_H