Phonon::EffectParameter

Search for usage in LXR

Phonon::EffectParameter Class Reference

#include <phonon/EffectParameter>

Public Types

enum  Hint { ToggledHint = 0x04 , LogarithmicHint = 0x10 , IntegerHint = 0x20 }
 
typedef QFlags< HintHints
 

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 QStringdescription () const
 
int id () const
 
bool isLogarithmicControl () const
 
QVariant maximumValue () const
 
QVariant minimumValue () const
 
const QStringname () const
 
bool operator< (const EffectParameter &rhs) const
 
EffectParameteroperator= (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.

Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org
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.

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

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

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

QExplicitlySharedDataPointer<EffectParameterPrivate> Phonon::EffectParameter::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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:53:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.