diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-22 05:13:14 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-22 05:13:14 (GMT) |
commit | 69b1784edb6dd82f26100d0e539bfa8a65bdd35d (patch) | |
tree | 6d7d6804e59aa6e46d2bde6d98e7fd06bdf1800a /src/multimedia/qml | |
parent | 155ae1da9dcf11617f412e5c229a2a12a333d7db (diff) | |
parent | 129b6b9b5c6502058c7701367119bfe6607fbff5 (diff) | |
download | Qt-69b1784edb6dd82f26100d0e539bfa8a65bdd35d.zip Qt-69b1784edb6dd82f26100d0e539bfa8a65bdd35d.tar.gz Qt-69b1784edb6dd82f26100d0e539bfa8a65bdd35d.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging:
Documentation fixes.
Add a qRegisterQmlElements function to QtMultimedia
Diffstat (limited to 'src/multimedia/qml')
-rw-r--r-- | src/multimedia/qml/qml.cpp | 68 | ||||
-rw-r--r-- | src/multimedia/qml/qml.h | 60 | ||||
-rw-r--r-- | src/multimedia/qml/qml.pri | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qmlaudio.cpp | 4 | ||||
-rw-r--r-- | src/multimedia/qml/qmlaudio_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qmlgraphicsvideo.cpp | 4 | ||||
-rw-r--r-- | src/multimedia/qml/qmlgraphicsvideo_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect.cpp | 4 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_p.h | 2 |
9 files changed, 139 insertions, 9 deletions
diff --git a/src/multimedia/qml/qml.cpp b/src/multimedia/qml/qml.cpp new file mode 100644 index 0000000..b9ee212 --- /dev/null +++ b/src/multimedia/qml/qml.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtMultimedia/qml.h> +#include <QtMultimedia/private/qsoundeffect_p.h> +#include <QtMultimedia/private/qmlaudio_p.h> +#include <QtMultimedia/private/qmlgraphicsvideo_p.h> + + +QT_BEGIN_NAMESPACE + +namespace QtMultimedia +{ + +/*! + Register the Multimedia QML elements. + \internal +*/ + +void qRegisterQmlElements() +{ + qmlRegisterType<QSoundEffect>("Qt.multimedia", 4, 7, "SoundEffect", "SoundEffect"); + qmlRegisterType<QmlAudio>("Qt.multimedia", 4, 7, "Audio", "Audio"); + qmlRegisterType<QmlGraphicsVideo>("Qt.multimedia", 4, 7, "Video", "Video"); +} + +} + +QT_END_NAMESPACE + diff --git a/src/multimedia/qml/qml.h b/src/multimedia/qml/qml.h new file mode 100644 index 0000000..41274c8 --- /dev/null +++ b/src/multimedia/qml/qml.h @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTMULTIMEDIA_QML_H +#define QTMULTIMEDIA_QML_H + +#include <QtCore/qglobal.h> + +QT_BEGIN_HEADER +QT_BEGIN_NAMESPACE + +QT_MODULE(Multimedia) + +namespace QtMultimedia +{ +extern void Q_MULTIMEDIA_EXPORT qRegisterQmlElements(); +} + +QT_END_NAMESPACE +QT_END_HEADER + +#endif // ifndef QTMULTIMEDIA_QML_H diff --git a/src/multimedia/qml/qml.pri b/src/multimedia/qml/qml.pri index 370232e..e506632 100644 --- a/src/multimedia/qml/qml.pri +++ b/src/multimedia/qml/qml.pri @@ -17,6 +17,7 @@ contains(QT_CONFIG, declarative) { } HEADERS += \ + $$PWD/qml.h \ $$PWD/qmetadatacontrolmetaobject_p.h \ $$PWD/qmlaudio_p.h \ $$PWD/qmlgraphicsvideo_p.h \ @@ -25,6 +26,7 @@ contains(QT_CONFIG, declarative) { $$PWD/wavedecoder_p.h SOURCES += \ + $$PWD/qml.cpp \ $$PWD/qmetadatacontrolmetaobject.cpp \ $$PWD/qmlaudio.cpp \ $$PWD/qmlgraphicsvideo.cpp \ diff --git a/src/multimedia/qml/qmlaudio.cpp b/src/multimedia/qml/qmlaudio.cpp index 5719050..b54d644 100644 --- a/src/multimedia/qml/qmlaudio.cpp +++ b/src/multimedia/qml/qmlaudio.cpp @@ -280,7 +280,7 @@ QmlAudio::Status QmlAudio::status() const */ /*! - \qmlproperty qreal playbackRate + \qmlproperty qreal Audio::playbackRate This property holds the rate at which audio is played at as a multiple of the normal rate. */ @@ -313,7 +313,7 @@ QmlAudio::Error QmlAudio::error() const */ /*! - \qmlproperty Audio::onError(error, errorString) + \qmlsignal Audio::onError(error, errorString) This property is called when an \l {Error}{error} has occurred. The errorString parameter may contain more detailed information about the error. diff --git a/src/multimedia/qml/qmlaudio_p.h b/src/multimedia/qml/qmlaudio_p.h index f6c5cbf..f034518 100644 --- a/src/multimedia/qml/qmlaudio_p.h +++ b/src/multimedia/qml/qmlaudio_p.h @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE class QTimerEvent; -class Q_MULTIMEDIA_EXPORT QmlAudio : public QObject, public QmlMediaBase, public QmlParserStatus +class Q_AUTOTEST_EXPORT QmlAudio : public QObject, public QmlMediaBase, public QmlParserStatus { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/multimedia/qml/qmlgraphicsvideo.cpp b/src/multimedia/qml/qmlgraphicsvideo.cpp index fde505d..9e30774 100644 --- a/src/multimedia/qml/qmlgraphicsvideo.cpp +++ b/src/multimedia/qml/qmlgraphicsvideo.cpp @@ -280,7 +280,7 @@ bool QmlGraphicsVideo::hasVideo() const */ /*! - \qmlproperty qreal playbackRate + \qmlproperty qreal Video::playbackRate This property holds the rate at which video is played at as a multiple of the normal rate. */ @@ -314,7 +314,7 @@ QmlGraphicsVideo::Error QmlGraphicsVideo::error() const */ /*! - \qmlproperty Video::onError(error, errorString) + \qmlsignal Video::onError(error, errorString) This property is called when an \l {Error}{error} has occurred. The errorString parameter may contain more detailed information about the error. diff --git a/src/multimedia/qml/qmlgraphicsvideo_p.h b/src/multimedia/qml/qmlgraphicsvideo_p.h index bd15b7f..a4f8e32 100644 --- a/src/multimedia/qml/qmlgraphicsvideo_p.h +++ b/src/multimedia/qml/qmlgraphicsvideo_p.h @@ -58,7 +58,7 @@ class QTimerEvent; class QVideoSurfaceFormat; -class Q_MULTIMEDIA_EXPORT QmlGraphicsVideo : public QmlGraphicsItem, public QmlMediaBase +class Q_AUTOTEST_EXPORT QmlGraphicsVideo : public QmlGraphicsItem, public QmlMediaBase { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp index 1a67414..f0c9659 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/qml/qsoundeffect.cpp @@ -54,7 +54,7 @@ /*! - \qmlclass QSoundEffect + \qmlclass SoundEffect QSoundEffect \brief The SoundEffect element provides a way to play sound effects in qml. The following example plays a wav file on mouse click. @@ -71,7 +71,7 @@ playSound.play() } } - \endeml + \endqml \sa SoundEffect */ diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/qml/qsoundeffect_p.h index 2610a69..ab6f9e5 100644 --- a/src/multimedia/qml/qsoundeffect_p.h +++ b/src/multimedia/qml/qsoundeffect_p.h @@ -64,7 +64,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QSoundEffectPrivate; -class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject +class Q_AUTOTEST_EXPORT QSoundEffect : public QObject { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) |