Qmmp
/usr/src/RPM/BUILD/qmmp-1.1.7/src/qmmpui/playlistcontainer_p.h
00001 /***************************************************************************
00002  *   Copyright (C) 2013-2015 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);
00042     virtual void addTracks(QList<PlayListTrack *> tracks) = 0;
00043     virtual void insertTrack(int index, PlayListTrack *track) = 0;
00044     virtual void replaceTracks(QList<PlayListTrack *> tracks) = 0;
00045     virtual QList<PlayListGroup *> groups() const = 0;
00046     virtual QList<PlayListItem *> items() const = 0;
00047     virtual QList<PlayListTrack *> tracks() const = 0;
00048     virtual int count() const = 0;
00049     virtual int trackCount() const = 0;
00050     virtual QList<PlayListItem *> mid(int pos, int count) const = 0;
00051     virtual bool isEmpty() const = 0;
00052     virtual bool isSelected(int index) const = 0;
00053     virtual void setSelected(int index, bool selected) = 0;
00054     virtual void clearSelection() = 0;
00055     virtual int indexOf(PlayListItem *item) const = 0;
00056     virtual PlayListItem *item(int index) const = 0;
00057     virtual PlayListTrack *track(int index) const = 0;
00058     virtual PlayListGroup *group(int index) const = 0;
00059     virtual bool contains(PlayListItem *item) const = 0;
00060     virtual int indexOfTrack(int index) const = 0;
00061     virtual PlayListTrack *findTrack(int number) const = 0;
00062     virtual void removeTrack(PlayListTrack *track) = 0;
00063     virtual void removeTracks(QList<PlayListTrack *> tracks) = 0;
00064     virtual bool move(QList<int> indexes, int from, int to) = 0;
00065     virtual QList<PlayListTrack *> takeAllTracks() = 0;
00066     virtual void clear() = 0;
00067 
00068     virtual void reverseList() = 0;
00069     virtual void randomizeList() = 0;
00070 
00071 protected:
00072     void swapTrackNumbers(QList<PlayListItem *> *container, int index1, int index2);
00073 };
00074 
00075 #endif // PLAYLISTCONTAINER_P_H
 All Classes Functions Variables Enumerations Enumerator