RecordControlApplication/Menu.h

55 lines
1.2 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);
public slots:
void move(Direction direction);
void confirm();
void clickVideo(QString type);
signals:
void btnHdmi1Checked();
void btnHdmi2Checked();
void btnVga1Checked();
void btnVga2Checked();
void btnVideoClicked(QString name);
void curChannelChanged(QString channel);
protected:
// 重写父类的方法,以获取当前界面的所有可以获取焦点的控件
QList<QWidget*> getAllFocusabelWidget() override;
private:
Ui::Menu* ui;
// 视频名数组列表
QList<DatabaseManager::File> contentList;
DatabaseManager* db;
DatabaseManager::Channel currentChannel;
QString currentFilename;
private:
void getContents();
void renderContents();
void renderComboBoxYear();
void renderComboBoxMonth();
void renderComboBoxDay();
};
#endif // WIDGET_H