diff -r 41300fa6a67c -r 3b1da2848fc7 src/3rdparty/phonon/mmf/effectfactory.h --- a/src/3rdparty/phonon/mmf/effectfactory.h Tue Feb 02 00:43:10 2010 +0200 +++ b/src/3rdparty/phonon/mmf/effectfactory.h Fri Feb 19 23:40:16 2010 +0200 @@ -20,6 +20,7 @@ #define PHONON_MMF_EFFECTFACTORY_H #include "abstractaudioeffect.h" +#include "effectparameter.h" QT_BEGIN_NAMESPACE @@ -31,14 +32,30 @@ /** * @short Contains utility functions related to effects. */ -class EffectFactory +class EffectFactory : public QObject { + Q_OBJECT + public: + EffectFactory(QObject *parent); + ~EffectFactory(); + + enum Type + { + TypeAudioEqualizer = 0 + , TypeBassBoost + , TypeDistanceAttenuation + , TypeEnvironmentalReverb + , TypeListenerOrientation + , TypeLoudness + , TypeSourceOrientation + , TypeStereoWidening + }; + /** * @short Creates an audio effect of type @p type. */ - static AbstractAudioEffect *createAudioEffect(AbstractAudioEffect::Type type, - QObject *parent); + AbstractAudioEffect *createAudioEffect(Type type, QObject *parent); /** * @short Return the properties for effect @p type. @@ -46,7 +63,7 @@ * This handles the effects for * BackendInterface::objectDescriptionProperties(). */ - static QHash audioEffectDescriptions(AbstractAudioEffect::Type type); + QHash audioEffectDescriptions(Type type); /** * @short Returns the indexes for the supported effects. @@ -54,19 +71,27 @@ * This handles the effects for * BackendInterface::objectDescriptionIndexes(). */ - static QList effectIndexes(); + QList effectIndexes(); private: - static inline QHash constructEffectDescription(const QString &name, - const QString &description); + void initialize(); + + struct EffectData + { + bool m_supported; + QHash m_descriptions; + QList m_parameters; + }; - /** - * This class is not supposed to be instantiated, so disable - * the default constructor. - */ - inline EffectFactory(); - Q_DISABLE_COPY(EffectFactory) + template EffectData getData(); + const EffectData& data(Type type) const; + +private: + bool m_initialized; + QHash m_effectData; + }; + } }