Qmmp
normalcontainer_p.h
1 /***************************************************************************
2  * Copyright (C) 2013 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 
21 #ifndef NORMALCONTAINER_P_H
22 #define NORMALCONTAINER_P_H
23 
24 #include "playlistcontainer_p.h"
25 
26 
31 class NormalContainer : public PlayListContainer
32 {
33 public:
34  NormalContainer();
35  virtual ~NormalContainer();
36 
37  void addTracks(QList<PlayListTrack *> tracks);
38  void insertTrack(int index, PlayListTrack *track);
39  void replaceTracks(QList<PlayListTrack *> tracks);
40  QList<PlayListGroup *> groups() const;
41  QList<PlayListTrack *> tracks() const;
42  QList<PlayListItem *> items() const;
43  int count() const;
44  int trackCount() const;
45  QList<PlayListItem *> mid(int pos, int count) const;
46  bool isEmpty() const;
47  bool isSelected(int index) const;
48  void setSelected(int index, bool selected);
49  void clearSelection();
50  int indexOf(PlayListItem *item) const;
51  PlayListItem *item(int index) const;
52  PlayListTrack *track(int index) const;
53  PlayListGroup *group(int index) const;
54  bool contains(PlayListItem *item) const;
55  int indexOfTrack(int index) const;
56  PlayListTrack *findTrack(int number) const;
57  void removeTrack(PlayListTrack *track);
58  void removeTracks(QList<PlayListTrack *> tracks);
59  bool move(QList<int> indexes, int from, int to);
60  QList<PlayListTrack *> takeAllTracks();
61  void clear();
62 
63  void reverseList();
64  void randomizeList();
65 
66 private:
67  QList<PlayListItem *> m_items;
68 };
69 
70 #endif // NORMALCONTAINER_P_H
The PlayListItem class provides an item for use with the PlayListModel class.
Definition: playlistitem.h:31
The PlayListTrack class provides a group for use with the PlayListModel class.
Definition: playlistgroup.h:33
The PlayListTrack class provides a track for use with the PlayListModel class.
Definition: playlisttrack.h:36