2
Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
3
Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
5
This library is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published
7
by the Free Software Foundation; either version 2.1 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef QWIDGET_VIDEO_SINK_DELEGATE_H
19
#define QWIDGET_VIDEO_SINK_DELEGATE_H
21
#include "qtvideosinkdelegate.h"
22
#include <QtCore/QWeakPointer>
23
#include <QtCore/QEvent>
24
#include <QtGui/QWidget>
26
class QWidgetVideoSinkDelegate : public QtVideoSinkDelegate
30
explicit QWidgetVideoSinkDelegate(GstQtVideoSinkBase* sink, QObject* parent = 0);
31
virtual ~QWidgetVideoSinkDelegate();
34
QWidget *widget() const;
35
void setWidget(QWidget *widget);
38
virtual bool eventFilter(QObject *filteredObject, QEvent *event);
39
virtual void update();
43
QWeakPointer<QWidget> m_widget;
45
// original value of the Qt::WA_OpaquePaintEvent attribute
46
bool m_opaquePaintEventAttribute;
49
#endif // QWIDGET_VIDEO_SINK_DELEGATE_H