KDE 4.5 PyKDE API Reference

- KDE's Python API

# EffectParameter Class Reference

`from PyKDE4.phonon import *`

Namespace: Phonon

## Detailed Description

\class EffectParameter effectparameter.h Phonon/EffectParameter This class describes one parameter of an effect.

Author:
  Matthias Kretz <kretz@kde.org>

See also:
  Effect

## Enumerations
Hint | { ToggledHint, LogarithmicHint, IntegerHint }
## Methods
| __init__ (self)
| __init__ (self, Phonon.EffectParameter rhs)
| __init__ (self, int parameterId, QString name, Phonon.EffectParameter.Hints hints, QVariant defaultValue, QVariant min=QVariant(), QVariant max=QVariant(), [QVariant] values=QVariantList(), QString description=QString())
QVariant | defaultValue (self)
QString | description (self)
int | id (self)
bool | isLogarithmicControl (self)
QVariant | maximumValue (self)
QVariant | minimumValue (self)
QString | name (self)
bool | operator < (self, Phonon.EffectParameter rhs)
bool | operator == (self, Phonon.EffectParameter rhs)
bool | operator > (self, Phonon.EffectParameter rhs)
[QVariant] | possibleValues (self)
QVariant.Type | type (self)

## Method Documentation

__init__ | ( |  | self ) |

Internal:

Creates an invalid effect parameter.

__init__ | ( | self, |
|  | Phonon.EffectParameter | rhs
| ) |  |  |

__init__ | ( | self, |
|  | int | parameterId,
|  | QString | name,
|  | Phonon.EffectParameter.Hints | hints,
|  | QVariant | defaultValue,
|  | QVariant | min=QVariant(),
|  | QVariant | max=QVariant(),
|  | [QVariant] | values=QVariantList(),
|  | 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().

Parameters:

  | name | The name/label for this parameter.

Parameters:

  | hints | Sets the hints for the type of parameter.

Parameters:

  | defaultValue | The value that should be used as a default.

Parameters:

  | min | The minimum value allowed for this parameter. You only need to set this if the BoundedBelowHint is set.

Parameters:

  | max | The maximum value allowed for this parameter. You only need to set this if the BoundedAboveHint is set.

Parameters:

  | description | A descriptive text for the parameter (explaining what it controls) to be used as a tooltip or WhatsThis help.

QVariant defaultValue | ( |  | self ) |

The default value.

QString description | ( |  | self ) |

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.

int id | ( |  | self ) |

Internal:

Returns the parameter's id.

bool isLogarithmicControl | ( |  | self ) |

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

QVariant maximumValue | ( |  | self ) |

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

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.

QString name | ( |  | self ) |

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

Returns:
  A label for the parameter.

bool operator < | ( | self, |
|  | Phonon.EffectParameter | rhs
| ) |  |  |

Internal:
  compares the ids of the parameters

bool operator == | ( | self, |
|  | Phonon.EffectParameter | rhs
| ) |  |  |

Internal:
  compares the ids of the parameters

bool operator > | ( | self, |
|  | Phonon.EffectParameter | rhs
| ) |  |  |

Internal:
  compares the ids of the parameters

[QVariant] possibleValues | ( |  | self ) |

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

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.

## 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 = 0x04 |
  LogarithmicHint = 0x10 |
  IntegerHint = 0x20 |