~ubuntu-branches/ubuntu/saucy/qt-gstreamer/saucy-proposed

« back to all changes in this revision

Viewing changes to elements/gstqtvideosink/qwidgetvideosinkdelegate.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-06-15 15:03:26 UTC
  • mfrom: (1.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120615150326-pkmdog620pkytcgt
Tags: 0.10.2-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - Enable unit tests.
    + Build-depend on gstreamer0.10-plugins-base.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
 
3
    Copyright (C) 2012 Collabora Ltd. <info@collabora.com>
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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/>.
 
17
*/
 
18
#ifndef QWIDGET_VIDEO_SINK_DELEGATE_H
 
19
#define QWIDGET_VIDEO_SINK_DELEGATE_H
 
20
 
 
21
#include "qtvideosinkdelegate.h"
 
22
#include <QtCore/QWeakPointer>
 
23
#include <QtCore/QEvent>
 
24
#include <QtGui/QWidget>
 
25
 
 
26
class QWidgetVideoSinkDelegate : public QtVideoSinkDelegate
 
27
{
 
28
    Q_OBJECT
 
29
public:
 
30
    explicit QWidgetVideoSinkDelegate(GstQtVideoSinkBase* sink, QObject* parent = 0);
 
31
    virtual ~QWidgetVideoSinkDelegate();
 
32
 
 
33
    // "widget" property
 
34
    QWidget *widget() const;
 
35
    void setWidget(QWidget *widget);
 
36
 
 
37
protected:
 
38
    virtual bool eventFilter(QObject *filteredObject, QEvent *event);
 
39
    virtual void update();
 
40
 
 
41
private:
 
42
    // "widget" property
 
43
    QWeakPointer<QWidget> m_widget;
 
44
 
 
45
    // original value of the Qt::WA_OpaquePaintEvent attribute
 
46
    bool m_opaquePaintEventAttribute;
 
47
};
 
48
 
 
49
#endif // QWIDGET_VIDEO_SINK_DELEGATE_H