#ifndef CATEGORIESVIEW_H
#define CATEGORIESVIEW_H
-#include <QtGui>
+#include <QtWidgets>
+
#include "view.h"
class VideoSource;
-class YTCategory;
+struct YTCategory;
class YTStandardFeed;
+class VideoSourceWidget;
-class StandardFeedsView : public QWidget, public View {
-
+class StandardFeedsView : public View {
Q_OBJECT
public:
protected:
void paintEvent(QPaintEvent *event);
-
+
private slots:
- void layoutCategories(const QList<YTCategory> &categories);
+ void layoutCategories(const QVector<YTCategory> &categories);
void selectWorldwideRegion();
void selectLocalRegion();
+ void removeVideoSourceWidget(VideoSourceWidget *videoSourceWidget);
private:
+ void resetLayout();
void addVideoSourceWidget(VideoSource *videoSource);
- QList<YTStandardFeed*> getMainFeeds();
- YTStandardFeed* buildStardardFeed(QString feedId, QString label, QString time = QString());
+ void loadNextPreview(VideoSourceWidget *previous = nullptr);
+
+ YTStandardFeed *
+ buildStandardFeed(const QString &feedId, const QString &label, QString time = QString());
QGridLayout *layout;
-
+ QVector<VideoSourceWidget *> sourceWidgets;
};
#endif // CATEGORIESVIEW_H