Home · All Classes · Grouped Classes · Annotated · Functions

QMediaVideoControl Class Reference

The QMediaVideoControl class is an interface to videos playing through the Qtopia Media System. More...

    #include <QMediaVideoControl>

Inherits QObject.

Public Functions

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The QMediaVideoControl class is an interface to videos playing through the Qtopia Media System.

If a prepared media resource has associated video content, when that content is available to be played, this inteface can be used to contruct a QWidget which will contain the rendering of the video content.

Use the QMediaControlNotifier class to listen for when video content is available.

    QMediaControlNotifier *notifier = new QMediaControlNotifier( QMediaVideoControl::name() );
    connect( notifier, SIGNAL(valid()), this, SLOT(showVideo()) );

    QMediaContent *content = new QMediaContent( "video.3gp" );
    notifier->setMediaContent( content );

If video content is available createVideoWidget() can be used to construct a new video widget for the media content.

    QMediaVideoControl control( content );

    QWidget *video = control.createVideoWidget();
    videolayout->addWidget( video );

Simply delete video widgets when they are no longer needed or when the video control becomes invalid.

See also QMediaContent and QMediaControlNotifier.


Member Function Documentation

QMediaVideoControl::QMediaVideoControl ( QMediaContent * mediaContent )

Create a QMediaVideoControl with the handle to a prepared media resource

The QMediaControl needs to be constructed with mediaContent that represents the video to be played.

QMediaVideoControl::~QMediaVideoControl ()

Destroy a QMediaVideoControl

QWidget * QMediaVideoControl::createVideoWidget ( QWidget * parent = 0 ) const

Create a QWidget that displays the rendered video content.

This function is used to create a QWidget that will display the video content, it is parented to the widget passed in with the parent parameter. This widget can be deleted when the application is finished with it.

void QMediaVideoControl::invalid ()   [signal]

Signal that is emitted when the control is invalid and no longer available for use.

QString QMediaVideoControl::name ()   [static]

Return the name of this control.

void QMediaVideoControl::valid ()   [signal]

Signal that is emitted when the control is valid and available for use.

void QMediaVideoControl::videoTargetAvailable ()   [signal]

This signal is emitted when there is a video available to be viewed. The client can call createVideoWidget() at this time.

See also createVideoWidget().

void QMediaVideoControl::videoTargetRemoved ()   [signal]

This signal is emitted when there is no longer video available to be viewed. The client should delete any QWidget obtained from createVideoWidget()

See also createVideoWidget().


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3