source: trunk/src/3rdparty/phonon/mmf/videooutput.h@ 651

Last change on this file since 651 was 651, checked in by Dmitry A. Kuminov, 16 years ago

trunk: Merged in qt 4.6.2 sources.

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1/* This file is part of the KDE project.
2
3Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
5This library is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 2.1 or 3 of the License.
8
9This library is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU Lesser General Public License for more details.
13
14You should have received a copy of the GNU Lesser General Public License
15along 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#include <phonon/videowidget.h>
28
29#include <e32std.h>
30class RWindowBase;
31
32QT_BEGIN_NAMESPACE
33
34namespace Phonon
35{
36namespace MMF
37{
38class AncestorMoveMonitor;
39
40class VideoOutput : public QWidget
41{
42 Q_OBJECT
43
44public:
45 VideoOutput(AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent);
46 ~VideoOutput();
47
48 // Set size of video frame. Called by VideoPlayer.
49 void setVideoSize(const QSize& size);
50
51 RWindowBase* videoWindow();
52 const QRect& videoWindowRect() const;
53
54 Phonon::VideoWidget::AspectRatio aspectRatio() const;
55 void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio);
56
57 Phonon::VideoWidget::ScaleMode scaleMode() const;
58 void setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode);
59
60 // Called by AncestorMoveMonitor
61 void ancestorMoved();
62
63 // Debugging output
64 void dump() const;
65
66public Q_SLOTS:
67 void beginNativePaintEvent(const QRect& /*controlRect*/);
68 void endNativePaintEvent(const QRect& /*controlRect*/);
69
70Q_SIGNALS:
71 void videoWindowChanged();
72 void aspectRatioChanged();
73 void scaleModeChanged();
74 void beginVideoWindowNativePaint();
75 void endVideoWindowNativePaint();
76
77protected:
78 // Override QWidget functions
79 QSize sizeHint() const;
80 void paintEvent(QPaintEvent* event);
81 void resizeEvent(QResizeEvent* event);
82 void moveEvent(QMoveEvent* event);
83 bool event(QEvent* event);
84
85private:
86 void getVideoWindowRect();
87 void registerForAncestorMoved();
88
89private:
90 // Not owned
91 AncestorMoveMonitor* m_ancestorMoveMonitor;
92
93 QSize m_videoFrameSize;
94 QRect m_videoWindowRect;
95
96 Phonon::VideoWidget::AspectRatio m_aspectRatio;
97 Phonon::VideoWidget::ScaleMode m_scaleMode;
98
99};
100}
101}
102
103QT_END_NAMESPACE
104
105#endif
Note: See TracBrowser for help on using the repository browser.