Qmmp
normalcontainer_p.h
1 /***************************************************************************
2  * Copyright (C) 2013-2022 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(const QList<PlayListTrack *> &tracks) override;
38  int insertTrack(int index, PlayListTrack *track) override;
39  void replaceTracks(const QList<PlayListTrack *> &tracks) override;
40  QList<PlayListGroup *> groups() const override;
41  QList<PlayListTrack *> tracks() const override;
42  const QList<PlayListItem *> &items() const override;
43  int count() const override;
44  int trackCount() const override;
45  QList<PlayListItem *> mid(int pos, int count) const override;
46  bool isEmpty() const override;
47  bool isSelected(int index) const override;
48  void setSelected(int index, bool selected) override;
49  void clearSelection() override;
50  int indexOf(PlayListItem *item) const override;
51  PlayListItem *item(int index) const override;
52  PlayListTrack *track(int index) const override;
53  PlayListGroup *group(int index) const override;
54  bool contains(PlayListItem *item) const override;
55  int indexOfTrack(int index) const override;
56  PlayListTrack *findTrack(int number) const override;
57  void removeTrack(PlayListTrack *track) override;
58  void removeTracks(QList<PlayListTrack *> tracks) override;
59  bool move(const QList<int> &indexes, int from, int to) override;
60  QList<PlayListTrack *> takeAllTracks() override;
61  void clear() override;
62 
63  void reverseList() override;
64  void randomizeList() override;
65 
66 private:
67  QList<PlayListItem *> m_items;
68 };
69 
70 #endif // NORMALCONTAINER_P_H
The PlayListTrack class provides a group for use with the PlayListModel class.
Definition: playlistgroup.h:34
The PlayListItem class provides an item for use with the PlayListModel class.
Definition: playlistitem.h:32
The PlayListTrack class provides a track for use with the PlayListModel class.
Definition: playlisttrack.h:37