00001 00023 #ifndef AMAROK_H 00024 #define AMAROK_H 00025 00026 #include "graphic_items.h" 00027 #include <QDomDocument> 00028 00029 class AmarokTrack : public GraphicText 00030 { 00031 Q_OBJECT 00032 Q_PROPERTY(QString prefix READ prefix WRITE setPrefix) 00033 Q_PROPERTY(TrackType type READ type WRITE setType) 00034 Q_ENUMS(TrackType) 00035 00036 public: 00037 enum TrackType {Title, Artist, Album, TotalTime, CurrentTime, Genre}; 00038 AmarokTrack() : m_type(Title) {} 00039 bool init(); 00040 inline QGraphicsItem* graphicsItem() { return this; }; 00041 void timer(); 00042 bool hasTimer(); 00043 00044 private: 00045 inline void setType(TrackType type) { m_type = type; } 00046 inline void setPrefix(const QString& prefix) { m_prefix = prefix; } 00047 inline QString prefix() { return m_prefix; } 00048 inline TrackType type() { return m_type; } 00049 00050 TrackType m_type; 00051 QString m_prefix; 00052 }; 00053 00054 class AmarokStatus : public GraphicPixmap 00055 { 00056 Q_OBJECT 00057 Q_PROPERTY(StatusType type READ type WRITE setType) 00058 Q_ENUMS(StatusType) 00059 00060 public: 00061 enum StatusType { Mode, Repeat, Shuffle }; 00062 AmarokStatus() : m_type(Mode) {} 00063 bool init(); 00064 inline QGraphicsItem* graphicsItem() { return this; }; 00065 void timer(); 00066 bool hasTimer(); 00067 00068 private: 00069 inline void setType(StatusType type) { m_type = type; } 00070 inline StatusType type() { return m_type; } 00071 00072 StatusType m_type; 00073 QString m_imgPath; 00074 }; 00075 00076 class AmarokCover : public GraphicPixmap 00077 { 00078 public: 00079 bool init(); 00080 inline QGraphicsItem* graphicsItem() { return this; }; 00081 void timer(); 00082 bool hasTimer(); 00083 }; 00084 00085 class AmarokLyric : public GraphicText 00086 { 00087 public: 00088 bool init(); 00089 inline QGraphicsItem* graphicsItem() { return this; }; 00090 void timer(); 00091 bool hasTimer(); 00092 00093 private: 00094 QDomDocument m_doc; 00095 }; 00096 00097 #endif