Updated QtMultimedia declarative module to version 5.0

The QtMultimedia module should have version 5.0 to align with
Qt 5 in general. This change updates the version, but keeps
4.0 versions of the elements for compatability purposes.

Documentation and examples has also been updated to reflect
this version change.

Change-Id: Ica10c1a5ecc2c7233192a65e04ff77eb33a77e30
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Jonas Rabbe
2012-01-11 12:12:55 +10:00
committed by Qt by Nokia
parent 99b80809c7
commit 3d88a055d0
30 changed files with 79 additions and 54 deletions

View File

@@ -77,7 +77,7 @@ a wiggly effect to the content:
\code \code
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Rectangle { Rectangle {
width: 300 width: 300

View File

@@ -54,8 +54,8 @@
\qml \qml
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
// ... // ...
Audio { Audio {
@@ -237,8 +237,8 @@
\qml \qml
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
SoundEffect { SoundEffect {
@@ -264,8 +264,8 @@
including white balance, exposure compensation and flash mode, and control zoom. including white balance, exposure compensation and flash mode, and control zoom.
\qml \qml
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Camera { Camera {
focus : visible // to receive focus and capture key events when visible focus : visible // to receive focus and capture key events when visible

View File

@@ -40,8 +40,8 @@
****************************************************************************/ ****************************************************************************/
//! [complete snippet] //! [complete snippet]
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Text { Text {
text: "Click Me!"; text: "Click Me!";

View File

@@ -38,7 +38,7 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
Item { Item {
id: button id: button

View File

@@ -38,8 +38,8 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Item { Item {
id: propertyButton id: propertyButton

View File

@@ -38,7 +38,7 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
Rectangle { Rectangle {
id: propertyPopup id: propertyPopup

View File

@@ -38,8 +38,8 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
FocusScope { FocusScope {
property Camera camera property Camera camera

View File

@@ -38,7 +38,7 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
Item { Item {
id: exposureCompensation id: exposureCompensation

View File

@@ -38,7 +38,7 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
Item { Item {
id: flickableList id: flickableList

View File

@@ -38,8 +38,8 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
CameraButton { CameraButton {
property Camera camera property Camera camera

View File

@@ -38,8 +38,8 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Item { Item {
property alias source : preview.source property alias source : preview.source

View File

@@ -38,8 +38,8 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Item { Item {
id : zoomControl id : zoomControl

View File

@@ -38,8 +38,8 @@
** **
****************************************************************************/ ****************************************************************************/
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Rectangle { Rectangle {
id : cameraUI id : cameraUI

View File

@@ -39,7 +39,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import Qt.multimedia 4.0 import QtMultimedia 5.0
Rectangle { Rectangle {
width: 400; height: 300; width: 400; height: 300;

View File

@@ -40,7 +40,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
VideoOutput { VideoOutput {
id: root id: root

View File

@@ -40,7 +40,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Scene { Scene {
id: root id: root

View File

@@ -40,7 +40,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
VideoOutput { VideoOutput {
id: root id: root

View File

@@ -40,7 +40,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
VideoOutput { VideoOutput {
source: camera source: camera

View File

@@ -40,7 +40,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
VideoOutput { VideoOutput {
source: mediaPlayer source: mediaPlayer

View File

@@ -40,7 +40,7 @@
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Item { Item {
id: video id: video

View File

@@ -92,6 +92,30 @@ public:
trUtf8("CameraFlash is only provided by Camera element")); trUtf8("CameraFlash is only provided by Camera element"));
qmlRegisterUncreatableType<QDeclarativeCameraImageProcessing>(uri, 4, 0, "CameraImageProcessing", qmlRegisterUncreatableType<QDeclarativeCameraImageProcessing>(uri, 4, 0, "CameraImageProcessing",
trUtf8("CameraImageProcessing is only provided by Camera element")); trUtf8("CameraImageProcessing is only provided by Camera element"));
// Introduced to help transition from QtMultimedia 4.0 to 5.0 (official for Qt 5)
// the 4.0 versioned types will be removed once all clients have made the transition.
qmlRegisterType<QSoundEffect>(uri, 5, 0, "SoundEffect");
qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "Audio");
qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "MediaPlayer");
qmlRegisterType<QDeclarativeVideoOutput>(uri, 5, 0, "VideoOutput");
qmlRegisterType<QDeclarativeRadio>(uri, 5, 0, "Radio");
qmlRegisterType<QDeclarativeRadioData>(uri, 5, 0, "RadioData");
qmlRegisterType<QDeclarativeBackgroundAudio>(uri, 5, 0, "BackgroundAudio");
qmlRegisterType<QDeclarativeCamera>(uri, 5, 0, "Camera");
qmlRegisterUncreatableType<QDeclarativeCameraCapture>(uri, 5, 0, "CameraCapture",
trUtf8("CameraCapture is only provided by Camera element"));
qmlRegisterUncreatableType<QDeclarativeCameraRecorder>(uri, 5, 0, "CameraRecorder",
trUtf8("CameraRecorder is only provided by Camera element"));
qmlRegisterUncreatableType<QDeclarativeCameraExposure>(uri, 5, 0, "CameraExposure",
trUtf8("CameraExposure is only provided by Camera element"));
qmlRegisterUncreatableType<QDeclarativeCameraFocus>(uri, 5, 0, "CameraFocus",
trUtf8("CameraFocus is only provided by Camera element"));
qmlRegisterUncreatableType<QDeclarativeCameraFlash>(uri, 5, 0, "CameraFlash",
trUtf8("CameraFlash is only provided by Camera element"));
qmlRegisterUncreatableType<QDeclarativeCameraImageProcessing>(uri, 5, 0, "CameraImageProcessing",
trUtf8("CameraImageProcessing is only provided by Camera element"));
qmlRegisterType<QDeclarativeMediaMetaData>(); qmlRegisterType<QDeclarativeMediaMetaData>();
} }

View File

@@ -52,11 +52,11 @@ QT_BEGIN_NAMESPACE
\ingroup qml-multimedia \ingroup qml-multimedia
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
\qml \qml
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Text { Text {
text: "Click Me!"; text: "Click Me!";

View File

@@ -75,11 +75,11 @@ void QDeclarativeCamera::_q_updateState(QCamera::State state)
\ingroup qml-multimedia \ingroup qml-multimedia
\inherits Item \inherits Item
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
\qml \qml
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Camera { Camera {
id: camera id: camera

View File

@@ -46,17 +46,17 @@ QT_BEGIN_NAMESPACE
/*! /*!
\qmlclass CameraExposure QDeclarativeCameraExposure \qmlclass CameraExposure QDeclarativeCameraExposure
\since 4.0 \since 5.0
\brief The CameraExposure element provides interface for exposure related camera settings. \brief The CameraExposure element provides interface for exposure related camera settings.
\ingroup qml-multimedia \ingroup qml-multimedia
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
It should not be constructed separately but provided by Camera.exposure. It should not be constructed separately but provided by Camera.exposure.
\qml \qml
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Camera { Camera {
id: camera id: camera

View File

@@ -46,17 +46,17 @@ QT_BEGIN_NAMESPACE
/*! /*!
\qmlclass CameraFlash QDeclarativeCameraFlash \qmlclass CameraFlash QDeclarativeCameraFlash
\since 4.0 \since 5.0
\brief The CameraFlash element provides interface for flash related camera settings. \brief The CameraFlash element provides interface for flash related camera settings.
\ingroup qml-multimedia \ingroup qml-multimedia
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
It should not be constructed separately but provided by Camera.flash. It should not be constructed separately but provided by Camera.flash.
\qml \qml
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Camera { Camera {
id: camera id: camera

View File

@@ -46,17 +46,17 @@ QT_BEGIN_NAMESPACE
/*! /*!
\qmlclass CameraFocus QDeclarativeCameraFocus \qmlclass CameraFocus QDeclarativeCameraFocus
\since 4.0 \since 5.0
\brief The CameraFocus element provides interface for focus related camera settings. \brief The CameraFocus element provides interface for focus related camera settings.
\ingroup qml-multimedia \ingroup qml-multimedia
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
It should not be constructed separately but provided by Camera.focus. It should not be constructed separately but provided by Camera.focus.
\qml \qml
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Camera { Camera {
id: camera id: camera

View File

@@ -72,11 +72,11 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
\inherits Item \inherits Item
\ingroup qml-multimedia \ingroup qml-multimedia
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
\qml \qml
import Qt 4.7 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Video { Video {
id: video id: video

View File

@@ -118,14 +118,15 @@ private:
/*! /*!
\qmlclass VideoOutput QDeclarativeVideoOutput \qmlclass VideoOutput QDeclarativeVideoOutput
\brief The VideoOutput element allows you to render video or camera viewfinder. \brief The VideoOutput element allows you to render video or camera viewfinder.
\since 5.0.0
\ingroup qml-multimedia \ingroup qml-multimedia
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
\qml \qml
import QtQuick 2.0 import QtQuick 2.0
import QtMultimedia 4.0 import QtMultimedia 5.0
Rectangle { Rectangle {
width: 800 width: 800

View File

@@ -1,2 +1,2 @@
plugin declarative_multimedia plugin declarative_multimedia
Video 4.0 Video.qml Video 5.0 Video.qml

View File

@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
\inmodule QtMultimedia \inmodule QtMultimedia
This element is part of the \bold{QtMultimedia 4.0} module. This element is part of the \bold{QtMultimedia 5.0} module.
The following example plays a WAV file on mouse click. The following example plays a WAV file on mouse click.