]> git.sur5r.net Git - minitube/blobdiff - src/standardfeedsview.h
Upload 3.9.3-2 to unstable
[minitube] / src / standardfeedsview.h
index 1d5214351fe9059ab3f267e047ca648490955582..1070cab00c855cf48b8055ba08c926ed5f097ef0 100644 (file)
@@ -21,15 +21,16 @@ $END_LICENSE */
 #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:
@@ -45,18 +46,22 @@ public slots:
 
 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