defuze.me
Client
|
00001 #ifndef PLAYLISTSMODEL_HPP 00002 #define PLAYLISTSMODEL_HPP 00003 00004 #include "playlistitem.hpp" 00005 00006 #include <QStandardItemModel> 00007 00008 namespace Playlists 00009 { 00010 00011 class PlaylistsPlugin; 00012 00013 class PlaylistsModel : public QStandardItemModel 00014 { 00015 public: 00016 PlaylistsModel(PlaylistsPlugin *playlists); 00017 PlaylistsPlugin *getPlaylists() const; 00018 void update(int playlistId = -1); 00019 void insertPlaylist(int playlistId); 00020 void deletePlaylist(int playlistId); 00021 int getIdByIndex(const QModelIndex &index) const; 00022 QMimeData* mimeData(const QModelIndexList &indexes) const; 00023 00024 private: 00025 PlaylistsPlugin *playlists; 00026 QStandardItem *rootItem; 00027 }; 00028 } 00029 00030 #endif // PLAYLISTSMODEL_HPP