X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bindings%2Fphonon%2Fvlc%2Fwidgetnopaintevent.cpp;fp=bindings%2Fphonon%2Fvlc%2Fwidgetnopaintevent.cpp;h=0000000000000000000000000000000000000000;hb=080366288b88911511c18ca5eb3a074bf84be59b;hp=4f6931ebfad60d96a7a6ab59403ec24faed514bd;hpb=b1e53a17fd3b276cb05e90ff1d5614cb77616e0f;p=vlc diff --git a/bindings/phonon/vlc/widgetnopaintevent.cpp b/bindings/phonon/vlc/widgetnopaintevent.cpp deleted file mode 100644 index 4f6931ebfa..0000000000 --- a/bindings/phonon/vlc/widgetnopaintevent.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/***************************************************************************** - * VLC backend for the Phonon library * - * Copyright (C) 2007-2008 Tanguy Krotoff * - * Copyright (C) 2008 Lukas Durfina * - * Copyright (C) 2009 Fathi Boudra * - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 3 of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this package; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * - *****************************************************************************/ - -#include "widgetnopaintevent.h" - -#include - -namespace Phonon -{ -namespace VLC { - -WidgetNoPaintEvent::WidgetNoPaintEvent(QWidget *p_parent) - : QWidget(p_parent) -{ - // When resizing fill with black (backgroundRole color) the rest is done by paintEvent - setAttribute(Qt::WA_OpaquePaintEvent); - - // Disable Qt composition management as MPlayer draws onto the widget directly - setAttribute(Qt::WA_PaintOnScreen); - - // Indicates that the widget has no background, - // i.e. when the widget receives paint events, the background is not automatically repainted. - setAttribute(Qt::WA_NoSystemBackground); - - // Required for dvdnav - setMouseTracking(true); -} - -void WidgetNoPaintEvent::paintEvent(QPaintEvent *p_event) -{ - // FIXME this makes the video flicker - // Make everything backgroundRole color - QPainter painter(this); - painter.eraseRect(rect()); -} - -void WidgetNoPaintEvent::setBackgroundColor(const QColor & color) -{ - QPalette p = palette(); - p.setColor(backgroundRole(), color); - setPalette(p); -} - -} -} // Namespace Phonon::VLC