oopapidocs  2.0
phononitem.h
00001 #ifndef PHONONITEM_H
00002 #define PHONONITEM_H
00003 #include <phonon>
00004 #include "metadataobject.h"
00005 
00006 namespace Phonon {
00007     class MetaDataLoader;
00008 };
00009 
00024 //start id="phononitem"
00025 class PhononItem : public MetaDataObject {
00026     Q_OBJECT
00027 public:
00028     friend class Phonon::MetaDataLoader;
00029     virtual ~PhononItem();
00030 //end
00033     virtual void setFileName(QString name);
00034     virtual Preference preference() const ;
00035     virtual QString genre() const;
00036     virtual QString artist() const;
00037     virtual QString albumTitle() const;
00038     virtual QString trackTitle() const;
00039     virtual QString trackNumber() const;
00040     virtual QTime trackTime() const;
00041     virtual QString comment() const;
00042     Phonon::MediaSource source() {
00043         return m_mediaSource;
00044     }
00045 //start id="phononitem"
00049     bool checkMetaData() const;
00050 
00051 protected:
00053     explicit PhononItem(QString path=QString(), QObject* parent=0);
00054     void fetchMetaData();
00055 //end
00056 private slots:
00057     void setTotalTime(qint64 tt);
00058     void metaStateChanged(Phonon::State newState, Phonon::State oldState);
00059 //start id="phononitem"
00060 signals:
00061     void fetched(bool success = true);
00062 private:
00063     bool m_timeSet, m_loaded;
00064     QString extendedComment;
00065     Phonon::MediaSource m_mediaSource;
00066     Phonon::MediaObject *m_metaMedia;
00067 };
00068 //end
00069 
00070 
00071 #endif // PHONONITEM_H
 All Classes Namespaces Functions Enumerations