]> git.sur5r.net Git - minitube/blob - src/videoareawidget.h
Clear video area before loading a new video
[minitube] / src / videoareawidget.h
1 #ifndef VIDEOAREAWIDGET_H
2 #define VIDEOAREAWIDGET_H
3
4 #include <QWidget>
5 #include "video.h"
6 #include "loadingwidget.h"
7 #include "ListModel.h"
8
9 class VideoAreaWidget : public QWidget {
10
11     Q_OBJECT
12
13 public:
14     VideoAreaWidget(QWidget *parent);
15     void setVideoWidget(QWidget *videoWidget);
16     void setLoadingWidget(LoadingWidget *loadingWidget);
17     void showLoading(Video* video);
18     void showVideo();
19     void showError(QString message);
20     void clear();
21     void setListModel(ListModel *listModel) {
22         this->listModel = listModel;
23     }
24
25 signals:
26     void doubleClicked();
27     void rightClicked();
28
29 protected:
30     void mouseDoubleClickEvent(QMouseEvent *event);
31     void mousePressEvent(QMouseEvent *event);
32     void dragEnterEvent(QDragEnterEvent *event);
33     void dropEvent(QDropEvent *event);
34
35 private:
36     QStackedLayout *stackedLayout;
37     QWidget *videoWidget;
38     LoadingWidget *loadingWidget;
39     ListModel *listModel;
40     QLabel *messageLabel;
41
42 };
43
44 #endif // VIDEOAREAWIDGET_H