Phonon  4.7.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
Phonon::EffectParameter Class Reference

This class describes one parameter of an effect. More...

#include <phonon/EffectParameter>

Public Types

enum  Hint { ToggledHint = 0x04, LogarithmicHint = 0x10, IntegerHint = 0x20 }
 

Public Member Functions

const QString & name () const
 
const QString & description () const
 
QVariant::Type type () const
 
bool isLogarithmicControl () const
 
QVariant minimumValue () const
 
QVariant maximumValue () const
 
QVariant defaultValue () const
 
QVariantList possibleValues () const
 
bool operator< (const EffectParameter &rhs) const
 
bool operator> (const EffectParameter &rhs) const
 
bool operator== (const EffectParameter &rhs) const
 
 EffectParameter (const EffectParameter &rhs)
 
EffectParameteroperator= (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())
 
int id () const
 

Protected Attributes

QExplicitlySharedDataPointer
< EffectParameterPrivate > 
d
 

Friends

class BrightnessControl
 

Detailed Description

This class describes one parameter of an effect.

Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org
See Also
Effect

Member Enumeration Documentation

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.

See Also
isToggleControl()
LogarithmicHint 
See Also
isLogarithmicControl()
IntegerHint 
See Also
isIntegerControl

Constructor & Destructor Documentation

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
parameterIdThis is a number to uniquely identify the parameter. The id is used for value() and setValue().
nameThe name/label for this parameter.
hintsSets the hints for the type of parameter.
defaultValueThe value that should be used as a default.
minThe minimum value allowed for this parameter. You only need to set this if the BoundedBelowHint is set.
maxThe maximum value allowed for this parameter. You only need to set this if the BoundedAboveHint is set.
descriptionA descriptive text for the parameter (explaining what it controls) to be used as a tooltip or WhatsThis help.

Member Function Documentation

QVariant Phonon::EffectParameter::defaultValue ( ) const

The default value.

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.
bool Phonon::EffectParameter::isLogarithmicControl ( ) const

Returns whether the parameter should be displayed using a logarithmic scale. This is particularly useful for frequencies and gains.

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.

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.

const QString & Phonon::EffectParameter::name ( ) const

The name of the parameter. Can be used as the label.

Returns
A label for the parameter.
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).

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.

Member Data Documentation

QExplicitlySharedDataPointer<EffectParameterPrivate> Phonon::EffectParameter::d
protected

The data is implicitly shared.


The documentation for this class was generated from the following files: