KDE 4.2 PyKDE API Reference

- KDE's Python API

# ObjectDescription Class Reference

`from PyKDE4.phonon import *`

Namespace: Phonon

## Detailed Description

\class ObjectDescription objectdescription.h Phonon/ObjectDescription Provides a tuple of enduser visible name and description.

Some parts give the enduser choices, e.g. what source to capture audio from. These choices are described by the name and description methods of this class and identified with the id method. Subclasses then define additional information like which audio and video choices belong together.

Author:
  Matthias Kretz <kretz@kde.org>

## Methods

| __init__ (self)
| __init__ (self, int index, QHash<QByteArray,QVariant> properties)
| __init__ (self, QExplicitlySharedDataPointer<Phonon::Phonon::ObjectDescriptionData> dd)
QString | description (self)
int | index (self)
bool | isValid (self)
QString | name (self)
bool | operator != (self, Phonon.ObjectDescription otherDescription)
bool | operator == (self, Phonon.ObjectDescription otherDescription)
QVariant | property (self, QString name)
[QByteArray] | propertyNames (self)

## Static Methods

ObjectDescription<T> | fromIndex (int index)
Phonon::ObjectDescription<T> | fromIndex (int index)

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | int | index,
|  | QHash<QByteArray,QVariant> | properties
| ) |  |  |

__init__ | ( | self, |
|  | QExplicitlySharedDataPointer<Phonon::Phonon::ObjectDescriptionData> | dd
| ) |  |  |

QString description | ( |  | self ) |

Returns a description of the capture source. This text should make clear what sound source this is, which is sometimes hard to describe or understand from just the name.

Returns:
  A string describing the capture source.

ObjectDescription<T> fromIndex | ( | int | index
| ) |  |  |

Returns a new description object that describes the device/effect/codec/... with the given index.

Phonon::ObjectDescription<T> fromIndex | ( | int | index
| ) |  |  |

int index | ( |  | self ) |

A unique identifier for this device/. Used internally to distinguish between the devices/.

Returns:
  An integer that uniquely identifies every device/

bool isValid | ( |  | self ) |

Returns true if the Tuple is valid (index != -1); otherwise returns false.

QString name | ( |  | self ) |

Returns the name of the capture source.

Returns:
  A string that should be presented to the user to choose the capture source.

bool operator != | ( | self, |
|  | Phonon.ObjectDescription | otherDescription
| ) |  |  |

Returns false if this ObjectDescription describes the same as otherDescription; otherwise returns true.

bool operator == | ( | self, |
|  | Phonon.ObjectDescription | otherDescription
| ) |  |  |

Returns true if this ObjectDescription describes the same as otherDescription; otherwise returns false.

QVariant property | ( | self, |
|  | QString | name
| ) |  |  |

Returns a named property.

If the property is not set an invalid value is returned.

See also:
  propertyNames()

[QByteArray] propertyNames | ( |  | self ) |

Returns all names that return valid data when property() is called.

See also:
  property()