oopapidocs  2.0
PhononItem Class Reference

A wrapper around Phonon::MediaSource. More...

#include <phononitem.h>

Inheritance diagram for PhononItem:
Collaboration diagram for PhononItem:

List of all members.

Public Member Functions

virtual void setFileName (QString name)
 changes the fileName.
virtual QTime trackTime () const
bool checkMetaData () const

Protected Member Functions

 PhononItem (QString path=QString(), QObject *parent=0)

Friends

class Phonon::MetaDataLoader

Detailed Description

A wrapper around Phonon::MediaSource.

Grabs metadata for media files from metadata tags, in a non-blocking way using the Phonon API. Phonon creates at least 1 thread for each metadata fetch.

Don't create lots of instances of this directly - use MetaDataLoader.

Tested on Linux, Qt 4.7.1. It seems to not work with MP3s on Windows, but that is also true of the Qt 4.7 phonon mediaplayer example (in loading metadata, that is)

See also:
MetaDataLoader::get()
Version:
1.0 2010-10-05

Definition at line 25 of file phononitem.h.


Constructor & Destructor Documentation

PhononItem::PhononItem ( QString  path = QString(),
QObject *  parent = 0 
) [explicit, protected]
See also:
MetaDataLoader::get()

Definition at line 8 of file phononitem.cpp.

References setFileName().

Here is the call graph for this function:


Member Function Documentation

bool PhononItem::checkMetaData ( ) const
Returns:
false if the data is not in the database. For valid files, it will fetch the data but in a non-blocking way

Definition at line 30 of file phononitem.cpp.

Referenced by trackTime().

void PhononItem::setFileName ( QString  name) [virtual]

changes the fileName.

Clears resources. Does not initiate fetching of metadata.

Reimplemented from MetaDataValue.

Definition at line 15 of file phononitem.cpp.

Referenced by PhononItem().

QTime PhononItem::trackTime ( ) const [virtual]
Returns:
duration of track

Reimplemented from MetaDataValue.

Definition at line 169 of file phononitem.cpp.

References checkMetaData().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Enumerations