summaryrefslogtreecommitdiffstats
path: root/src/imports/multimedia/qdeclarativeaudio.cpp
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2012-02-06 15:49:54 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-06 07:45:05 +0100
commitc0fd63d143e798203f1108824e7a7c6a3ea6e0e2 (patch)
treed6e2d1298e5bdbd535ef9f475a856a70a19e4707 /src/imports/multimedia/qdeclarativeaudio.cpp
parent51ca5582c2475ea91fe2d86793f000f7bed41f51 (diff)
Documentation tweaks.
Mostly move widgets classes into the QtMultimediaWidgets module, but also mark a few mostly internal playlist classes as \internal. A few other tweaks. Change-Id: If0e376410bf2187cafb24f583108c6beb7b910a9 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Diffstat (limited to 'src/imports/multimedia/qdeclarativeaudio.cpp')
-rw-r--r--src/imports/multimedia/qdeclarativeaudio.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp
index 9445b0fd3..3fb4ae7eb 100644
--- a/src/imports/multimedia/qdeclarativeaudio.cpp
+++ b/src/imports/multimedia/qdeclarativeaudio.cpp
@@ -45,6 +45,63 @@
QT_BEGIN_NAMESPACE
+/*!
+ \qmlclass MediaPlayer
+ \brief The MediaPlayer element allows you to add media playback to a scene.
+
+ \ingroup multimedia_qml
+
+ This element is part of the \bold{QtMultimedia 5.0} module.
+
+ \qml
+ import QtQuick 2.0
+ import QtMultimedia 5.0
+
+ Text {
+ text: "Click Me!";
+ font.pointSize: 24;
+ width: 150; height: 50;
+
+ MediaPlayer {
+ id: playMusic
+ source: "music.wav"
+ }
+ MouseArea {
+ id: playArea
+ anchors.fill: parent
+ onPressed: { playMusic.play() }
+ }
+ }
+ \endqml
+
+ You can use MediaPlayer by itself to play audio content (like the \l Audio element),
+ or you can use it in conjunction with a \l VideoOutput element for rendering video.
+
+ \qml
+ import QtQuick 2.0
+ import QtMultimedia 5.0
+
+ Item {
+ MediaPlayer {
+ id: mediaplayer
+ source: "groovy_video.mp4"
+ }
+
+ VideoOutput {
+ anchors: parent.fill
+ source: mediaplayer
+ }
+
+ MouseArea {
+ id: playArea
+ anchors.fill: parent
+ onPressed: mediaplayer.play();
+ }
+ }
+ \endqml
+
+ \sa VideoOutput
+*/
/*!
\qmlclass Audio QDeclarativeAudio