代码拉取完成,页面将自动刷新
#pragma once
#include <QtWidgets/QMainWindow>
#include <QTimer>
#include "ui_XBMainWindow.h"
#include "videowindow.h"
#include "KeyBordWindow.h"
#include "MovieModel.h"
#include <QStringListModel>
#include <QListWidgetItem>
#include <QKeyEvent>
enum SELECT_LEVEL
{
TOP,
SUB,
EPSON
};
class XBMainWindow : public QMainWindow
{
Q_OBJECT
public:
XBMainWindow(QWidget* parent = Q_NULLPTR);
~XBMainWindow();
signals:
void showMovie(QString name);
void playMovie(QString videoName);
public slots:
void beginBtnClicked();
void updateListView(QString sub = "movie");
//void itemClicked(QModelIndex index);
protected:
void keyPressEvent(QKeyEvent* event);
private slots:
void on_listWidget_itemClicked(QListWidgetItem* item);
void on_listWidget_2_itemClicked(QListWidgetItem* item);
private:
void setSelectBtn(QPushButton* btn);
void setSelectItem(QListWidgetItem* item);
void setPlayItem(QListWidgetItem* item);
private:
QPushButton* selectBtn;
QListWidgetItem* selectItem;
QListWidgetItem* selectPlayItem;
QString videoPath;
QString video;
QStringList getFilePath(QString sub = "movie");
QList<QListWidgetItem*> items;
void changeChannel(QString channel);
Ui::XBMainWindowClass ui;
VideoWindow* m_videoWindow = nullptr;
QTimer* m_updateTimer;
KeyBordWindow* md_keybord = nullptr;
QStringListModel* model;
MovieModel* m_movieModel;
QVector<QVector<QString>> m_episode;
QVector<QString> m_movies;
QPushButton* activeBtn = NULL;
SELECT_LEVEL selectLevel;
#ifdef Q_OS_WIN
// const QString path = "D:\\dev\\data\\xiberry\\movie\\";
const QString path = "G:\\data\\video\\";
const QString sep = "\\";
#else
const QString sep = "/"
const QString path = "/home/pi/dev/data/xiberry/movie";
#endif
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。