src/3rdparty/phonon/mmf/videowidget.h
changeset 0 1918ee327afb
child 3 41300fa6a67c
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     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 "mmf_medianode.h"
       
    23 
       
    24 #include <QtGui/QWidget>
       
    25 #include <Phonon/VideoWidget>
       
    26 #include <Phonon/VideoWidgetInterface>
       
    27 
       
    28 QT_BEGIN_NAMESPACE
       
    29 
       
    30 namespace Phonon
       
    31 {
       
    32 namespace MMF
       
    33 {
       
    34 class VideoOutput;
       
    35 
       
    36 class VideoWidget       :   public MediaNode
       
    37                         ,   public Phonon::VideoWidgetInterface
       
    38 {
       
    39     Q_OBJECT
       
    40     Q_INTERFACES(Phonon::VideoWidgetInterface)
       
    41 
       
    42 public:
       
    43     VideoWidget(QWidget* parent);
       
    44     ~VideoWidget();
       
    45 
       
    46     // VideoWidgetInterface
       
    47     virtual Phonon::VideoWidget::AspectRatio aspectRatio() const;
       
    48     virtual void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio);
       
    49     virtual qreal brightness() const;
       
    50     virtual void setBrightness(qreal brightness);
       
    51     virtual Phonon::VideoWidget::ScaleMode scaleMode() const;
       
    52     virtual void setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode);
       
    53     virtual qreal contrast() const;
       
    54     virtual void setContrast(qreal constrast);
       
    55     virtual qreal hue() const;
       
    56     virtual void setHue(qreal hue);
       
    57     virtual qreal saturation() const;
       
    58     virtual void setSaturation(qreal saturation);
       
    59     virtual QWidget *widget();
       
    60 
       
    61     VideoOutput& videoOutput();
       
    62 
       
    63 protected:
       
    64     virtual bool activateOnMediaObject(MediaObject *mo);
       
    65 
       
    66 private:
       
    67     QScopedPointer<QWidget>                 m_widget;
       
    68 
       
    69     Phonon::VideoWidget::AspectRatio        m_aspectRatio;
       
    70     qreal                                   m_brightness;
       
    71     Phonon::VideoWidget::ScaleMode          m_scaleMode;
       
    72     qreal                                   m_contrast;
       
    73     qreal                                   m_hue;
       
    74     qreal                                   m_saturation;
       
    75 
       
    76 };
       
    77 }
       
    78 }
       
    79 
       
    80 QT_END_NAMESPACE
       
    81 
       
    82 #endif