RecordControlApplication/Menu.h

59 lines
1.5 KiB
C
Raw Normal View History

2024-08-12 11:26:42 +08:00
#ifndef WIDGET_H
#define WIDGET_H
#include "DatabaseManager.h"
#include "FocusWindow.h"
#include <QKeyEvent>
QT_BEGIN_NAMESPACE
namespace Ui {
class Menu;
}
QT_END_NAMESPACE
class Menu : public QWidget, public FW::FocusWindow {
Q_OBJECT
public:
Menu(QWidget* parent = nullptr);
~Menu();
void show();
void setChannelSelectVisible(bool visible);
DatabaseManager::Channel getCurPlayChannel();
2024-08-12 11:26:42 +08:00
public slots:
void move(Direction direction);
void confirm();
void clickPreOrNext(QString type);
void onAppendOneVideo(QString channelName);
2024-08-12 11:26:42 +08:00
signals:
void btnHdmi1Checked();
void btnHdmi2Checked();
void btnVga1Checked();
void btnVga2Checked();
void btnVideoClicked(QString name);
protected:
// 重写父类的方法,以获取当前界面的所有可以获取焦点的控件
QList<QWidget*> getAllFocusabelWidget() override;
private:
Ui::Menu* ui;
// 视频名数组列表
QList<DatabaseManager::File> contentList;
DatabaseManager* db;
QString curPlayFilename; // 当前正在回放的文件名
bool channelSelectVisible = false; // 是否显示通道选择,单通道回放显示、双通道不显示
DatabaseManager::Channel curSelectChannel; // 当前选择的通道
DatabaseManager::Channel curPlayChannel; // 当前回放的通道
2024-08-12 11:26:42 +08:00
private:
void getContents();
void renderContents();
void renderComboBoxYear();
void renderComboBoxMonth();
void renderComboBoxDay();
};
#endif // WIDGET_H