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