Qmmp
/usr/src/RPM/BUILD/qmmp-0.8-svn/src/qmmpui/normalcontainer_p.h
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 NORMALCONTAINER_P_H
00022 #define NORMALCONTAINER_P_H
00023 
00024 #include "playlistcontainer_p.h"
00025 
00026 
00031 class NormalContainer : public PlayListContainer
00032 {
00033 public:
00034     NormalContainer();
00035     virtual ~NormalContainer();
00036 
00037     void addTrack(PlayListTrack *item);
00038     void insertTrack(int index, PlayListTrack *track);
00039     QList<PlayListGroup *> groups();
00040     QList<PlayListItem *> items() const;
00041     int count() const;
00042     int trackCount() const;
00043     QList<PlayListItem *> mid(int pos, int count) const;
00044     bool isEmpty() const;
00045     bool isSelected(int index) const;
00046     void setSelected(int index, bool selected);
00047     void clearSelection();
00048     int indexOf(PlayListItem *item) const;
00049     PlayListItem *item(int index) const;
00050     PlayListTrack *track(int index) const;
00051     PlayListGroup *group(int index) const;
00052     bool contains(PlayListItem *item) const;
00053     int numberOfTrack(int index) const;
00054     void removeTrack(int index);
00055     void removeTrack(PlayListTrack *track);
00056     void removeTracks(QList<PlayListTrack *> tracks);
00057     bool move(QList<int> indexes, int from, int to);
00058     QList<PlayListTrack *> takeAllTracks();
00059     void clear();
00060 
00061     void reverseList();
00062     void randomizeList();
00063     void sort(int mode);
00064     void sortSelection(int mode);
00065 
00066 private:
00067     QList<PlayListItem *> m_items;
00068     bool m_reverted;
00069 };
00070 
00071 #endif // NORMALCONTAINER_P_H
 All Classes Functions Variables Enumerations Enumerator