Qmmp
playlistgroup.h
1 /***************************************************************************
2  * Copyright (C) 2013-2014 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 
27 class GroupedContainer;
28 
33 {
34 public:
39  PlayListGroup(const QString &formattedTitle);
43  virtual ~PlayListGroup();
48  const QString formattedTitle(int column = 0);
49  const QStringList formattedTitles();
54  bool contains(PlayListTrack *track) const;
59  bool isEmpty() const;
63  QList<PlayListTrack *> tracks() const;
67  int count() const;
71  const QString formattedLength() { return QString(); }
75  bool isGroup() const;
76 
77 private:
78  QList<PlayListTrack *> trackList; //A list of tracks
79  friend class GroupedContainer;
80 
81  QString m_name;
82 };
83 
84 #endif // PLAYLISTGROUP_H
QList< PlayListTrack * > tracks() const
The PlayListItem class provides an item for use with the PlayListModel class.
Definition: playlistitem.h:31
const QStringList formattedTitles()
bool contains(PlayListTrack *track) const
int count() const
PlayListGroup(const QString &formattedTitle)
bool isEmpty() const
const QString formattedTitle(int column=0)
bool isGroup() const
virtual ~PlayListGroup()
const QString formattedLength()
Definition: playlistgroup.h:71
The PlayListTrack class provides a group for use with the PlayListModel class.
Definition: playlistgroup.h:32
The PlayListTrack class provides a track for use with the PlayListModel class.
Definition: playlisttrack.h:36