defuze.me
Client
|
00001 /************************************************************************** 00002 ** defuze.me Epitech Innovative Project 00003 ** 00004 ** Copyright 2010-2012 00005 ** Athena Calmettes - Jocelyn De La Rosa - Francois Gaillard 00006 ** Adrien Jarthon - Alexandre Moore - Luc Peres - Arnaud Sellier 00007 ** 00008 ** All rights reserved. 00009 **************************************************************************/ 00010 00011 #ifndef LISTSITEM_HPP 00012 #define LISTSITEM_HPP 00013 00014 #include "editabletreeitem.hpp" 00015 #include <QPixmap> 00016 #include <QPushButton> 00017 00018 namespace Lists 00019 { 00020 class ListsModel; 00021 00022 class ListsItem : public EditableTreeItem 00023 { 00024 public: 00025 enum Kind { 00026 CATEGORY, ADD, PLAYLIST, PARAMETER, SEPARATOR 00027 }; 00028 enum SubKind { 00029 INVALID_SUBKIND, NORMAL_PLAYLIST, DYNAMIC_PLAYLIST, ADD_NORMAL, ADD_DYNAMIC, GENRE, ALBUM, ARTIST, TRACK, AND, INTRO 00030 }; 00031 00032 ListsItem(const QString &title, QPixmap icon, ListsModel *model, EditableTreeItem *parent = 0); 00033 bool insertChildren(int position, int count, int columns); 00034 ListsItem *child(int number); 00035 00036 Kind getKind() const; 00037 SubKind getSubKind() const; 00038 void setKind(Kind kind); 00039 void setSubKind(SubKind subKind); 00040 ListsModel *getModel() const; 00041 bool isOfKind(Kind _kind); 00042 bool isOfKind(Kind _kind, SubKind _subKind); 00043 unsigned int getId() const; 00044 void setId(unsigned int id); 00045 00046 private: 00047 QPixmap icon; 00048 ListsModel *model; 00049 Kind kind; 00050 SubKind subKind; 00051 unsigned int id; 00052 }; 00053 00054 } 00055 00056 #endif // LISTSITEM_HPP