Sayonara Player
PlaylistChooser.h
1 /* PlaylistChooser.h */
2 
3 /* Copyright (C) 2011-2017 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 "Helper/Playlist/CustomPlaylistFwd.h"
25 
26 #include <QMap>
27 #include <QObject>
28 
29 class PlaylistDBWrapper;
30 class PlaylistHandler;
31 
36 class PlaylistChooser : public QObject
37 {
38  Q_OBJECT
39 
40 public:
42  ~PlaylistChooser();
43 
44  void delete_playlist(int id);
45 
46  void load_single_playlist(int id);
47 
48  void save_playlist(int id);
49  void save_playlist(const QString& playlist_name);
50  void save_playlist_file(const QString& filename, bool);
51  void clear_playlist();
52  void playlist_files_selected(const QStringList& lst);
53  int find_playlist(const QString& name) const;
54 
55 signals:
56  void sig_all_playlists_loaded(const CustomPlaylistSkeletons&);
57 
58 
59 public slots:
60  void load_all_playlists();
61 
62 
63 private:
64  CustomPlaylistSkeletons _skeletons;
65  int _import_state;
66 
67  PlaylistHandler* _playlist_handler=nullptr;
68  PlaylistDBWrapper* _playlist_db_connector=nullptr;
69 
70  CustomPlaylist find_custom_playlist(int id);
71 };
72 
73 #endif /* PLAYLISTS_H_ */
PlaylistDBWrapper is responsible for fetching playlist data from database, especially the handling be...
Definition: PlaylistDBWrapper.h:36
The PlaylistChooser class.
Definition: PlaylistChooser.h:36
Global handler for playlists.
Definition: PlaylistHandler.h:57
The CustomPlaylist class.
Definition: CustomPlaylist.h:31