Qmmp
playlistgroup.h
1 /***************************************************************************
2  * Copyright (C) 2013-2018 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 PLAYLISTGROUP_H
22 #define PLAYLISTGROUP_H
23 
24 #include "playlisttrack.h"
25 #include "playlistitem.h"
26 #include "qmmpui_export.h"
27 
28 class GroupedContainer;
29 
33 class QMMPUI_EXPORT PlayListGroup : public PlayListItem
34 {
35 public:
40  PlayListGroup(const QString &formattedTitle);
44  virtual ~PlayListGroup();
49  const QString formattedTitle(int column = 0);
50  const QStringList formattedTitles();
55  bool contains(PlayListTrack *track) const;
60  bool isEmpty() const;
64  QList<PlayListTrack *> tracks() const;
68  int count() const;
72  const QString formattedLength() { return QString(); }
76  bool isGroup() const;
77 
78 private:
79  QList<PlayListTrack *> trackList; //A list of tracks
80  friend class GroupedContainer;
81 
82  QString m_name;
83 };
84 
85 #endif // PLAYLISTGROUP_H
The PlayListItem class provides an item for use with the PlayListModel class.
Definition: playlistitem.h:31
virtual const QStringList formattedTitles()=0
virtual bool isGroup() const =0
virtual const QString formattedTitle(int column)=0
const QString formattedLength()
Definition: playlistgroup.h:72
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