From bc43cd3f428137e3297bd621d52364b93dca19fd Mon Sep 17 00:00:00 2001 From: Georg Grabler Date: Sat, 5 Feb 2011 17:12:19 +0000 Subject: [PATCH] * Fixed a lot of cross-merging, ** up the branches before --- src/MainWindow.cpp | 12 ++++++++++-- src/MainWindow.h | 4 ++++ src/MediaView.cpp | 4 ---- src/MediaView.h | 1 - src/videoareawidget.cpp | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index c390bdc..6ca90e2 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -82,8 +82,6 @@ MainWindow::MainWindow() : SLOT(updateDownloadMessage(QString))); connect(DownloadManager::instance(), SIGNAL(finished()), SLOT(downloadsFinished())); - - this->setMouseTracking(true); } MainWindow::~MainWindow() { @@ -937,6 +935,16 @@ void MainWindow::toggleDefinitionMode() { setDefinitionMode(nextDefinition); } +void MainWindow::showFullscreenToolbar(bool show) { + if (!m_fullscreen) return; + mainToolBar->setVisible(show); +} + +void MainWindow::showFullscreenPlaylist(bool show) { + if (!m_fullscreen) return; + mediaView->setPlaylistVisible(show); +} + void MainWindow::clearRecentKeywords() { QSettings settings; settings.remove("recentKeywords"); diff --git a/src/MainWindow.h b/src/MainWindow.h index 34da611..5034df8 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -54,6 +54,10 @@ private slots: void volumeChanged(qreal newVolume); void volumeMutedChanged(bool muted); + // fullscreen toolbar + void showFullscreenToolbar(bool show); + void showFullscreenPlaylist(bool show); + // void setAutoplay(bool enabled); void updateDownloadMessage(QString); void downloadsFinished(); diff --git a/src/MediaView.cpp b/src/MediaView.cpp index 48bb22d..0fd49b2 100644 --- a/src/MediaView.cpp +++ b/src/MediaView.cpp @@ -626,10 +626,6 @@ void MediaView::fullscreen() { videoAreaWidget->showFullScreen(); } -QSize MediaView::getPlaylistSize() { - return this->playlistWidget->size(); -} - /* void MediaView::setSlider(QSlider *slider) { this->slider = slider; diff --git a/src/MediaView.h b/src/MediaView.h index d478479..a4016be 100644 --- a/src/MediaView.h +++ b/src/MediaView.h @@ -42,7 +42,6 @@ public: void setMediaObject(Phonon::MediaObject *mediaObject); void setSlider(QSlider *slider); - QSize getPlaylistSize(); public slots: void search(SearchParams *searchParams); diff --git a/src/videoareawidget.cpp b/src/videoareawidget.cpp index f4b48e6..2b1c6d1 100644 --- a/src/videoareawidget.cpp +++ b/src/videoareawidget.cpp @@ -107,11 +107,11 @@ void VideoAreaWidget::mouseMoveEvent(QMouseEvent *event) { const int x = event->pos().x(); const int y = event->pos().y(); - bool visible = y <= 0; + bool visible = y <= 10; bool ret = QMetaObject::invokeMethod(mainWindow, "showFullscreenToolbar", Qt::DirectConnection, Q_ARG(bool, visible)); if (!ret) qDebug() << "showFullscreenToolbar invokeMethod failed"; - visible = x <= 0; + visible = x <= 10; ret = QMetaObject::invokeMethod(mainWindow, "showFullscreenPlaylist", Qt::DirectConnection, Q_ARG(bool, visible)); if (!ret) qDebug() << "showFullscreenPlaylist invokeMethod failed"; } -- 2.39.5