diff options
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/qml/multimediadeclarative.cpp (renamed from src/multimedia/qml/multimediaqml.cpp) | 16 | ||||
-rw-r--r-- | src/multimedia/qml/multimediadeclarative.h (renamed from src/multimedia/qml/multimediaqml.h) | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativeaudio.cpp (renamed from src/multimedia/qml/qmlaudio.cpp) | 26 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativeaudio_p.h (renamed from src/multimedia/qml/qmlaudio_p.h) | 24 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativemediabase.cpp (renamed from src/multimedia/qml/qmlmediabase.cpp) | 72 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativemediabase_p.h (renamed from src/multimedia/qml/qmlmediabase_p.h) | 16 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativevideo.cpp (renamed from src/multimedia/qml/qmlgraphicsvideo.cpp) | 44 | ||||
-rw-r--r-- | src/multimedia/qml/qdeclarativevideo_p.h (renamed from src/multimedia/qml/qmlgraphicsvideo_p.h) | 22 | ||||
-rw-r--r-- | src/multimedia/qml/qml.pri | 16 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_p.h | 2 |
10 files changed, 121 insertions, 119 deletions
diff --git a/src/multimedia/qml/multimediaqml.cpp b/src/multimedia/qml/multimediadeclarative.cpp index be49915..7f5298f 100644 --- a/src/multimedia/qml/multimediaqml.cpp +++ b/src/multimedia/qml/multimediadeclarative.cpp @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#include <QtMultimedia/multimediaqml.h> +#include <QtMultimedia/multimediadeclarative.h> #include <QtMultimedia/private/qsoundeffect_p.h> -#include <QtMultimedia/private/qmlaudio_p.h> -#include <QtMultimedia/private/qmlgraphicsvideo_p.h> +#include <QtMultimedia/private/qdeclarativeaudio_p.h> +#include <QtMultimedia/private/qdeclarativevideo_p.h> QT_BEGIN_NAMESPACE @@ -55,11 +55,13 @@ namespace QtMultimedia \internal */ -void qRegisterQmlElements() +void qRegisterDeclarativeElements(const char *uri) { - qmlRegisterType<QSoundEffect>("Qt.multimedia", 4, 7, "SoundEffect", "SoundEffect"); - qmlRegisterType<QmlAudio>("Qt.multimedia", 4, 7, "Audio", "Audio"); - qmlRegisterType<QmlGraphicsVideo>("Qt.multimedia", 4, 7, "Video", "Video"); + Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia")); + + qmlRegisterType<QSoundEffect>(uri, 4, 7, "SoundEffect"); + qmlRegisterType<QDeclarativeAudio>(uri, 4, 7, "Audio"); + qmlRegisterType<QDeclarativeVideo>(uri, 4, 7, "Video"); } } diff --git a/src/multimedia/qml/multimediaqml.h b/src/multimedia/qml/multimediadeclarative.h index 41274c8..29af65a 100644 --- a/src/multimedia/qml/multimediaqml.h +++ b/src/multimedia/qml/multimediadeclarative.h @@ -51,7 +51,7 @@ QT_MODULE(Multimedia) namespace QtMultimedia { -extern void Q_MULTIMEDIA_EXPORT qRegisterQmlElements(); +extern void Q_MULTIMEDIA_EXPORT qRegisterDeclarativeElements(const char *uri); } QT_END_NAMESPACE diff --git a/src/multimedia/qml/qmlaudio.cpp b/src/multimedia/qml/qdeclarativeaudio.cpp index 89f045e..67df625 100644 --- a/src/multimedia/qml/qmlaudio.cpp +++ b/src/multimedia/qml/qdeclarativeaudio.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qmlaudio_p.h" +#include "qdeclarativeaudio_p.h" #include <QtMultimedia/qmediaplayercontrol.h> @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass Audio QmlAudio + \qmlclass Audio QDeclarativeAudio \brief The Audio element allows you to add audio playback to a scene. \qml @@ -59,11 +59,11 @@ QT_BEGIN_NAMESPACE /*! \internal - \class QmlAudio - \brief The QmlAudio class provides an audio item that you can add to a QmlView. + \class QDeclarativeAudio + \brief The QDeclarativeAudio class provides an audio item that you can add to a QDeclarativeView. */ -void QmlAudio::_q_error(int errorCode, const QString &errorString) +void QDeclarativeAudio::_q_error(int errorCode, const QString &errorString) { m_error = QMediaPlayer::Error(errorCode); m_errorString = errorString; @@ -73,13 +73,13 @@ void QmlAudio::_q_error(int errorCode, const QString &errorString) } -QmlAudio::QmlAudio(QObject *parent) +QDeclarativeAudio::QDeclarativeAudio(QObject *parent) : QObject(parent) { setObject(this); } -QmlAudio::~QmlAudio() +QDeclarativeAudio::~QDeclarativeAudio() { shutdown(); } @@ -92,7 +92,7 @@ QmlAudio::~QmlAudio() Sets the \l playing property to true, and the \l paused property to false. */ -void QmlAudio::play() +void QDeclarativeAudio::play() { m_playerControl->play(); @@ -110,7 +110,7 @@ void QmlAudio::play() Sets the \l playing and \l paused properties to true. */ -void QmlAudio::pause() +void QDeclarativeAudio::pause() { m_playerControl->pause(); @@ -128,7 +128,7 @@ void QmlAudio::pause() Sets the \l playing and \l paused properties to false. */ -void QmlAudio::stop() +void QDeclarativeAudio::stop() { m_playerControl->stop(); @@ -202,7 +202,7 @@ void QmlAudio::stop() \endlist */ -QmlAudio::Status QmlAudio::status() const +QDeclarativeAudio::Status QDeclarativeAudio::status() const { return Status(m_status); } @@ -301,7 +301,7 @@ QmlAudio::Status QmlAudio::status() const \endlist */ -QmlAudio::Error QmlAudio::error() const +QDeclarativeAudio::Error QDeclarativeAudio::error() const { return Error(m_error); } @@ -321,6 +321,6 @@ QmlAudio::Error QmlAudio::error() const QT_END_NAMESPACE -#include "moc_qmlaudio_p.cpp" +#include "moc_qdeclarativeaudio_p.cpp" diff --git a/src/multimedia/qml/qmlaudio_p.h b/src/multimedia/qml/qdeclarativeaudio_p.h index bb0d301..d1fb275 100644 --- a/src/multimedia/qml/qmlaudio_p.h +++ b/src/multimedia/qml/qdeclarativeaudio_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLAUDIO_P_H -#define QMLAUDIO_P_H +#ifndef QDECLARATIVEAUDIO_P_H +#define QDECLARATIVEAUDIO_P_H // // W A R N I N G @@ -53,10 +53,10 @@ // We mean it. // -#include <QtMultimedia/private/qmlmediabase_p.h> +#include <QtMultimedia/private/qdeclarativemediabase_p.h> #include <QtCore/qbasictimer.h> -#include <QtDeclarative/qmlgraphicsitem.h> +#include <QtDeclarative/qdeclarativeitem.h> QT_BEGIN_HEADER @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE class QTimerEvent; -class Q_AUTOTEST_EXPORT QmlAudio : public QObject, public QmlMediaBase, public QmlParserStatus +class Q_AUTOTEST_EXPORT QDeclarativeAudio : public QObject, public QDeclarativeMediaBase, public QDeclarativeParserStatus { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) @@ -83,7 +83,7 @@ class Q_AUTOTEST_EXPORT QmlAudio : public QObject, public QmlMediaBase, public Q Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged) Q_ENUMS(Status) Q_ENUMS(Error) - Q_INTERFACES(QmlParserStatus) + Q_INTERFACES(QDeclarativeParserStatus) public: enum Status { @@ -108,8 +108,8 @@ public: ServiceMissing = QMediaPlayer::ServiceMissingError }; - QmlAudio(QObject *parent = 0); - ~QmlAudio(); + QDeclarativeAudio(QObject *parent = 0); + ~QDeclarativeAudio(); Status status() const; Error error() const; @@ -150,23 +150,23 @@ Q_SIGNALS: void playbackRateChanged(); void errorChanged(); - void error(QmlAudio::Error error, const QString &errorString); + void error(QDeclarativeAudio::Error error, const QString &errorString); private Q_SLOTS: void _q_error(int, const QString &); private: - Q_DISABLE_COPY(QmlAudio) + Q_DISABLE_COPY(QDeclarativeAudio) Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State)) Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus)) Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged()) - inline QmlMediaBase *mediaBase() { return this; } + inline QDeclarativeMediaBase *mediaBase() { return this; } }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QmlAudio)) +QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeAudio)) QT_END_HEADER diff --git a/src/multimedia/qml/qmlmediabase.cpp b/src/multimedia/qml/qdeclarativemediabase.cpp index 11b4337..e054cb2 100644 --- a/src/multimedia/qml/qmlmediabase.cpp +++ b/src/multimedia/qml/qdeclarativemediabase.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "QtMultimedia/private/qmlmediabase_p.h" +#include "QtMultimedia/private/qdeclarativemediabase_p.h" #include <QtCore/qcoreevent.h> #include <QtCore/qurl.h> @@ -55,19 +55,19 @@ QT_BEGIN_NAMESPACE -class QmlMediaBaseObject : public QMediaObject +class QDeclarativeMediaBaseObject : public QMediaObject { public: - QmlMediaBaseObject(QMediaService *service) + QDeclarativeMediaBaseObject(QMediaService *service) : QMediaObject(0, service) { } }; -class QmlMediaBasePlayerControl : public QMediaPlayerControl +class QDeclarativeMediaBasePlayerControl : public QMediaPlayerControl { public: - QmlMediaBasePlayerControl(QObject *parent) + QDeclarativeMediaBasePlayerControl(QObject *parent) : QMediaPlayerControl(parent) { } @@ -98,10 +98,10 @@ public: void stop() {} }; -class QmlMediaBaseAnimation : public QObject +class QDeclarativeMediaBaseAnimation : public QObject { public: - QmlMediaBaseAnimation(QmlMediaBase *media) + QDeclarativeMediaBaseAnimation(QDeclarativeMediaBase *media) : m_media(media) { } @@ -125,11 +125,11 @@ protected: } private: - QmlMediaBase *m_media; + QDeclarativeMediaBase *m_media; QBasicTimer m_timer; }; -void QmlMediaBase::_q_stateChanged(QMediaPlayer::State state) +void QDeclarativeMediaBase::_q_stateChanged(QMediaPlayer::State state) { if (state != m_state) { QMediaPlayer::State oldState = m_state; @@ -170,7 +170,7 @@ void QmlMediaBase::_q_stateChanged(QMediaPlayer::State state) } } -void QmlMediaBase::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status) +void QDeclarativeMediaBase::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status) { if (status != m_status) { m_status = status; @@ -207,12 +207,12 @@ void QmlMediaBase::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status) } } -void QmlMediaBase::_q_metaDataChanged() +void QDeclarativeMediaBase::_q_metaDataChanged() { m_metaObject->metaDataChanged(); } -QmlMediaBase::QmlMediaBase() +QDeclarativeMediaBase::QDeclarativeMediaBase() : m_mediaService(0) , m_playerControl(0) , m_mediaObject(0) @@ -227,11 +227,11 @@ QmlMediaBase::QmlMediaBase() { } -QmlMediaBase::~QmlMediaBase() +QDeclarativeMediaBase::~QDeclarativeMediaBase() { } -void QmlMediaBase::shutdown() +void QDeclarativeMediaBase::shutdown() { delete m_metaObject; delete m_mediaObject; @@ -243,7 +243,7 @@ void QmlMediaBase::shutdown() } -void QmlMediaBase::setObject(QObject *object) +void QDeclarativeMediaBase::setObject(QObject *object) { if ((m_mediaProvider = QMediaServiceProvider::defaultServiceProvider())) { if ((m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER))) { @@ -251,7 +251,7 @@ void QmlMediaBase::setObject(QObject *object) m_mediaService->control(QMediaPlayerControl_iid)); m_metaDataControl = qobject_cast<QMetaDataControl *>( m_mediaService->control(QMetaDataControl_iid)); - m_mediaObject = new QmlMediaBaseObject(m_mediaService); + m_mediaObject = new QDeclarativeMediaBaseObject(m_mediaService); } } @@ -279,11 +279,11 @@ void QmlMediaBase::setObject(QObject *object) QObject::connect(m_playerControl, SIGNAL(error(int,QString)), object, SLOT(_q_error(int,QString))); - m_animation = new QmlMediaBaseAnimation(this); + m_animation = new QDeclarativeMediaBaseAnimation(this); } else { m_error = QMediaPlayer::ServiceMissingError; - m_playerControl = new QmlMediaBasePlayerControl(object); + m_playerControl = new QDeclarativeMediaBasePlayerControl(object); } if (m_metaDataControl) { @@ -294,12 +294,12 @@ void QmlMediaBase::setObject(QObject *object) } } -QUrl QmlMediaBase::source() const +QUrl QDeclarativeMediaBase::source() const { return m_playerControl->media().canonicalUrl(); } -void QmlMediaBase::setSource(const QUrl &url) +void QDeclarativeMediaBase::setSource(const QUrl &url) { if (m_error != QMediaPlayer::ServiceMissingError && m_error != QMediaPlayer::NoError) { m_error = QMediaPlayer::NoError; @@ -311,12 +311,12 @@ void QmlMediaBase::setSource(const QUrl &url) m_playerControl->setMedia(QMediaContent(url), 0); } -bool QmlMediaBase::isPlaying() const +bool QDeclarativeMediaBase::isPlaying() const { return m_state != QMediaPlayer::StoppedState; } -void QmlMediaBase::setPlaying(bool playing) +void QDeclarativeMediaBase::setPlaying(bool playing) { if (playing && m_state == QMediaPlayer::StoppedState) { if (m_paused) @@ -328,12 +328,12 @@ void QmlMediaBase::setPlaying(bool playing) } } -bool QmlMediaBase::isPaused() const +bool QDeclarativeMediaBase::isPaused() const { return m_paused; } -void QmlMediaBase::setPaused(bool paused) +void QDeclarativeMediaBase::setPaused(bool paused) { if (m_paused != paused) { if (paused && m_state == QMediaPlayer::PlayingState) { @@ -348,63 +348,63 @@ void QmlMediaBase::setPaused(bool paused) } } -int QmlMediaBase::duration() const +int QDeclarativeMediaBase::duration() const { return m_playerControl->duration(); } -int QmlMediaBase::position() const +int QDeclarativeMediaBase::position() const { return m_playerControl->position(); } -void QmlMediaBase::setPosition(int position) +void QDeclarativeMediaBase::setPosition(int position) { m_playerControl->setPosition(position); } -qreal QmlMediaBase::volume() const +qreal QDeclarativeMediaBase::volume() const { return qreal(m_playerControl->volume()) / 100; } -void QmlMediaBase::setVolume(qreal volume) +void QDeclarativeMediaBase::setVolume(qreal volume) { m_playerControl->setVolume(qRound(volume * 100)); } -bool QmlMediaBase::isMuted() const +bool QDeclarativeMediaBase::isMuted() const { return m_playerControl->isMuted(); } -void QmlMediaBase::setMuted(bool muted) +void QDeclarativeMediaBase::setMuted(bool muted) { m_playerControl->setMuted(muted); } -qreal QmlMediaBase::bufferProgress() const +qreal QDeclarativeMediaBase::bufferProgress() const { return qreal(m_playerControl->bufferStatus()) / 100; } -bool QmlMediaBase::isSeekable() const +bool QDeclarativeMediaBase::isSeekable() const { return m_playerControl->isSeekable(); } -qreal QmlMediaBase::playbackRate() const +qreal QDeclarativeMediaBase::playbackRate() const { return m_playerControl->playbackRate(); } -void QmlMediaBase::setPlaybackRate(qreal rate) +void QDeclarativeMediaBase::setPlaybackRate(qreal rate) { m_playerControl->setPlaybackRate(rate); } -QString QmlMediaBase::errorString() const +QString QDeclarativeMediaBase::errorString() const { return m_errorString; } diff --git a/src/multimedia/qml/qmlmediabase_p.h b/src/multimedia/qml/qdeclarativemediabase_p.h index d6ad9b3..2fc48db 100644 --- a/src/multimedia/qml/qmlmediabase_p.h +++ b/src/multimedia/qml/qdeclarativemediabase_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLMEDIABASE_P_H -#define QMLMEDIABASE_P_H +#ifndef QDECLARATIVEMEDIABASE_P_H +#define QDECLARATIVEMEDIABASE_P_H // // W A R N I N G @@ -65,13 +65,13 @@ class QMediaService; class QMediaServiceProvider; class QMetaDataControl; class QMetaDataControlMetaObject; -class QmlMediaBaseAnimation; +class QDeclarativeMediaBaseAnimation; -class Q_AUTOTEST_EXPORT QmlMediaBase +class Q_AUTOTEST_EXPORT QDeclarativeMediaBase { public: - QmlMediaBase(); - virtual ~QmlMediaBase(); + QDeclarativeMediaBase(); + virtual ~QDeclarativeMediaBase(); QUrl source() const; void setSource(const QUrl &url); @@ -150,7 +150,7 @@ protected: QMediaServiceProvider *m_mediaProvider; QMetaDataControl *m_metaDataControl; QMetaDataControlMetaObject *m_metaObject; - QmlMediaBaseAnimation *m_animation; + QDeclarativeMediaBaseAnimation *m_animation; QMediaPlayer::State m_state; QMediaPlayer::MediaStatus m_status; @@ -158,7 +158,7 @@ protected: bool m_paused; QString m_errorString; - friend class QmlMediaBaseAnimation; + friend class QDeclarativeMediaBaseAnimation; }; QT_END_NAMESPACE diff --git a/src/multimedia/qml/qmlgraphicsvideo.cpp b/src/multimedia/qml/qdeclarativevideo.cpp index 7289f4d..d0e94f6 100644 --- a/src/multimedia/qml/qmlgraphicsvideo.cpp +++ b/src/multimedia/qml/qdeclarativevideo.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qmlgraphicsvideo_p.h" +#include "qdeclarativevideo_p.h" #include <QtMultimedia/qmediaplayercontrol.h> #include <QtMultimedia/qmediaservice.h> @@ -51,13 +51,13 @@ QT_BEGIN_NAMESPACE -void QmlGraphicsVideo::_q_nativeSizeChanged(const QSizeF &size) +void QDeclarativeVideo::_q_nativeSizeChanged(const QSizeF &size) { setImplicitWidth(size.width()); setImplicitHeight(size.height()); } -void QmlGraphicsVideo::_q_error(int errorCode, const QString &errorString) +void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString) { m_error = QMediaPlayer::Error(errorCode); m_errorString = errorString; @@ -68,7 +68,7 @@ void QmlGraphicsVideo::_q_error(int errorCode, const QString &errorString) /*! - \qmlclass Video QmlGraphicsVideo + \qmlclass Video QDeclarativeVideo \brief The Video element allows you to add videos to a scene. \inherits Item @@ -87,12 +87,12 @@ void QmlGraphicsVideo::_q_error(int errorCode, const QString &errorString) /*! \internal - \class QmlGraphicsVideo - \brief The QmlGraphicsVideo class provides a video item that you can add to a QmlView. + \class QDeclarativeVideo + \brief The QDeclarativeVideo class provides a video item that you can add to a QDeclarativeView. */ -QmlGraphicsVideo::QmlGraphicsVideo(QmlGraphicsItem *parent) - : QmlGraphicsItem(parent) +QDeclarativeVideo::QDeclarativeVideo(QDeclarativeItem *parent) + : QDeclarativeItem(parent) , m_graphicsItem(0) { @@ -112,7 +112,7 @@ QmlGraphicsVideo::QmlGraphicsVideo(QmlGraphicsItem *parent) } } -QmlGraphicsVideo::~QmlGraphicsVideo() +QDeclarativeVideo::~QDeclarativeVideo() { shutdown(); @@ -183,7 +183,7 @@ QmlGraphicsVideo::~QmlGraphicsVideo() \endlist */ -QmlGraphicsVideo::Status QmlGraphicsVideo::status() const +QDeclarativeVideo::Status QDeclarativeVideo::status() const { return Status(m_status); } @@ -250,7 +250,7 @@ QmlGraphicsVideo::Status QmlGraphicsVideo::status() const This property holds whether the media contains audio. */ -bool QmlGraphicsVideo::hasAudio() const +bool QDeclarativeVideo::hasAudio() const { return m_playerControl->isAudioAvailable(); } @@ -261,7 +261,7 @@ bool QmlGraphicsVideo::hasAudio() const This property holds whether the media contains video. */ -bool QmlGraphicsVideo::hasVideo() const +bool QDeclarativeVideo::hasVideo() const { return m_playerControl->isVideoAvailable(); } @@ -302,7 +302,7 @@ bool QmlGraphicsVideo::hasVideo() const */ -QmlGraphicsVideo::Error QmlGraphicsVideo::error() const +QDeclarativeVideo::Error QDeclarativeVideo::error() const { return Error(m_error); } @@ -334,12 +334,12 @@ QmlGraphicsVideo::Error QmlGraphicsVideo::error() const The default fill mode is PreserveAspectFit. */ -QmlGraphicsVideo::FillMode QmlGraphicsVideo::fillMode() const +QDeclarativeVideo::FillMode QDeclarativeVideo::fillMode() const { return FillMode(m_graphicsItem->aspectRatioMode()); } -void QmlGraphicsVideo::setFillMode(FillMode mode) +void QDeclarativeVideo::setFillMode(FillMode mode) { m_graphicsItem->setAspectRatioMode(Qt::AspectRatioMode(mode)); } @@ -352,7 +352,7 @@ void QmlGraphicsVideo::setFillMode(FillMode mode) Sets the \l playing property to true, and the \l paused property to false. */ -void QmlGraphicsVideo::play() +void QDeclarativeVideo::play() { m_playerControl->play(); @@ -370,7 +370,7 @@ void QmlGraphicsVideo::play() Sets the \l playing and \l paused properties to true. */ -void QmlGraphicsVideo::pause() +void QDeclarativeVideo::pause() { m_playerControl->pause(); @@ -388,7 +388,7 @@ void QmlGraphicsVideo::pause() Sets the \l playing and \l paused properties to false. */ -void QmlGraphicsVideo::stop() +void QDeclarativeVideo::stop() { m_playerControl->stop(); @@ -398,15 +398,15 @@ void QmlGraphicsVideo::stop() } } -void QmlGraphicsVideo::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) +void QDeclarativeVideo::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) { } -void QmlGraphicsVideo::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) +void QDeclarativeVideo::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { m_graphicsItem->setSize(newGeometry.size()); - QmlGraphicsItem::geometryChanged(newGeometry, oldGeometry); + QDeclarativeItem::geometryChanged(newGeometry, oldGeometry); } QT_END_NAMESPACE @@ -941,4 +941,4 @@ QT_END_NAMESPACE #endif -#include "moc_qmlgraphicsvideo_p.cpp" +#include "moc_qdeclarativevideo_p.cpp" diff --git a/src/multimedia/qml/qmlgraphicsvideo_p.h b/src/multimedia/qml/qdeclarativevideo_p.h index 26252e0..d5ebde1 100644 --- a/src/multimedia/qml/qmlgraphicsvideo_p.h +++ b/src/multimedia/qml/qdeclarativevideo_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLGRAPHICSVIDEO_H -#define QMLGRAPHICSVIDEO_H +#ifndef QDECLARATIVEVIDEO_H +#define QDECLARATIVEVIDEO_H // // W A R N I N G @@ -53,12 +53,12 @@ // We mean it. // -#include <QtMultimedia/private/qmlmediabase_p.h> +#include <QtMultimedia/private/qdeclarativemediabase_p.h> #include <QtMultimedia/qgraphicsvideoitem.h> #include <QtCore/qbasictimer.h> -#include <QtDeclarative/qmlgraphicsitem.h> +#include <QtDeclarative/qdeclarativeitem.h> QT_BEGIN_HEADER @@ -69,7 +69,7 @@ class QTimerEvent; class QVideoSurfaceFormat; -class Q_AUTOTEST_EXPORT QmlGraphicsVideo : public QmlGraphicsItem, public QmlMediaBase +class Q_AUTOTEST_EXPORT QDeclarativeVideo : public QDeclarativeItem, public QDeclarativeMediaBase { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) @@ -122,8 +122,8 @@ public: ServiceMissing = QMediaPlayer::ServiceMissingError }; - QmlGraphicsVideo(QmlGraphicsItem *parent = 0); - ~QmlGraphicsVideo(); + QDeclarativeVideo(QDeclarativeItem *parent = 0); + ~QDeclarativeVideo(); bool hasAudio() const; bool hasVideo() const; @@ -174,7 +174,7 @@ Q_SIGNALS: void playbackRateChanged(); void errorChanged(); - void error(QmlGraphicsVideo::Error error, const QString &errorString); + void error(QDeclarativeVideo::Error error, const QString &errorString); protected: void geometryChanged(const QRectF &geometry, const QRectF &); @@ -184,7 +184,7 @@ private Q_SLOTS: void _q_error(int, const QString &); private: - Q_DISABLE_COPY(QmlGraphicsVideo) + Q_DISABLE_COPY(QDeclarativeVideo) QGraphicsVideoItem *m_graphicsItem; @@ -192,12 +192,12 @@ private: Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus)) Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged()) - inline QmlMediaBase *mediaBase() { return this; } + inline QDeclarativeMediaBase *mediaBase() { return this; } }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QmlGraphicsVideo)) +QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeVideo)) QT_END_HEADER diff --git a/src/multimedia/qml/qml.pri b/src/multimedia/qml/qml.pri index a7ca02e..d0ff71d 100644 --- a/src/multimedia/qml/qml.pri +++ b/src/multimedia/qml/qml.pri @@ -17,20 +17,20 @@ contains(QT_CONFIG, declarative) { } HEADERS += \ - $$PWD/multimediaqml.h \ + $$PWD/multimediadeclarative.h \ $$PWD/qmetadatacontrolmetaobject_p.h \ - $$PWD/qmlaudio_p.h \ - $$PWD/qmlgraphicsvideo_p.h \ - $$PWD/qmlmediabase_p.h \ + $$PWD/qdeclarativeaudio_p.h \ + $$PWD/qdeclarativevideo_p.h \ + $$PWD/qdeclarativemediabase_p.h \ $$PWD/qsoundeffect_p.h \ $$PWD/wavedecoder_p.h SOURCES += \ - $$PWD/multimediaqml.cpp \ + $$PWD/multimediadeclarative.cpp \ $$PWD/qmetadatacontrolmetaobject.cpp \ - $$PWD/qmlaudio.cpp \ - $$PWD/qmlgraphicsvideo.cpp \ - $$PWD/qmlmediabase.cpp \ + $$PWD/qdeclarativeaudio.cpp \ + $$PWD/qdeclarativevideo.cpp \ + $$PWD/qdeclarativemediabase.cpp \ $$PWD/qsoundeffect.cpp \ $$PWD/wavedecoder_p.cpp } diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/qml/qsoundeffect_p.h index 4b440ec..51ebe52 100644 --- a/src/multimedia/qml/qsoundeffect_p.h +++ b/src/multimedia/qml/qsoundeffect_p.h @@ -56,7 +56,7 @@ #include <QtCore/qobject.h> #include <QtCore/qurl.h> -#include <QtDeclarative/qml.h> +#include <QtDeclarative/qdeclarative.h> QT_BEGIN_HEADER |