Home · All Classes · All Functions ·

QVideoWidget Class Reference

The QVideoWidget class provides a widget which presents video produced by a media object. More...

    #include <QVideoWidget>

This class is under development and is subject to change.

Inherits QWidget and QMediaBindableInterface.

Properties

Public Functions

Public Slots

Signals

Protected Functions

Additional Inherited Members


Detailed Description

The QVideoWidget class provides a widget which presents video produced by a media object.

Attaching a QVideoWidget to a QMediaObject allows it to display the video or image output of that media object. A QVideoWidget is attached to media object by passing a pointer to the QMediaObject in its constructor, and detached by destroying the QVideoWidget.

    player = new QMediaPlayer;

    widget = new QVideoWidget;
    widget->show();

    player->setVideoOutput(widget);
    player->setMedia(QUrl("http://example.com/movie.mp4"));
    player->play();

Note: Only a single display output can be attached to a media object at one time.

See also QMediaObject, QMediaPlayer, and QGraphicsVideoItem.


Property Documentation

aspectRatioMode : Qt::AspectRatioMode

This property holds how video is scaled with respect to its aspect ratio.

Access functions:

brightness : int

This property holds an adjustment to the brightness of displayed video.

Valid brightness values range between -100 and 100, the default is 0.

Access functions:

contrast : int

This property holds an adjustment to the contrast of displayed video.

Valid contrast values range between -100 and 100, the default is 0.

Access functions:

fullScreen : bool

This property holds whether video display is confined to a window or is fullScreen.

Access functions:

hue : int

This property holds an adjustment to the hue of displayed video.

Valid hue values range between -100 and 100, the default is 0.

Access functions:

mediaObject : QMediaObject * const

This property holds the media object which provides the video displayed by a widget.

Access functions:

saturation : int

This property holds an adjustment to the saturation of displayed video.

Valid saturation values range between -100 and 100, the default is 0.

Access functions:


Member Function Documentation

QVideoWidget::QVideoWidget ( QWidget * parent = 0 )

Constructs a new video widget.

The parent is passed to QWidget.

QVideoWidget::~QVideoWidget ()

Destroys a video widget.

void QVideoWidget::brightnessChanged ( int brightness )   [signal]

Signals that a video widgets's brightness adjustment has changed.

See also brightness.

void QVideoWidget::contrastChanged ( int contrast )   [signal]

Signals that a video widgets's contrast adjustment has changed.

See also contrast.

void QVideoWidget::fullScreenChanged ( bool fullScreen )   [signal]

Signals that the fullScreen mode of a video widget has changed.

See also fullScreen.

void QVideoWidget::hideEvent ( QHideEvent * event )   [virtual protected]

Handles the hide event.

Reimplemented from QWidget.

void QVideoWidget::hueChanged ( int hue )   [signal]

Signals that a video widgets's hue has changed.

See also hue.

void QVideoWidget::moveEvent ( QMoveEvent * event )   [virtual protected]

Handles the move event.

Reimplemented from QWidget.

void QVideoWidget::paintEvent ( QPaintEvent * event )   [virtual protected]

Handles the paint event.

Reimplemented from QWidget.

void QVideoWidget::resizeEvent ( QResizeEvent * event )   [virtual protected]

Handles the resize event.

Reimplemented from QWidget.

void QVideoWidget::saturationChanged ( int saturation )   [signal]

Signals that a video widgets's saturation has changed.

See also saturation.

bool QVideoWidget::setMediaObject ( QMediaObject * object )   [virtual protected]

See also mediaObject().

void QVideoWidget::showEvent ( QShowEvent * event )   [virtual protected]

Handles the show event.

Reimplemented from QWidget.

QSize QVideoWidget::sizeHint () const   [virtual]

Returns the size hint for the current back end, if there is one, or else the size hint from QWidget.

Reimplemented from QWidget.


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.0.1