#ifndef WIDGET_H #define WIDGET_H #include "DatabaseManager.h" #include "FocusWindow.h" #include 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 getAllFocusabelWidget() override; private: Ui::Menu* ui; // 视频名数组列表 QList contentList; DatabaseManager* db; DatabaseManager::Channel currentChannel; QString currentFilename; private: void getContents(); void renderContents(); void renderComboBoxYear(); void renderComboBoxMonth(); void renderComboBoxDay(); }; #endif // WIDGET_H