00001 #ifndef TREECHECKITEM_H_
00002 #define TREECHECKITEM_H_
00003
00004 #include <mythtv/uilistbtntype.h>
00005
00006 class QPixmap;
00007 class PlaylistsContainer;
00008 class Playlist;
00009 class Track;
00010
00011 class TreeCheckItem : public UIListGenericTree
00012 {
00013 public:
00014 TreeCheckItem(UIListGenericTree *parent, const QString &text,
00015 const QString &level, int id);
00016 virtual ~TreeCheckItem() { }
00017
00018 QString getLevel(void) { return m_level; }
00019 int getID(void) { return m_id; }
00020
00021 void setCheckable(bool flag);
00022 bool isCheckable(void) { return m_checkable; }
00023
00024 void setCheck(int flag);
00025
00026 private:
00027 void pickPixmap(void);
00028
00029 int m_id;
00030 QString m_level;
00031 bool m_checkable;
00032 };
00033
00034 class CDCheckItem : public TreeCheckItem
00035 {
00036 public:
00037 CDCheckItem(UIListGenericTree *parent, const QString &text,
00038 const QString &level, int track);
00039 };
00040
00041 class PlaylistItem : public UIListGenericTree
00042 {
00043 public:
00044 PlaylistItem(UIListGenericTree *parent, const QString &title);
00045
00046 virtual void userSelectedMe() = 0;
00047
00048 QString getText(void) { return text; }
00049
00050 private:
00051 QString text;
00052 };
00053
00054 class PlaylistTitle : public PlaylistItem
00055 {
00056 public:
00057 PlaylistTitle(UIListGenericTree *parent, const QString &title);
00058
00059 void setOwner(Playlist *owner);
00060 void userSelectedMe(void);
00061 void removeTrack(int x);
00062 bool isActive(void) { return active; }
00063
00064 private:
00065 Playlist *ptr_to_owner;
00066 bool active;
00067 };
00068
00069 class PlaylistTrack : public PlaylistItem
00070 {
00071 public:
00072 PlaylistTrack(UIListGenericTree *parent, const QString &title);
00073
00074 void setOwner(Track *owner);
00075 void userSelectedMe();
00076 void beMoving(bool flag);
00077 void moveUpDown(bool flag);
00078 int getID();
00079
00080 protected:
00081 QPixmap *pixmap;
00082 Track *ptr_to_owner;
00083 bool held;
00084 };
00085
00086 class PlaylistPlaylist : public PlaylistTrack
00087 {
00088 public:
00089 PlaylistPlaylist(UIListGenericTree *parent, const QString &title);
00090 };
00091
00092 class PlaylistCD : public PlaylistTrack
00093 {
00094 public:
00095 PlaylistCD(UIListGenericTree *parent, const QString &title);
00096 };
00097
00098 #endif