ObjectDescription< T > Class Template Reference

#include <Phonon/ObjectDescription>

Class Description

template<ObjectDescriptionType T>
class Phonon::ObjectDescription< T >

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.nosp@m.@kde.nosp@m..org

Definition at line 180 of file objectdescription.h.

Public Member Functions

bool operator== (const ObjectDescription &otherDescription) const
 Returns true if this ObjectDescription describes the same as otherDescription; otherwise returns false. More...
 
bool operator!= (const ObjectDescription &otherDescription) const
 Returns false if this ObjectDescription describes the same as otherDescription; otherwise returns true. More...
 
QString name () const
 Returns the name of the capture source. More...
 
QString description () const
 Returns a description of the capture source. More...
 
QVariant property (const char *name) const
 Returns a named property. More...
 
QList< QByteArraypropertyNames () const
 Returns all names that return valid data when property() is called. More...
 
bool isValid () const
 Returns true if the Tuple is valid (index != -1); otherwise returns false. More...
 
int index () const
 A unique identifier for this device/. More...
 
 ObjectDescription ()
 
 ObjectDescription (int index, const QHash< QByteArray, QVariant > &properties)
 

Static Public Member Functions

static ObjectDescription< T > fromIndex (int index)
 Returns a new description object that describes the device/effect/codec/... More...
 

Protected Member Functions

 ObjectDescription (const QExplicitlySharedDataPointer< ObjectDescriptionData > &dd)
 

Protected Attributes

QExplicitlySharedDataPointer< ObjectDescriptionDatad
 

Friends

class ObjectDescriptionModel< T >
 

Constructor & Destructor Documentation

ObjectDescription ( )
inline

Definition at line 254 of file objectdescription.h.

254 : d(new ObjectDescriptionData(0)) {}
QExplicitlySharedDataPointer< ObjectDescriptionData > d
ObjectDescription ( int  index,
const QHash< QByteArray, QVariant > &  properties 
)
inline

Definition at line 255 of file objectdescription.h.

255 : d(new ObjectDescriptionData(index, properties)) {}
QExplicitlySharedDataPointer< ObjectDescriptionData > d
GLuint index
Definition: GLee.h:1704

Definition at line 259 of file objectdescription.h.

259 : d(dd) {}
QExplicitlySharedDataPointer< ObjectDescriptionData > d

Member Function Documentation

static ObjectDescription<T> fromIndex ( int  index)
inlinestatic

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

with the given index.

Definition at line 187 of file objectdescription.h.

187  { //krazy:exclude=inline
189  }
static ObjectDescriptionData * fromIndex(ObjectDescriptionType type, int index)
GLuint index
Definition: GLee.h:1704
bool operator== ( const ObjectDescription< T > &  otherDescription) const
inline

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

Definition at line 195 of file objectdescription.h.

195  { //krazy:exclude=inline
196  return *d == *otherDescription.d;
197  }
QExplicitlySharedDataPointer< ObjectDescriptionData > d
bool operator!= ( const ObjectDescription< T > &  otherDescription) const
inline

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

Definition at line 203 of file objectdescription.h.

203  { //krazy:exclude=inline
204  return !operator==(otherDescription);
205  }
bool operator==(const ObjectDescription &otherDescription) const
Returns true if this ObjectDescription describes the same as otherDescription; otherwise returns fals...
QString name ( ) const
inline

Returns the name of the capture source.

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

Definition at line 213 of file objectdescription.h.

213 { return d->name(); } //krazy:exclude=inline
QExplicitlySharedDataPointer< ObjectDescriptionData > d
QString description ( ) const
inline

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.

Definition at line 222 of file objectdescription.h.

222 { return d->description(); } //krazy:exclude=inline
QExplicitlySharedDataPointer< ObjectDescriptionData > d
QVariant property ( const char *  name) const
inline

Returns a named property.

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

See also
propertyNames()

Definition at line 231 of file objectdescription.h.

231 { return d->property(name); } //krazy:exclude=inline
GLuint const GLchar * name
Definition: GLee.h:1704
QExplicitlySharedDataPointer< ObjectDescriptionData > d
QList<QByteArray> propertyNames ( ) const
inline

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

See also
property()

Definition at line 238 of file objectdescription.h.

238 { return d->propertyNames(); } //krazy:exclude=inline
QExplicitlySharedDataPointer< ObjectDescriptionData > d
bool isValid ( ) const
inline

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

Definition at line 244 of file objectdescription.h.

244 { return d->isValid(); } //krazy:exclude=inline
QExplicitlySharedDataPointer< ObjectDescriptionData > d
int index ( ) const
inline

A unique identifier for this device/.

Used internally to distinguish between the devices/.

Returns
An integer that uniquely identifies every device/

Definition at line 252 of file objectdescription.h.

252 { return d->index(); } //krazy:exclude=inline
QExplicitlySharedDataPointer< ObjectDescriptionData > d

Friends And Related Function Documentation

friend class ObjectDescriptionModel< T >
friend

Definition at line 258 of file objectdescription.h.

Member Data Documentation


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