diff options
Diffstat (limited to 'src/imports/audioengine/qdeclarative_sound_p.h')
-rw-r--r-- | src/imports/audioengine/qdeclarative_sound_p.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/imports/audioengine/qdeclarative_sound_p.h b/src/imports/audioengine/qdeclarative_sound_p.h index 14ebd1039..494fe2e34 100644 --- a/src/imports/audioengine/qdeclarative_sound_p.h +++ b/src/imports/audioengine/qdeclarative_sound_p.h @@ -34,8 +34,18 @@ #ifndef QDECLARATIVESOUND_P_H #define QDECLARATIVESOUND_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtQml/qqml.h> -#include <QtQml/qqmlcomponent.h> #include <QtCore/qlist.h> #include "qdeclarative_playvariation_p.h" @@ -44,6 +54,7 @@ QT_BEGIN_NAMESPACE class QDeclarativeAudioCategory; class QDeclarativeAttenuationModel; class QDeclarativeSoundInstance; +class QDeclarativeAudioEngine; class QDeclarativeSoundCone : public QObject { @@ -65,21 +76,21 @@ public: qreal outerGain() const; void setOuterGain(qreal outerGain); - void componentComplete(); + void setEngine(QDeclarativeAudioEngine *engine); private: Q_DISABLE_COPY(QDeclarativeSoundCone) qreal m_innerAngle; qreal m_outerAngle; qreal m_outerGain; + QDeclarativeAudioEngine *m_engine; }; -class QDeclarativeSound : public QObject, public QQmlParserStatus +class QDeclarativeSound : public QObject { friend class QDeclarativeSoundCone; Q_OBJECT - Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(PlayType playType READ playType WRITE setPlayType) Q_PROPERTY(QString category READ category WRITE setCategory) @@ -99,9 +110,6 @@ public: QDeclarativeSound(QObject *parent = 0); ~QDeclarativeSound(); - void classBegin(); - void componentComplete(); - PlayType playType() const; void setPlayType(PlayType playType); @@ -114,6 +122,9 @@ public: QString attenuationModel() const; void setAttenuationModel(const QString &attenuationModel); + QDeclarativeAudioEngine *engine() const; + void setEngine(QDeclarativeAudioEngine *); + QDeclarativeSoundCone* cone() const; QDeclarativeAttenuationModel* attenuationModelObject() const; @@ -128,6 +139,8 @@ public: QQmlListProperty<QDeclarativePlayVariation> playVariationlist(); QList<QDeclarativePlayVariation*>& playlist(); + Q_INVOKABLE Q_REVISION(1) void addPlayVariation(QDeclarativePlayVariation*); + public Q_SLOTS: void play(); void play(qreal gain); @@ -147,7 +160,6 @@ private: Q_DISABLE_COPY(QDeclarativeSound) QDeclarativeSoundInstance* newInstance(bool managed); static void appendFunction(QQmlListProperty<QDeclarativePlayVariation> *property, QDeclarativePlayVariation *value); - bool m_complete; PlayType m_playType; QString m_name; QString m_category; @@ -157,6 +169,7 @@ private: QDeclarativeAttenuationModel *m_attenuationModelObject; QDeclarativeAudioCategory *m_categoryObject; + QDeclarativeAudioEngine *m_engine; }; QT_END_NAMESPACE |