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_VIDEOWIDGET_H
20
#define PHONON_MMF_VIDEOWIDGET_H
21
22
#include "abstractvideooutput.h"
23
#include "mmf_medianode.h"
24
25
#include <QtGui/QWidget>
26
#include <phonon/videowidget.h>
27
#include <phonon/videowidgetinterface.h>
28
29
QT_BEGIN_NAMESPACE
30
31
namespace Phonon
32
{
33
namespace MMF
34
{
35
#ifndef PHONON_MMF_VIDEO_SURFACES
36
class AncestorMoveMonitor;
37
#endif
38
39
class VideoWidget       :   public MediaNode
40
                        ,   public Phonon::VideoWidgetInterface
41
{
42
    Q_OBJECT
43
    Q_INTERFACES(Phonon::VideoWidgetInterface)
44
45
public:
46
    VideoWidget(QWidget* parent);
47
    ~VideoWidget();
48
49
#ifndef PHONON_MMF_VIDEO_SURFACES
50
    void setAncestorMoveMonitor(AncestorMoveMonitor *ancestorMoveMonitor);
51
#endif
52
53
    // VideoWidgetInterface
54
    virtual Phonon::VideoWidget::AspectRatio aspectRatio() const;
55
    virtual void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio);
56
    virtual qreal brightness() const;
57
    virtual void setBrightness(qreal brightness);
58
    virtual Phonon::VideoWidget::ScaleMode scaleMode() const;
59
    virtual void setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode);
60
    virtual qreal contrast() const;
61
    virtual void setContrast(qreal constrast);
62
    virtual qreal hue() const;
63
    virtual void setHue(qreal hue);
64
    virtual qreal saturation() const;
65
    virtual void setSaturation(qreal saturation);
66
    virtual QWidget *widget();
67
68
protected:
69
    // MediaNode
70
    void connectMediaObject(MediaObject *mediaObject);
71
    void disconnectMediaObject(MediaObject *mediaObject);
72
73
private:
74
    QScopedPointer<AbstractVideoOutput>     m_videoOutput;
75
76
    qreal                                   m_brightness;
77
    qreal                                   m_contrast;
78
    qreal                                   m_hue;
79
    qreal                                   m_saturation;
80
81
};
82
}
83
}
84
85
QT_END_NAMESPACE
86
87
#endif