EffectParameter Class Reference


Detailed Description

This class describes one parameter of an effect.

Author:
Matthias Kretz <kretz@kde.org>
See also:
Effect

Definition at line 49 of file effectparameter.h.

#include <Phonon/EffectParameter>

List of all members.

Public Types

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

Only for backend developers:

More...

Public Member Functions

  EffectParameter ()
const QString name () const
  The name of the parameter.
const QString 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).
QVariant::Type  type () const
  Returns the parameter type.
bool  isLogarithmicControl () const
  Returns whether the parameter should be displayed using a logarithmic scale.
QVariant  minimumValue () const
  The minimum value to be used for the control to edit the parameter.
QVariant  maximumValue () const
  The maximum value to be used for the control to edit the parameter.
QVariant  defaultValue () const
  The default value.
QVariantList  possibleValues () const
  The possible values to be used for the control to edit the parameter.
bool  operator< (const EffectParameter &rhs) const
bool  operator> (const EffectParameter &rhs) const
bool  operator== (const EffectParameter &rhs) const
  ~EffectParameter ()
  EffectParameter (const EffectParameter &rhs)
EffectParameter operator= (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())
  Only to be used by backend implementations:
int  id () const

Protected Attributes

QExplicitlySharedDataPointer
< EffectParameterPrivate > 
d
  The data is implicitly shared.

Friends

class  BrightnessControl

Member Enumeration Documentation

enum 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 the control has only two states: zero and non-zero.

See also:
isToggleControl()
LogarithmicHint 
See also:
isLogarithmicControl()
IntegerHint 
See also:
isIntegerControl

Definition at line 153 of file effectparameter.h.

                  {
            ToggledHint      = 0x04,

            /* LADSPA's SAMPLE_RATE hint needs to be translated by the backend
             * to normal bounds, as the backend knows the sample rate - and the
             * frontend doesn't */

            LogarithmicHint  = 0x10,
            IntegerHint      = 0x20
        };

Constructor & Destructor Documentation

Creates an invalid effect parameter.

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() 
)

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.

Member Function Documentation

const QString& name ( ) const

The name of the parameter.

Can be used as the label.

Returns:
A label for the parameter.
const QString& 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.
QVariant::Type 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.

bool isLogarithmicControl ( ) const

Returns whether the parameter should be displayed using a logarithmic scale.

This is particularly useful for frequencies and gains.

QVariant 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.

QVariant 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 defaultValue ( ) const

The default value.

QVariantList 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).

bool operator< ( const EffectParameter rhs ) const

compares the ids of the parameters

bool operator> ( const EffectParameter rhs ) const

compares the ids of the parameters

bool operator== ( const EffectParameter rhs ) const

compares the ids of the parameters

EffectParameter& operator= ( const EffectParameter rhs )
int id ( ) const

Returns the parameter's id.


Friends And Related Function Documentation

friend class BrightnessControl [friend]

Definition at line 51 of file effectparameter.h.


Member Data Documentation

QExplicitlySharedDataPointer<EffectParameterPrivate> d [protected]

The data is implicitly shared.

Definition at line 217 of file effectparameter.h.


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

EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter
EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter EffectParameter