summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-01 16:47:19 +1000
committerMartin Jones <martin.jones@nokia.com>2010-04-01 16:47:19 +1000
commit621a470e1c996c471a5a4492a0b71a75b1add6d4 (patch)
tree5c0894d25eaea93bb7e931bafdd09708294e12ce
parent006d3ee14b37f243ef4765d4252cfb1a61648f14 (diff)
Add media elements to the QML Elements docs.
-rw-r--r--doc/src/declarative/elements.qdoc21
-rw-r--r--src/imports/multimedia/qdeclarativeaudio.cpp5
-rw-r--r--src/imports/multimedia/qdeclarativevideo.cpp5
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp2
-rw-r--r--src/multimedia/effects/qsoundeffect.cpp25
5 files changed, 39 insertions, 19 deletions
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 9cbf58bf71..2f9e7bf22a 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -111,8 +111,8 @@ The following table lists the QML elements provided by the Qt Declarative module
\header
\o \bold {Basic Visual Items}
\o \bold {Basic Interaction Items}
-\o \bold {Widgets}
\o \bold {Utility}
+\o \bold {Transforms}
\row
\o
@@ -130,13 +130,8 @@ The following table lists the QML elements provided by the Qt Declarative module
\list
\o \l MouseArea
\o \l FocusScope
-\endlist
-
-\o
-\list
\o \l Flickable
\o \l Flipable
-\o \l WebView
\endlist
\o
@@ -148,10 +143,16 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l LayoutItem
\endlist
+\o
+\list
+\o \l Scale
+\o \l Rotation
+\endlist
+
\header
\o \bold {Views}
\o \bold {Positioners}
-\o \bold {Transforms}
+\o \bold {Media}
\o \bold {Effects}
\row
@@ -172,6 +173,7 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l PathPercent
\endlist
\endlist
+\o \l WebView
\endlist
\o
@@ -184,8 +186,9 @@ The following table lists the QML elements provided by the Qt Declarative module
\o
\list
-\o \l Scale
-\o \l Rotation
+\o \l SoundEffect
+\o \l Audio
+\o \l Video
\endlist
\o
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp
index 077ed9adc9..8d2dc618b8 100644
--- a/src/imports/multimedia/qdeclarativeaudio.cpp
+++ b/src/imports/multimedia/qdeclarativeaudio.cpp
@@ -51,7 +51,12 @@ QT_BEGIN_NAMESPACE
\since 4.7
\brief The Audio element allows you to add audio playback to a scene.
+ This element is part of the \bold{Qt.multimedia 4.7} module.
+
\qml
+ import Qt 4.6
+ import Qt.multimedia 4.7
+
Audio { source: "audio/song.mp3" }
\endqml
diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp
index c878fe1b11..bf112be885 100644
--- a/src/imports/multimedia/qdeclarativevideo.cpp
+++ b/src/imports/multimedia/qdeclarativevideo.cpp
@@ -73,7 +73,12 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
\brief The Video element allows you to add videos to a scene.
\inherits Item
+ This element is part of the \bold{Qt.multimedia 4.7} module.
+
\qml
+ import Qt 4.6
+ import Qt.multimedia 4.7
+
Video { source: "video/movie.mpg" }
\endqml
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index e69c2353f9..e98a801c32 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -623,7 +623,7 @@ void QDeclarativeParticlesPrivate::updateOpacity(QDeclarativeParticle &p, int ag
\brief The Particles object generates and moves particles.
\inherits Item
- Particles are available in the Qt.labs.particles 1.0 module.
+ Particles are available in the \bold{Qt.labs.particles 1.0} module.
This element provides preliminary support for particles in QML,
and may be heavily changed or removed in later versions.
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp
index ed9ab3fef1..8a38103fef 100644
--- a/src/multimedia/effects/qsoundeffect.cpp
+++ b/src/multimedia/effects/qsoundeffect.cpp
@@ -56,18 +56,25 @@ QT_BEGIN_NAMESPACE
\since 4.7
\brief The SoundEffect element provides a way to play sound effects in qml.
+ This element is part of the \bold{Qt.multimedia 4.7} module.
+
The following example plays a wav file on mouse click.
\qml
- SoundEffect {
- id: playSound
- source: "test.wav"
- }
- MouseArea {
- id: playArea
- anchors.fill: parent
- onPressed: {
- playSound.play()
+ import Qt 4.6
+ import Qt.multimedia 4.7
+
+ Item {
+ SoundEffect {
+ id: playSound
+ source: "test.wav"
+ }
+ MouseArea {
+ id: playArea
+ anchors.fill: parent
+ onPressed: {
+ playSound.play()
+ }
}
}
\endqml