Sayonara Player
PlaylistChooser.h
1/* PlaylistChooser.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef PLAYLISTCHOOSER_H_
22#define PLAYLISTCHOOSER_H_
23
24#include "Utils/Pimpl.h"
25#include "Utils/globals.h"
26
27#include <QList>
28#include <QObject>
29
30class CustomPlaylist;
31class PlaylistCreator;
32
33namespace Playlist
34{
40 class Chooser :
41 public QObject
42 {
43 Q_OBJECT
44 PIMPL(Chooser)
45
46 signals:
47 void sigPlaylistsChanged();
48
49 public:
50 Chooser(PlaylistCreator* playlistCreator, QObject* parent);
51 ~Chooser();
52
53 void loadSinglePlaylist(int id);
54 int findPlaylist(const QString& playlist) const;
55
56 const QList<CustomPlaylist>& playlists();
57
58 Util::SaveAsAnswer renamePlaylist(int id, const QString& newName);
59 bool deletePlaylist(int id);
60
61 private slots:
62 void playlistsChanged();
63
64 void playlistDeleted(int id);
65 void playlistAdded(int id, const QString& name);
66 void playlistRenamed(int id, const QString& old_name, const QString& new_name);
67 };
68}
69
70#endif /* PLAYLISTS_H_ */
Definition: CustomPlaylist.h:30
Definition: PlaylistInterface.h:56
The Chooser class is used to select playlists out of all saved playlists.
Definition: PlaylistChooser.h:42
Definition: EngineUtils.h:33