]> git.sur5r.net Git - minitube/blob - src/videoareawidget.h
Merge commit 'minitube/master'
[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 setListModel(ListModel *listModel) {
21         this->listModel = listModel;
22     }
23
24 signals:
25     void doubleClicked();
26     void rightClicked();
27
28 protected:
29     void mouseDoubleClickEvent(QMouseEvent *event);
30     void mousePressEvent(QMouseEvent *event);
31     void dragEnterEvent(QDragEnterEvent *event);
32     void dropEvent(QDropEvent *event);
33
34 private:
35     QStackedLayout *stackedLayout;
36     QWidget *videoWidget;
37     LoadingWidget *loadingWidget;
38     ListModel *listModel;
39     QLabel *messageLabel;
40
41 };
42
43 #endif // VIDEOAREAWIDGET_H