diff options
-rw-r--r-- | src/multimedia/qml/qmlaudio.cpp | 1 | ||||
-rw-r--r-- | src/multimedia/qml/qmlaudio_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qmlgraphicsvideo.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qmlgraphicsvideo_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect.cpp | 1 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_p.h | 2 | ||||
-rw-r--r-- | src/plugins/plugins.pro | 2 | ||||
-rw-r--r-- | src/plugins/qmlmodules/multimedia/multimedia.cpp | 75 | ||||
-rw-r--r-- | src/plugins/qmlmodules/multimedia/multimedia.pro | 11 | ||||
-rw-r--r-- | src/plugins/qmlmodules/qmlmodules.pro | 4 |
10 files changed, 95 insertions, 7 deletions
diff --git a/src/multimedia/qml/qmlaudio.cpp b/src/multimedia/qml/qmlaudio.cpp index fc340d0..5719050 100644 --- a/src/multimedia/qml/qmlaudio.cpp +++ b/src/multimedia/qml/qmlaudio.cpp @@ -45,7 +45,6 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,Audio,QmlAudio); /*! \qmlclass Audio QmlAudio diff --git a/src/multimedia/qml/qmlaudio_p.h b/src/multimedia/qml/qmlaudio_p.h index f034518..f6c5cbf 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_AUTOTEST_EXPORT QmlAudio : public QObject, public QmlMediaBase, public QmlParserStatus +class Q_MULTIMEDIA_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 236387e..1dd1f8b 100644 --- a/src/multimedia/qml/qmlgraphicsvideo.cpp +++ b/src/multimedia/qml/qmlgraphicsvideo.cpp @@ -50,8 +50,6 @@ QT_BEGIN_NAMESPACE -QML_DEFINE_TYPE(Qt,4,6,Video,QmlGraphicsVideo); - void QmlGraphicsVideo::_q_nativeSizeChanged(const QSizeF &size) { diff --git a/src/multimedia/qml/qmlgraphicsvideo_p.h b/src/multimedia/qml/qmlgraphicsvideo_p.h index a4f8e32..bd15b7f 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_AUTOTEST_EXPORT QmlGraphicsVideo : public QmlGraphicsItem, public QmlMediaBase +class Q_MULTIMEDIA_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 b9174b7..1a67414 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/qml/qsoundeffect.cpp @@ -52,7 +52,6 @@ #include "qsoundeffect_qsound_p.h" #endif -QML_DEFINE_TYPE(Qt,4,6,SoundEffect,QSoundEffect) /*! \qmlclass QSoundEffect diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/qml/qsoundeffect_p.h index 6d5790d..2610a69 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 QSoundEffect : public QObject +class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 5eca0f4..dc2266b 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -12,4 +12,6 @@ embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers symbian:SUBDIRS += s60 contains(QT_CONFIG, phonon): SUBDIRS *= phonon contains(QT_CONFIG, multimedia): SUBDIRS *= audio mediaservices +contains(QT_CONFIG, declarative): SUBDIRS *= qmlmodules + diff --git a/src/plugins/qmlmodules/multimedia/multimedia.cpp b/src/plugins/qmlmodules/multimedia/multimedia.cpp new file mode 100644 index 0000000..9710486 --- /dev/null +++ b/src/plugins/qmlmodules/multimedia/multimedia.cpp @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins 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 <QtDeclarative/qmlmoduleplugin.h> +#include <QtDeclarative/qml.h> +#include <QtMultimedia/private/qsoundeffect_p.h> +#include <QtMultimedia/private/qmlaudio_p.h> +#include <QtMultimedia/private/qmlgraphicsvideo_p.h> + +QT_BEGIN_NAMESPACE + +class QMultimediaQmlModule : public QmlModulePlugin +{ + Q_OBJECT +public: + QStringList keys() const + { + return QStringList() << QLatin1String("qt.multimedia"); + } + + void defineModule(const QString& uri) + { + Q_UNUSED(uri) + Q_ASSERT(uri == QLatin1String("qt.multimedia")); + + 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 + +#include "multimedia.moc" + +Q_EXPORT_PLUGIN2(qmultimediaqmlmodule, QT_PREPEND_NAMESPACE(QMultimediaQmlModule)); + diff --git a/src/plugins/qmlmodules/multimedia/multimedia.pro b/src/plugins/qmlmodules/multimedia/multimedia.pro new file mode 100644 index 0000000..f04cc14 --- /dev/null +++ b/src/plugins/qmlmodules/multimedia/multimedia.pro @@ -0,0 +1,11 @@ +TARGET = multimedia +include(../../qpluginbase.pri) + +QT += multimedia declarative + +SOURCES += multimedia.cpp + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmlmodules +target.path = $$[QT_INSTALL_PLUGINS]/plugins/qmlmodules +INSTALLS += target + diff --git a/src/plugins/qmlmodules/qmlmodules.pro b/src/plugins/qmlmodules/qmlmodules.pro new file mode 100644 index 0000000..b1dc0ef --- /dev/null +++ b/src/plugins/qmlmodules/qmlmodules.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs + +contains(QT_CONFIG, multimedia): SUBDIRS += multimedia + |