]> git.sur5r.net Git - minitube/blobdiff - src/videoareawidget.h
Imported Upstream version 2.5.1
[minitube] / src / videoareawidget.h
index 3673f6913af2a3b8e8753aab0c5ac522d5f5ec33..866c9037d7e5c0c6821866855a6fe2e20359278a 100644 (file)
@@ -21,10 +21,15 @@ $END_LICENSE */
 #ifndef VIDEOAREAWIDGET_H
 #define VIDEOAREAWIDGET_H
 
-#include <QWidget>
-#include "video.h"
-#include "loadingwidget.h"
-#include "playlistmodel.h"
+#include <QtGui>
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#endif
+
+class Video;
+class LoadingWidget;
+class PlaylistModel;
+class SnapshotPreview;
 
 class VideoAreaWidget : public QWidget {
 
@@ -36,12 +41,14 @@ public:
     void setLoadingWidget(LoadingWidget *loadingWidget);
     void showLoading(Video* video);
     void showVideo();
-    void showError(QString message);
+    void showError(const QString &message);
     void clear();
     void setListModel(PlaylistModel *listModel) {
         this->listModel = listModel;
     }
-    // void showSnapshotPreview(QPixmap pixmap);
+#ifdef APP_SNAPSHOT
+    void showSnapshotPreview(const QPixmap &pixmap);
+#endif
     bool isVideoShown() { return stackedLayout->currentWidget() == videoWidget; }
 
 signals:
@@ -56,17 +63,23 @@ protected:
     void dropEvent(QDropEvent *event);
 
 private slots:
-    // void hideSnapshotPreview();
+#ifdef APP_SNAPSHOT
+    void hideSnapshotPreview();
+#endif
 
 private:
     QStackedLayout *stackedLayout;
     QWidget *videoWidget;
     LoadingWidget *loadingWidget;
+
+#ifdef APP_SNAPSHOT
+    SnapshotPreview *snapshotPreview;
+#endif
+
     PlaylistModel *listModel;
     QLabel *messageLabel;
-    // QLabel *snapshotPreview;
-    QPoint dragPosition;
 
+    QPoint dragPosition;
 };
 
 #endif // VIDEOAREAWIDGET_H