- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# effectparameter.h

Go to the documentation of this file.

    00001 /*  This file is part of the KDE project
    00002     Copyright (C) 2006 Matthias Kretz <kretz@kde.org>
    00003
    00004     This library is free software; you can redistribute it and/or
    00005     modify it under the terms of the GNU Lesser General Public
    00006     License as published by the Free Software Foundation; either
    00007     version 2.1 of the License, or (at your option) version 3, or any
    00008     later version accepted by the membership of KDE e.V. (or its
    00009     successor approved by the membership of KDE e.V.), Nokia Corporation
    00010     (or its successors, if any) and the KDE Free Qt Foundation, which shall
    00011     act as a proxy defined in Section 6 of version 3 of the license.
    00012
    00013     This library is distributed in the hope that it will be useful,
    00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00016     Lesser General Public License for more details.
    00017
    00018     You should have received a copy of the GNU Lesser General Public
    00019     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
    00020
    00021 */
    00022
    00023 #ifndef PHONON_EFFECTPARAMETER_H
    00024 #define PHONON_EFFECTPARAMETER_H
    00025
    00026 #include "phonon_export.h"
    00027
    00028 #include <QtCore/QExplicitlySharedDataPointer>
    00029 #include <QtCore/QVariant>
    00030
    00031 QT_BEGIN_HEADER
    00032 QT_BEGIN_NAMESPACE
    00033
    00034 #ifndef QT_NO_PHONON_EFFECT
    00035
    00036 namespace Phonon
    00037 {
    00038
    00039 class Effect;
    00040 class EffectParameterPrivate;
    00041
    00049 class PHONON_EXPORT EffectParameter
    00050 {
    00051     friend class BrightnessControl;
    00052     public:
    00058         EffectParameter();
    00059
    00065         const QString &name() const;
    00066
    00076         const QString &description() const;
    00077
    00084         QVariant::Type type() const;
    00085
    00091         bool isLogarithmicControl() const;
    00092
    00099         QVariant minimumValue() const;
    00100
    00107         QVariant maximumValue() const;
    00108
    00112         QVariant defaultValue() const;
    00113
    00120         QVariantList possibleValues() const;
    00121
    00126         bool operator<(const EffectParameter &rhs) const;
    00127
    00132         bool operator>(const EffectParameter &rhs) const;
    00133
    00138         bool operator==(const EffectParameter &rhs) const;
    00139
    00140         /* dtor, cctor and operator= for forward decl of EffectParameterPrivate */
    00141         ~EffectParameter();
    00142         EffectParameter(const EffectParameter &rhs);
    00143         EffectParameter &operator=(const EffectParameter &rhs);
    00144
    00153         enum Hint {
    00160             ToggledHint      = 0x04,
    00161
    00162             /* LADSPA's SAMPLE_RATE hint needs to be translated by the backend
    00163              * to normal bounds, as the backend knows the sample rate - and the
    00164              * frontend doesn't */
    00165
    00169             LogarithmicHint  = 0x10,
    00173             IntegerHint      = 0x20
    00174         };
    00175         Q_DECLARE_FLAGS(Hints, Hint)
    00176
    00177
    00201         EffectParameter(int parameterId, const QString &name, Hints hints,
    00202                 const QVariant &defaultValue, const QVariant &min = QVariant(),
    00203                 const QVariant &max = QVariant(), const QVariantList &values = QVariantList(),
    00204                 const QString &description = QString());
    00205
    00211         int id() const;
    00212
    00213     protected:
    00217         QExplicitlySharedDataPointer<EffectParameterPrivate> d;
    00218 };
    00219
    00220 uint PHONON_EXPORT qHash(const Phonon::EffectParameter &param);
    00221
    00222 } // namespace Phonon
    00223
    00224 #if defined(Q_CC_MSVC) && _MSC_VER <= 1300
    00225 //this ensures that code outside Phonon can use the hash function
    00226 //it also a workaround for some compilers
    00227 inline uint qHash(const Phonon::EffectParameter &param) { return Phonon::qHash(param); } //krazy:exclude=inline
    00228 #endif
    00229 Q_DECLARE_OPERATORS_FOR_FLAGS(Phonon::EffectParameter::Hints)
    00230
    00231 #endif //QT_NO_PHONON_EFFECT
    00232
    00233 QT_END_NAMESPACE
    00234 QT_END_HEADER
    00235
    00236 #endif // PHONON_EFFECTPARAMETER_H
    00237 // vim: sw=4 ts=4 tw=80