![]() |
Home · All Classes · All Functions · Overviews |
The QMediaControl class provides a base interface for media service controls. More...
#include <QMediaControl>
This class is under development and is subject to change.
Inherits QObject.
Inherited by QMediaPlayerControl, QMediaPlaylistControl, QMetaDataControl, QVideoDeviceControl, QVideoOutputControl, QVideoRendererControl, QVideoWidgetControl, and QVideoWindowControl.
This class was introduced in Qt 4.7.
~QMediaControl () |
QMediaControl ( QObject * parent = 0 ) |
Q_MEDIA_DECLARE_CONTROL ( Class, IId ) |
The QMediaControl class provides a base interface for media service controls.
Media controls provide an interface to individual features provided by a media service. Most services implement a principal control which exposes the core functionality of the service and a number optional controls which expose any additional functionality.
A pointer to a control implemented by a media service can be obtained using the control() member of QMediaService. If the service doesn't implement a control it will instead return a null pointer.
QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>( service->control("com.nokia.Qt.QMediaPlayerControl/1.0"));
Alternatively if the IId of the control has been declared using Q_MEDIA_DECLARE_CONTROL the template version of QMediaService::control() can be used to request the service without explicitly passing the IId.
QMediaPlayerControl *control = service->control<QMediaPlayerControl *>();
Most application code will not interface directly with a media service's controls, instead the QMediaObject which owns the service acts as an intermeditary between one or more controls and the application.
See also QMediaService and QMediaObject.
Constructs a media control with the given parent.
Destroys a media control.
The Q_MEDIA_DECLARE_CONTROL macro declares an IId for a Class that inherits from QMediaControl.
Declaring an IId for a QMediaControl allows an instance of that control to be requested from QMediaService::control() without explicitly passing the IId.
QMediaPlayerControl *control = service->control<QMediaPlayerControl *>();
See also QMediaService::control().
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.7.0 |