Qmmp
|
00001 /*************************************************************************** 00002 * Copyright (C) 2013 by Ilya Kotov * 00003 * forkotov02@hotmail.ru * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 00019 ***************************************************************************/ 00020 00021 #ifndef PLAYLISTCONTAINER_P_H 00022 #define PLAYLISTCONTAINER_P_H 00023 00024 #include <QList> 00025 #include "playlistitem.h" 00026 #include "playlisttrack.h" 00027 #include "playlistgroup.h" 00028 00029 00035 class PlayListContainer 00036 { 00037 public: 00038 PlayListContainer(){} 00039 virtual ~PlayListContainer(){} 00040 00041 virtual void addTrack(PlayListTrack *track) = 0; 00042 void addTracks(QList<PlayListTrack *> tracks); 00043 virtual void insertTrack(int index, PlayListTrack *track) = 0; 00044 virtual QList<PlayListGroup *> groups() = 0; 00045 virtual QList<PlayListItem *> items() const = 0; 00046 virtual int count() const = 0; 00047 virtual int trackCount() const = 0; 00048 virtual QList<PlayListItem *> mid(int pos, int count) const = 0; 00049 virtual bool isEmpty() const = 0; 00050 virtual bool isSelected(int index) const = 0; 00051 virtual void setSelected(int index, bool selected) = 0; 00052 virtual void clearSelection() = 0; 00053 virtual int indexOf(PlayListItem *item) const = 0; 00054 virtual PlayListItem *item(int index) const = 0; 00055 virtual PlayListTrack *track(int index) const = 0; 00056 virtual PlayListGroup *group(int index) const = 0; 00057 virtual bool contains(PlayListItem *item) const = 0; 00058 virtual int numberOfTrack(int index) const = 0; 00059 virtual void removeTrack(int index) = 0; 00060 virtual void removeTrack(PlayListTrack *track) = 0; 00061 virtual void removeTracks(QList<PlayListTrack *> tracks) = 0; 00062 virtual bool move(QList<int> indexes, int from, int to) = 0; 00063 virtual QList<PlayListTrack *> takeAllTracks() = 0; 00064 virtual void clear() = 0; 00065 00066 virtual void reverseList() = 0; 00067 virtual void randomizeList() = 0; 00068 virtual void sort(int mode) = 0; 00069 virtual void sortSelection(int mode) = 0; 00070 00071 protected: 00075 void doSort(int sort_mode, QList<PlayListTrack*>& list_to_sort, bool reverted); 00076 }; 00077 00078 #endif // PLAYLISTCONTAINER_P_H