Phonon::EffectParameter
#include <phonon/EffectParameter>
Public Types | |
enum | Hint { ToggledHint = 0x04 , LogarithmicHint = 0x10 , IntegerHint = 0x20 } |
typedef QFlags< Hint > | Hints |
Public Member Functions | |
EffectParameter () | |
EffectParameter (const EffectParameter &rhs) | |
EffectParameter (int parameterId, const QString &name, Hints hints, const QVariant &defaultValue, const QVariant &min=QVariant(), const QVariant &max=QVariant(), const QVariantList &values=QVariantList(), const QString &description=QString()) | |
QVariant | defaultValue () const |
const QString & | description () const |
int | id () const |
bool | isLogarithmicControl () const |
QVariant | maximumValue () const |
QVariant | minimumValue () const |
const QString & | name () const |
bool | operator< (const EffectParameter &rhs) const |
EffectParameter & | operator= (const EffectParameter &rhs) |
bool | operator== (const EffectParameter &rhs) const |
bool | operator> (const EffectParameter &rhs) const |
QVariantList | possibleValues () const |
QVariant::Type | type () const |
Protected Attributes | |
QExplicitlySharedDataPointer< EffectParameterPrivate > | d |
Detailed Description
This class describes one parameter of an effect.
- See also
- Effect
Definition at line 47 of file effectparameter.h.
Member Typedef Documentation
◆ Hints
Definition at line 173 of file effectparameter.h.
Member Enumeration Documentation
◆ Hint
Only for backend developers:
Flags to set the return values of isToggleControl(), isLogarithmicControl(), isIntegerControl(), isBoundedBelow() and isBoundedAbove(). The values of the flags correspond to the values used for LADSPA effects.
Enumerator | |
---|---|
ToggledHint | If this hint is set it means that the control has only two states: zero and non-zero.
|
LogarithmicHint |
|
IntegerHint |
|
Definition at line 151 of file effectparameter.h.
Constructor & Destructor Documentation
◆ EffectParameter() [1/3]
Phonon::EffectParameter::EffectParameter | ( | ) |
Creates an invalid effect parameter.
Definition at line 36 of file effectparameter.cpp.
◆ ~EffectParameter()
Phonon::EffectParameter::~EffectParameter | ( | ) |
Definition at line 56 of file effectparameter.cpp.
◆ EffectParameter() [2/3]
Phonon::EffectParameter::EffectParameter | ( | const EffectParameter & | rhs | ) |
Definition at line 60 of file effectparameter.cpp.
◆ EffectParameter() [3/3]
Phonon::EffectParameter::EffectParameter | ( | int | parameterId, |
const QString & | name, | ||
Hints | hints, | ||
const QVariant & | defaultValue, | ||
const QVariant & | min = QVariant(), | ||
const QVariant & | max = QVariant(), | ||
const QVariantList & | values = QVariantList(), | ||
const QString & | description = QString() ) |
Only to be used by backend implementations:
Creates a new effect parameter.
- Parameters
-
parameterId This is a number to uniquely identify the parameter. The id is used for value() and setValue(). name The name/label for this parameter. hints Sets the hints for the type of parameter. defaultValue The value that should be used as a default. min The minimum value allowed for this parameter. You only need to set this if the BoundedBelowHint is set. max The maximum value allowed for this parameter. You only need to set this if the BoundedAboveHint is set. description A descriptive text for the parameter (explaining what it controls) to be used as a tooltip or WhatsThis help.
Definition at line 41 of file effectparameter.cpp.
Member Function Documentation
◆ defaultValue()
QVariant Phonon::EffectParameter::defaultValue | ( | ) | const |
The default value.
Definition at line 124 of file effectparameter.cpp.
◆ description()
const QString & Phonon::EffectParameter::description | ( | ) | const |
The parameter may come with a description (LADSPA doesn't have a field for this, so don't expect many effects to provide a description).
The description can be used for a tooltip or WhatsThis help.
- Returns
- A text describing the parameter.
Definition at line 91 of file effectparameter.cpp.
◆ id()
int Phonon::EffectParameter::id | ( | ) | const |
Returns the parameter's id.
Definition at line 129 of file effectparameter.cpp.
◆ isLogarithmicControl()
bool Phonon::EffectParameter::isLogarithmicControl | ( | ) | const |
Returns whether the parameter should be displayed using a logarithmic scale.
This is particularly useful for frequencies and gains.
Definition at line 96 of file effectparameter.cpp.
◆ maximumValue()
QVariant Phonon::EffectParameter::maximumValue | ( | ) | const |
The maximum value to be used for the control to edit the parameter.
If the returned QVariant is invalid the value is not bounded from above.
Definition at line 119 of file effectparameter.cpp.
◆ minimumValue()
QVariant Phonon::EffectParameter::minimumValue | ( | ) | const |
The minimum value to be used for the control to edit the parameter.
If the returned QVariant is invalid the value is not bounded from below.
Definition at line 114 of file effectparameter.cpp.
◆ name()
const QString & Phonon::EffectParameter::name | ( | ) | const |
The name of the parameter.
Can be used as the label.
- Returns
- A label for the parameter.
Definition at line 86 of file effectparameter.cpp.
◆ operator<()
bool Phonon::EffectParameter::operator< | ( | const EffectParameter & | rhs | ) | const |
compares the ids of the parameters
Definition at line 71 of file effectparameter.cpp.
◆ operator=()
EffectParameter & Phonon::EffectParameter::operator= | ( | const EffectParameter & | rhs | ) |
Definition at line 65 of file effectparameter.cpp.
◆ operator==()
bool Phonon::EffectParameter::operator== | ( | const EffectParameter & | rhs | ) | const |
compares the ids of the parameters
Definition at line 76 of file effectparameter.cpp.
◆ operator>()
bool Phonon::EffectParameter::operator> | ( | const EffectParameter & | rhs | ) | const |
compares the ids of the parameters
Definition at line 81 of file effectparameter.cpp.
◆ possibleValues()
QVariantList Phonon::EffectParameter::possibleValues | ( | ) | const |
The possible values to be used for the control to edit the parameter.
if the value of this parameter is to be picked from predefined values this returns the list (otherwise it returns an empty QVariantList).
Definition at line 109 of file effectparameter.cpp.
◆ type()
QVariant::Type Phonon::EffectParameter::type | ( | ) | const |
Returns the parameter type.
Common types are QVariant::Int, QVariant::Double, QVariant::Bool and QVariant::String. When QVariant::String is returned you get the possible values from possibleValues.
Definition at line 101 of file effectparameter.cpp.
Member Data Documentation
◆ d
|
protected |
The data is implicitly shared.
Definition at line 215 of file effectparameter.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.