]> git.sur5r.net Git - minitube/blobdiff - src/videosourcewidget.h
Drop custom compression options
[minitube] / src / videosourcewidget.h
index 22c7740d38682084701fb382bf97d9193baa6400..b6fda3a6a95f0d143f009f2f665d1851f760f85b 100644 (file)
@@ -21,7 +21,8 @@ $END_LICENSE */
 #ifndef VIDEOSOURCEWIDGET_H
 #define VIDEOSOURCEWIDGET_H
 
-#include <QtGui>
+#include <QtWidgets>
+
 #include "gridwidget.h"
 
 class Video;
@@ -33,23 +34,27 @@ class VideoSourceWidget : public GridWidget {
 
 public:
     VideoSourceWidget(VideoSource *videoSource, QWidget *parent = 0);
+    VideoSource *getVideoSource() { return videoSource; }
 
 signals:
     void activated(VideoSource *videoSource);
+    void unavailable(VideoSourceWidget *videoSourceWidget);
 
 protected:
     void paintEvent(QPaintEvent *event);
 
 private slots:
     void activate();
-    void previewVideo(QList<Video*> videos);
-    void setPixmapData(QByteArray bytes);
+    void previewVideo(const QVector<Video*> &videos);
+    void setPixmapData(const QByteArray &bytes);
 
 private:
+    void loadPreview();
+
     QPixmap playPixmap();
     VideoSource *videoSource;
     QPixmap pixmap;
-    Video *video;
+    qreal lastPixelRatio;
 
 };