+ QWidget::mousePressEvent(event);
+
+ if(event->button() == Qt::RightButton)
+ emit rightClicked();
+}
+
+void VideoAreaWidget::dragEnterEvent(QDragEnterEvent *event) {
+ // qDebug() << event->mimeData()->formats();
+ if (event->mimeData()->hasFormat("application/x-minitube-video")) {
+ event->acceptProposedAction();
+ }
+}
+
+void VideoAreaWidget::dropEvent(QDropEvent *event) {
+
+ const VideoMimeData* videoMimeData = dynamic_cast<const VideoMimeData*>( event->mimeData() );
+ if(!videoMimeData ) return;
+
+ QList<Video*> droppedVideos = videoMimeData->videos();
+ if (droppedVideos.isEmpty())
+ return;
+ Video *video = droppedVideos.first();
+ int row = listModel->rowForVideo(video);
+ if (row != -1)
+ listModel->setActiveRow(row);
+ event->acceptProposedAction();
+}
+
+void VideoAreaWidget::mouseMoveEvent(QMouseEvent *event) {
+ QWidget::mouseMoveEvent(event);
+
+ QWidget* mainWindow = window();
+ if (!mainWindow->isFullScreen()) return;
+
+ // qDebug() << "VideoAreaWidget::mouseMoveEvent" << event->pos();
+
+ const int x = event->pos().x();
+ const int y = event->pos().y();
+
+ bool visible = y <= 0;
+ bool ret = QMetaObject::invokeMethod(mainWindow, "showFullscreenToolbar", Qt::DirectConnection, Q_ARG(bool, visible));
+ if (!ret) qDebug() << "showFullscreenToolbar invokeMethod failed";
+
+ visible = x <= 0;
+ ret = QMetaObject::invokeMethod(mainWindow, "showFullscreenPlaylist", Qt::DirectConnection, Q_ARG(bool, visible));
+ if (!ret) qDebug() << "showFullscreenPlaylist invokeMethod failed";