0
|
1 |
/* This file is part of the KDE project.
|
|
2 |
|
|
3 |
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
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 by
|
|
7 |
the Free Software Foundation, either version 2.1 or 3 of the License.
|
|
8 |
|
|
9 |
This library is distributed in the hope that it will be useful,
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
GNU Lesser General Public License for more details.
|
|
13 |
|
|
14 |
You should have received a copy of the GNU Lesser General Public License
|
|
15 |
along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
16 |
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef PHONON_MMF_VIDEOOUTPUT_H
|
|
20 |
#define PHONON_MMF_VIDEOOUTPUT_H
|
|
21 |
|
|
22 |
#include <QtGui/QWidget>
|
|
23 |
#include <QVector>
|
|
24 |
#include <QRect>
|
|
25 |
#include "defs.h"
|
|
26 |
|
|
27 |
QT_BEGIN_NAMESPACE
|
|
28 |
|
|
29 |
namespace Phonon
|
|
30 |
{
|
|
31 |
namespace MMF
|
|
32 |
{
|
|
33 |
class VideoOutputObserver;
|
|
34 |
|
|
35 |
class VideoOutput : public QWidget
|
|
36 |
{
|
|
37 |
Q_OBJECT
|
|
38 |
|
|
39 |
public:
|
|
40 |
explicit VideoOutput(QWidget* parent);
|
|
41 |
~VideoOutput();
|
|
42 |
|
|
43 |
void setFrameSize(const QSize& size);
|
|
44 |
void setObserver(VideoOutputObserver* observer);
|
|
45 |
|
|
46 |
protected:
|
|
47 |
// Override QWidget functions
|
|
48 |
QSize sizeHint() const;
|
|
49 |
void paintEvent(QPaintEvent* event);
|
|
50 |
void resizeEvent(QResizeEvent* event);
|
|
51 |
void moveEvent(QMoveEvent* event);
|
|
52 |
bool event(QEvent* event);
|
|
53 |
|
|
54 |
private:
|
|
55 |
void dump() const;
|
|
56 |
void videoOutputRegionChanged();
|
|
57 |
|
|
58 |
private:
|
|
59 |
QSize m_frameSize;
|
|
60 |
|
|
61 |
// Not owned
|
|
62 |
VideoOutputObserver* m_observer;
|
|
63 |
};
|
|
64 |
}
|
|
65 |
}
|
|
66 |
|
|
67 |
QT_END_NAMESPACE
|
|
68 |
|
|
69 |
#endif
|