From 6857fd7b99ba0c72c2f09cfc7ad38e9df4f0531c Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 28 Apr 2010 07:42:15 +1000 Subject: update multimedia qml element doc samples Reviewed-by:Derick Hawcroft --- src/imports/multimedia/qdeclarativeaudio.cpp | 16 +++++++++++++++- src/imports/multimedia/qdeclarativevideo.cpp | 19 ++++++++++++++++++- src/multimedia/mediaservices/effects/qsoundeffect.cpp | 12 +++++++----- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp index 896f9b7..a163b10 100644 --- a/src/imports/multimedia/qdeclarativeaudio.cpp +++ b/src/imports/multimedia/qdeclarativeaudio.cpp @@ -57,7 +57,21 @@ QT_BEGIN_NAMESPACE import Qt 4.7 import Qt.multimedia 4.7 - Audio { source: "audio/song.mp3" } + Text { + text: "Click Me!"; + font.pointSize: 24; + width: 150; height: 50; + + Audio { + id: playMusic + source: "music.wav" + } + MouseArea { + id: playArea + anchors.fill: parent + onPressed: { playMusic.play() } + } + } \endqml \sa Video diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp index 9b02795..1b51e2c 100644 --- a/src/imports/multimedia/qdeclarativevideo.cpp +++ b/src/imports/multimedia/qdeclarativevideo.cpp @@ -79,7 +79,24 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString) import Qt 4.7 import Qt.multimedia 4.7 - Video { source: "video/movie.mpg" } + Video { + id: video + width : 800 + height : 600 + source: "video.avi" + + MouseArea { + anchors.fill: parent + onClicked: { + video.play() + } + } + + focus: true + Keys.onSpacePressed: video.paused = !video.paused + Keys.onLeftPressed: video.position -= 5000 + Keys.onRightPressed: video.position += 5000 + } \endqml The Video item supports untransformed, stretched, and uniformly scaled video presentation. diff --git a/src/multimedia/mediaservices/effects/qsoundeffect.cpp b/src/multimedia/mediaservices/effects/qsoundeffect.cpp index 1992ee5..3537566 100644 --- a/src/multimedia/mediaservices/effects/qsoundeffect.cpp +++ b/src/multimedia/mediaservices/effects/qsoundeffect.cpp @@ -64,17 +64,19 @@ QT_BEGIN_NAMESPACE import Qt 4.7 import Qt.multimedia 4.7 - Item { + Text { + text: "Click Me!"; + font.pointSize: 24; + width: 150; height: 50; + SoundEffect { id: playSound - source: "test.wav" + source: "soundeffect.wav" } MouseArea { id: playArea anchors.fill: parent - onPressed: { - playSound.play() - } + onPressed: { playSound.play() } } } \endqml -- cgit v0.12 From 5db00ed35bc87b6502478d727624f67b82e80cb6 Mon Sep 17 00:00:00 2001 From: Derick Hawcroft Date: Wed, 28 Apr 2010 07:42:28 +1000 Subject: When deployed on symbian, give player application the standard QT icon Reviewed-by: Kurt Korbatits --- demos/multimedia/player/player.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/multimedia/player/player.pro b/demos/multimedia/player/player.pro index 0b868bd..12bdf64 100644 --- a/demos/multimedia/player/player.pro +++ b/demos/multimedia/player/player.pro @@ -24,5 +24,6 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000E3FA + include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) } -- cgit v0.12 From a2effe201fd2480f632c356cd9307e1e631c0fe7 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 28 Apr 2010 07:50:00 +1000 Subject: Fix qdoc error in low-level audio Reviewed-by:Derick Hawcroft --- src/multimedia/multimedia/audio/qaudioinput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/multimedia/multimedia/audio/qaudioinput.cpp b/src/multimedia/multimedia/audio/qaudioinput.cpp index c99e870..3676f64 100644 --- a/src/multimedia/multimedia/audio/qaudioinput.cpp +++ b/src/multimedia/multimedia/audio/qaudioinput.cpp @@ -211,7 +211,7 @@ QAudioInput::~QAudioInput() If a problem occurs during this process the error() is set to QAudio::OpenError, state() is set to QAudio::StoppedState and stateChanged() signal is emitted. - \sa {Symbian Platform Security Requirements} + \l{QAudioInput#Symbian Platform Security Requirements} \sa QIODevice */ @@ -233,7 +233,7 @@ void QAudioInput::start(QIODevice* device) If a problem occurs during this process the error() is set to QAudio::OpenError, state() is set to QAudio::StoppedState and stateChanged() signal is emitted. - \sa {Symbian Platform Security Requirements} + \l{QAudioInput#Symbian Platform Security Requirements} \sa QIODevice */ -- cgit v0.12