- 32 public functions inherited from QObject
|QMediaControl(QObject *parent = Q_NULLPTR)|
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 11 static public members inherited from QObject
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 of optional controls which expose any additional functionality.
A pointer to a control implemented by a media service can be obtained using the QMediaService::requestControl() member of QMediaService. If the service doesn't implement a control it will instead return a null pointer.
QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>( mediaService->requestControl("org.qt-project.qt.mediaplayercontrol/5.0"));
Alternatively if the IId of the control has been declared using Q_MEDIA_DECLARE_CONTROL the template version of QMediaService::requestControl() can be used to request the service without explicitly passing the IId or using qobject_cast().
Most application code will not interface directly with a media service's controls, instead the QMediaObject which owns the service acts as an intermediary between one or more controls and the application.
Member Function Documentation
[protected] QMediaControl::QMediaControl(QObject *parent = Q_NULLPTR)
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.
See also QMediaService::requestControl().
© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.