Phonon.EffectParameter

Synopsis

Functions

Detailed Description

The EffectParameter class describes one parameter of an effect.

You fetch the parameters of an Phonon.Effect with Effect.parameters() .

QList<Phonon::EffectParameter> parameters = effect->parameters();

foreach(Phonon::EffectParameter parameter, parameters) {
    // Do something with parameter
}

To describe itself, an effect parameter gives a PySide.phonon.Phonon::EffectParameter.name() and possibly PySide.phonon.Phonon::EffectParameter.description() (depending on the backend used). These are suited to present the effect parameter to the user of a Phonon application.

Note that effects are created by the backend, and that their name and descriptions may vary.

The value of an effect parameter is stored in a PySide.QtCore.QVariant , of which PySide.phonon.Phonon::EffectParameter.type() is usually int or double .

The value is retrieved with Effect.parameterValue() and set with PySide.phonon.Phonon.Effect.setParameterValue() - both of which takes the EffectParameter as argument. Note that not all effect parameters support setting of their value.

You get the values a parameter can take with PySide.phonon.Phonon::EffectParameter.possibleValues() ; an empty list is returned if the values are continuous.

A parameter may also specify default , minimum(), and maximum() values. Values are returned as PySide.QtCore.QVariant s. If the parameter does not have the requested value, an QVariant.Invalid invalid PySide.QtCore.QVariant is returned from these functions.

The Phonon.EffectWidget provides a widget with which one can control the parameters of an Phonon.Effect .

Phonon::EffectWidget *effectWidget = new Phonon::EffectWidget(effect);

See also

Effect EffectWidget Capabilities Example Phonon Module

class PySide.phonon.Phonon.EffectParameter(rhs)
class PySide.phonon.Phonon.EffectParameter(parameterId, name, hints, defaultValue[, min=None[, max=None[, values=QVariantList()[, description=""]]]])
Parameters:
  • defaultValue – object
  • values
  • rhsPySide.phonon.Phonon::EffectParameter
  • hintsPySide.phonon.Phonon::EffectParameter.Hints
  • description – unicode
  • parameterIdPySide.QtCore.int
  • min – object
  • name – unicode
  • max – object

Constructs a copy of the other effect parameter.

PySide.phonon.Phonon.EffectParameter.Hint

Only for backend developers:

Flags to set the return values of isToggleControl(), PySide.phonon.Phonon::EffectParameter.isLogarithmicControl() , isIntegerControl(), isBoundedBelow() and isBoundedAbove(). The values of the flags correspond to the values used for LADSPA effects.

Constant Description
Phonon.EffectParameter.ToggledHint If this hint is set it means that the control has only two states: zero and non-zero (see isToggleControl()).
Phonon.EffectParameter.LogarithmicHint 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 (see PySide.phonon.Phonon::EffectParameter.isLogarithmicControl() ).
Phonon.EffectParameter.IntegerHint See isIntegerControl().
PySide.phonon.Phonon.EffectParameter.defaultValue()
Return type:object

The default value.

PySide.phonon.Phonon.EffectParameter.description()
Return type:unicode

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.

PySide.phonon.Phonon.EffectParameter.isLogarithmicControl()
Return type:PySide.QtCore.bool

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

PySide.phonon.Phonon.EffectParameter.maximumValue()
Return type:object

The maximum value to be used for the control to edit the parameter.

If the returned PySide.QtCore.QVariant is invalid the value is not bounded from above.

PySide.phonon.Phonon.EffectParameter.minimumValue()
Return type:object

The minimum value to be used for the control to edit the parameter.

If the returned PySide.QtCore.QVariant is invalid the value is not bounded from below.

PySide.phonon.Phonon.EffectParameter.name()
Return type:unicode

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

Returns A label for the parameter.

PySide.phonon.Phonon.EffectParameter.possibleValues()
Return type:

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

PySide.phonon.Phonon.EffectParameter.type()
Return type:PySide.QtCore.QVariant::Type

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.