src/multimedia/qvideowindowcontrol.cpp
changeset 0 876b1a06bc25
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Mobility Components.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 
       
    42 #include "qvideowindowcontrol.h"
       
    43 
       
    44 QT_BEGIN_NAMESPACE
       
    45 
       
    46 /*!
       
    47     \class QVideoWindowControl
       
    48     \preliminary
       
    49     \ingroup multimedia
       
    50     \brief The QVideoWindowControl class provides a media control for rendering video to a window.
       
    51 
       
    52 
       
    53     The winId() property QVideoWindowControl allows a platform specific window
       
    54     ID to be set as the video render target of a QMediaService.  The
       
    55     displayRect() property is used to set the region of the window the video
       
    56     should be rendered to, and the aspectRatioMode() property indicates how the
       
    57     video should be scaled to fit the displayRect().
       
    58 
       
    59     \code
       
    60     QVideoWindowControl *windowControl = mediaService->requestControl<QVideoWindowControl *>();
       
    61     windowControl->setWinId(widget->winId());
       
    62     windowControl->setDisplayRect(widget->rect());
       
    63     windowControl->setAspectRatioMode(Qt::KeepAspectRatio);
       
    64     \endcode
       
    65 
       
    66     QVideoWindowControl is one of number of possible video output controls.
       
    67 
       
    68     The interface name of QVideoWindowControl is \c com.nokia.Qt.QVideoWindowControl/1.0 as
       
    69     defined in QVideoWindowControl_iid.
       
    70 
       
    71     \sa QMediaService::requestControl(), QVideoWidget
       
    72 */
       
    73 
       
    74 /*!
       
    75     \macro QVideoWindowControl_iid
       
    76 
       
    77     \c com.nokia.Qt.QVideoWindowControl/1.0
       
    78 
       
    79     Defines the interface name of the QVideoWindowControl class.
       
    80 
       
    81     \relates QVideoWindowControl
       
    82 */
       
    83 
       
    84 /*!
       
    85     Constructs a new video window control with the given \a parent.
       
    86 */
       
    87 QVideoWindowControl::QVideoWindowControl(QObject *parent)
       
    88     : QMediaControl(parent)
       
    89 {
       
    90 }
       
    91 
       
    92 /*!
       
    93     Destroys a video window control.
       
    94 */
       
    95 QVideoWindowControl::~QVideoWindowControl()
       
    96 {
       
    97 }
       
    98 
       
    99 /*!
       
   100     \fn QVideoWindowControl::winId() const
       
   101 
       
   102     Returns the ID of the window a video overlay end point renders to.
       
   103 */
       
   104 
       
   105 /*!
       
   106     \fn QVideoWindowControl::setWinId(WId id)
       
   107 
       
   108     Sets the \a id of the window a video overlay end point renders to.
       
   109 */
       
   110 
       
   111 /*!
       
   112     \fn QVideoWindowControl::displayRect() const
       
   113     Returns the sub-rect of a window where video is displayed.
       
   114 */
       
   115 
       
   116 /*!
       
   117     \fn QVideoWindowControl::setDisplayRect(const QRect &rect)
       
   118     Sets the sub-\a rect of a window where video is displayed.
       
   119 */
       
   120 
       
   121 /*!
       
   122     \fn QVideoWindowControl::isFullScreen() const
       
   123 
       
   124     Identifies if a video overlay is a fullScreen overlay.
       
   125 
       
   126     Returns true if the video overlay is fullScreen, and false otherwise.
       
   127 */
       
   128 
       
   129 /*!
       
   130     \fn QVideoWindowControl::setFullScreen(bool fullScreen)
       
   131 
       
   132     Sets whether a video overlay is a \a fullScreen overlay.
       
   133 */
       
   134 
       
   135 /*!
       
   136     \fn QVideoWindowControl::fullScreenChanged(bool fullScreen)
       
   137 
       
   138     Signals that the \a fullScreen state of a video overlay has changed.
       
   139 */
       
   140 
       
   141 /*!
       
   142     \fn QVideoWindowControl::repaint()
       
   143 
       
   144     Repaints the last frame.
       
   145 */
       
   146 
       
   147 /*!
       
   148     \fn QVideoWindowControl::nativeSize() const
       
   149 
       
   150     Returns a suggested size for the video display based on the resolution and aspect ratio of the
       
   151     video.
       
   152 */
       
   153 
       
   154 /*!
       
   155     \fn QVideoWindowControl::nativeSizeChanged()
       
   156 
       
   157     Signals that the native dimensions of the video have changed.
       
   158 */
       
   159 
       
   160 
       
   161 /*!
       
   162     \fn QVideoWindowControl::aspectRatioMode() const
       
   163 
       
   164     Returns how video is scaled to fit the display region with respect to its aspect ratio.
       
   165 */
       
   166 
       
   167 /*!
       
   168     \fn QVideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)
       
   169 
       
   170     Sets the aspect ratio \a mode which determines how video is scaled to the fit the display region
       
   171     with respect to its aspect ratio.
       
   172 */
       
   173 
       
   174 /*!
       
   175     \fn QVideoWindowControl::brightness() const
       
   176 
       
   177     Returns the brightness adjustment applied to a video overlay.
       
   178 
       
   179     Valid brightness values range between -100 and 100, the default is 0.
       
   180 */
       
   181 
       
   182 /*!
       
   183     \fn QVideoWindowControl::setBrightness(int brightness)
       
   184 
       
   185     Sets a \a brightness adjustment for a video overlay.
       
   186 
       
   187     Valid brightness values range between -100 and 100, the default is 0.
       
   188 */
       
   189 
       
   190 /*!
       
   191     \fn QVideoWindowControl::brightnessChanged(int brightness)
       
   192 
       
   193     Signals that a video overlay's \a brightness adjustment has changed.
       
   194 */
       
   195 
       
   196 /*!
       
   197     \fn QVideoWindowControl::contrast() const
       
   198 
       
   199     Returns the contrast adjustment applied to a video overlay.
       
   200 
       
   201     Valid contrast values range between -100 and 100, the default is 0.
       
   202 */
       
   203 
       
   204 /*!
       
   205     \fn QVideoWindowControl::setContrast(int contrast)
       
   206 
       
   207     Sets the \a contrast adjustment for a video overlay.
       
   208 
       
   209     Valid contrast values range between -100 and 100, the default is 0.
       
   210 */
       
   211 
       
   212 /*!
       
   213     \fn QVideoWindowControl::contrastChanged(int contrast)
       
   214 
       
   215     Signals that a video overlay's \a contrast adjustment has changed.
       
   216 */
       
   217 
       
   218 /*!
       
   219     \fn QVideoWindowControl::hue() const
       
   220 
       
   221     Returns the hue adjustment applied to a video overlay.
       
   222 
       
   223     Value hue values range between -100 and 100, the default is 0.
       
   224 */
       
   225 
       
   226 /*!
       
   227     \fn QVideoWindowControl::setHue(int hue)
       
   228 
       
   229     Sets a \a hue adjustment for a video overlay.
       
   230 
       
   231     Valid hue values range between -100 and 100, the default is 0.
       
   232 */
       
   233 
       
   234 /*!
       
   235     \fn QVideoWindowControl::hueChanged(int hue)
       
   236 
       
   237     Signals that a video overlay's \a hue adjustment has changed.
       
   238 */
       
   239 
       
   240 /*!
       
   241     \fn QVideoWindowControl::saturation() const
       
   242 
       
   243     Returns the saturation adjustment applied to a video overlay.
       
   244 
       
   245     Value saturation values range between -100 and 100, the default is 0.
       
   246 */
       
   247 
       
   248 /*!
       
   249     \fn QVideoWindowControl::setSaturation(int saturation)
       
   250     Sets a \a saturation adjustment for a video overlay.
       
   251 
       
   252     Valid saturation values range between -100 and 100, the default is 0.
       
   253 */
       
   254 
       
   255 /*!
       
   256     \fn QVideoWindowControl::saturationChanged(int saturation)
       
   257 
       
   258     Signals that a video overlay's \a saturation adjustment has changed.
       
   259 */
       
   260 
       
   261 #include "moc_qvideowindowcontrol.cpp"
       
   262 QT_END_NAMESPACE
       
   263