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

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

View File

@@ -92,6 +92,30 @@ public:
trUtf8("CameraFlash is only provided by Camera element"));
qmlRegisterUncreatableType<QDeclarativeCameraImageProcessing>(uri, 4, 0, "CameraImageProcessing",
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>();
}

View File

@@ -52,11 +52,11 @@ QT_BEGIN_NAMESPACE
\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
import Qt 4.7
import QtMultimedia 4.0
import QtQuick 2.0
import QtMultimedia 5.0
Text {
text: "Click Me!";

View File

@@ -75,11 +75,11 @@ void QDeclarativeCamera::_q_updateState(QCamera::State state)
\ingroup qml-multimedia
\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
import Qt 4.7
import QtMultimedia 4.0
import QtQuick 2.0
import QtMultimedia 5.0
Camera {
id: camera

View File

@@ -46,17 +46,17 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass CameraExposure QDeclarativeCameraExposure
\since 4.0
\since 5.0
\brief The CameraExposure element provides interface for exposure related camera settings.
\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.
\qml
import QtQuick 2.0
import QtMultimedia 4.0
import QtMultimedia 5.0
Camera {
id: camera

View File

@@ -46,17 +46,17 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass CameraFlash QDeclarativeCameraFlash
\since 4.0
\since 5.0
\brief The CameraFlash element provides interface for flash related camera settings.
\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.
\qml
import QtQuick 2.0
import QtMultimedia 4.0
import QtMultimedia 5.0
Camera {
id: camera

View File

@@ -46,17 +46,17 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass CameraFocus QDeclarativeCameraFocus
\since 4.0
\since 5.0
\brief The CameraFocus element provides interface for focus related camera settings.
\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.
\qml
import QtQuick 2.0
import QtMultimedia 4.0
import QtMultimedia 5.0
Camera {
id: camera

View File

@@ -72,11 +72,11 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
\inherits Item
\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
import Qt 4.7
import QtMultimedia 4.0
import QtQuick 2.0
import QtMultimedia 5.0
Video {
id: video

View File

@@ -118,14 +118,15 @@ private:
/*!
\qmlclass VideoOutput QDeclarativeVideoOutput
\brief The VideoOutput element allows you to render video or camera viewfinder.
\since 5.0.0
\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
import QtQuick 2.0
import QtMultimedia 4.0
import QtMultimedia 5.0
Rectangle {
width: 800

View File

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

View File

@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
\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.