source: trunk/src/3rdparty/phonon/mmf/effectfactory.h

Last change on this file was 651, checked in by Dmitry A. Kuminov, 16 years ago

trunk: Merged in qt 4.6.2 sources.

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1/* This file is part of the KDE project.
2
3Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
5This library is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 2.1 or 3 of the License.
8
9This library is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU Lesser General Public License for more details.
13
14You should have received a copy of the GNU Lesser General Public License
15along with this library. If not, see <http://www.gnu.org/licenses/>.
16
17*/
18
19#ifndef PHONON_MMF_EFFECTFACTORY_H
20#define PHONON_MMF_EFFECTFACTORY_H
21
22#include "abstractaudioeffect.h"
23#include "effectparameter.h"
24
25QT_BEGIN_NAMESPACE
26
27namespace Phonon
28{
29namespace MMF
30{
31
32/**
33 * @short Contains utility functions related to effects.
34 */
35class EffectFactory : public QObject
36{
37 Q_OBJECT
38
39public:
40 EffectFactory(QObject *parent);
41 ~EffectFactory();
42
43 enum Type
44 {
45 TypeAudioEqualizer = 0
46 , TypeBassBoost
47 , TypeDistanceAttenuation
48 , TypeEnvironmentalReverb
49 , TypeListenerOrientation
50 , TypeLoudness
51 , TypeSourceOrientation
52 , TypeStereoWidening
53 };
54
55 /**
56 * @short Creates an audio effect of type @p type.
57 */
58 AbstractAudioEffect *createAudioEffect(Type type, QObject *parent);
59
60 /**
61 * @short Return the properties for effect @p type.
62 *
63 * This handles the effects for
64 * BackendInterface::objectDescriptionProperties().
65 */
66 QHash<QByteArray, QVariant> audioEffectDescriptions(Type type);
67
68 /**
69 * @short Returns the indexes for the supported effects.
70 *
71 * This handles the effects for
72 * BackendInterface::objectDescriptionIndexes().
73 */
74 QList<int> effectIndexes();
75
76private:
77 void initialize();
78
79 struct EffectData
80 {
81 bool m_supported;
82 QHash<QByteArray, QVariant> m_descriptions;
83 QList<EffectParameter> m_parameters;
84 };
85
86 template<typename BackendNode> EffectData getData();
87 const EffectData& data(Type type) const;
88
89private:
90 bool m_initialized;
91 QHash<Type, EffectData> m_effectData;
92
93};
94
95}
96}
97
98QT_END_NAMESPACE
99
100#endif
101
Note: See TracBrowser for help on using the repository browser.