| 1 |
/* This file is part of the KDE project |
| 2 |
Copyright (C) 2005-2007 Matthias Kretz <kretz@kde.org> |
| 3 |
|
| 4 |
This library is free software; you can redistribute it and/or |
| 5 |
modify it under the terms of the GNU Lesser General Public |
| 6 |
License as published by the Free Software Foundation; either |
| 7 |
version 2.1 of the License, or (at your option) version 3, or any |
| 8 |
later version accepted by the membership of KDE e.V. (or its |
| 9 |
successor approved by the membership of KDE e.V.), Nokia Corporation |
| 10 |
(or its successors, if any) and the KDE Free Qt Foundation, which shall |
| 11 |
act as a proxy defined in Section 6 of version 3 of the license. |
| 12 |
|
| 13 |
This library is distributed in the hope that it will be useful, |
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
Lesser General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU Lesser General Public |
| 19 |
License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
*/ |
| 22 |
|
| 23 |
|
| 24 |
#ifndef PHONON_EFFECT_H |
| 25 |
#define PHONON_EFFECT_H |
| 26 |
|
| 27 |
#include "phonondefs.h" |
| 28 |
#include <QtCore/QObject> |
| 29 |
#include "objectdescription.h" |
| 30 |
#include "medianode.h" |
| 31 |
|
| 32 |
QT_BEGIN_HEADER |
| 33 |
QT_BEGIN_NAMESPACE |
| 34 |
|
| 35 |
#ifndef QT_NO_PHONON_EFFECT |
| 36 |
|
| 37 |
class QString; |
| 38 |
template<class T> class QList; |
| 39 |
|
| 40 |
namespace Phonon |
| 41 |
{ |
| 42 |
class EffectParameter; |
| 43 |
class EffectPrivate; |
| 44 |
|
| 45 |
/** \class Effect effect.h Phonon/Effect |
| 46 |
* \short Effects that can be inserted into a Path. |
| 47 |
* An effect is a special object which can perform |
| 48 |
* transformations on the specified path. Examples may include simple |
| 49 |
* modifiers such as fading or pitch shifting, or more complex mathematical |
| 50 |
* transformations. |
| 51 |
* |
| 52 |
* In order to use an effect, insert it into the path as follows: |
| 53 |
* \code |
| 54 |
* Path path = Phonon::createPath(...); |
| 55 |
* Effect *effect = new Effect(this); |
| 56 |
* path.insertEffect(effect); |
| 57 |
* \endcode |
| 58 |
* |
| 59 |
* The effect will immediately begin applying it's transformations on |
| 60 |
* the path. To stop it, remove the Effect from the path. |
| 61 |
* |
| 62 |
* \ingroup PhononEffects |
| 63 |
* \author Matthias Kretz <kretz@kde.org> |
| 64 |
*/ |
| 65 |
class PHONON_EXPORT Effect : public QObject, public MediaNode |
| 66 |
{ |
| 67 |
Q_OBJECT |
| 68 |
K_DECLARE_PRIVATE(Effect) |
| 69 |
|
| 70 |
public: |
| 71 |
~Effect(); |
| 72 |
|
| 73 |
//X enum Type { |
| 74 |
//X AudioEffect, |
| 75 |
//X VideoEffect |
| 76 |
//X }; |
| 77 |
|
| 78 |
/** |
| 79 |
* QObject constructor. |
| 80 |
* |
| 81 |
* \param description An EffectDescription object to determine the |
| 82 |
* type of effect. See BackendCapabilities::availableAudioEffects(). |
| 83 |
* \param parent QObject parent |
| 84 |
*/ |
| 85 |
explicit Effect(const EffectDescription &description, QObject *parent = 0); |
| 86 |
|
| 87 |
//X Type type() const; |
| 88 |
|
| 89 |
/** |
| 90 |
* Returns the description of this effect. This is the same type as was |
| 91 |
* passed to the constructor. |
| 92 |
*/ |
| 93 |
EffectDescription description() const; |
| 94 |
|
| 95 |
/** |
| 96 |
* Returns a list of parameters that this effect provides to control |
| 97 |
* its behaviour. |
| 98 |
* |
| 99 |
* \see EffectParameter |
| 100 |
* \see EffectWidget |
| 101 |
*/ |
| 102 |
QList<EffectParameter> parameters() const; |
| 103 |
|
| 104 |
QVariant parameterValue(const EffectParameter&) const; |
| 105 |
void setParameterValue(const EffectParameter&, const QVariant &value); |
| 106 |
|
| 107 |
protected: |
| 108 |
Effect(EffectPrivate &dd, QObject *parent); |
| 109 |
}; |
| 110 |
} //namespace Phonon |
| 111 |
|
| 112 |
#endif // QT_NO_EFFECT |
| 113 |
|
| 114 |
QT_END_NAMESPACE |
| 115 |
QT_END_HEADER |
| 116 |
|
| 117 |
// vim: sw=4 ts=4 tw=80 |
| 118 |
#endif // PHONON_EFFECT_H |