Sayonara Player
PlaylistModeHandler.h
1 /* PlaylistModeHandler.h */
2 
3 /* Copyright (C) 2011-2015 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 
22 
23 #ifndef _PLAYLIST_MODES_
24 #define _PLAYLIST_MODES_
25 
26 #include "Helper/globals.h"
27 #include "Helper/PlaylistMode.h"
28 
29 class PlaylistModeHandler : public QObject {
30 
31  Q_OBJECT
32  SINGLETON(PlaylistModeHandler)
33 
34  private:
35 
36  PlaylistMode _mode;
37  PlaylistMode _old_mode;
38 
39  void save_and_emit();
40 
41  signals:
42 
43  void sig_playlist_mode_changed(const PlaylistMode&);
44 
45  public slots:
46 
47  void enable_repeat();
48  void disable_repeat();
49  void toggle_repeat( bool );
50 
51  void enable_shuffle();
52  void disable_shuffle();
53  void toggle_shuffle( bool );
54 
55  void enable_append();
56  void disable_append();
57  void toggle_append( bool );
58 
59 
60  void enable_dynamic();
61  void disable_dynamic();
62  void toggle_dynamic( bool );
63 
64  void enable_gapless();
65  void disable_gapless();
66  void toggle_gapless( bool );
67 
68  void set_mode(const PlaylistMode& mode);
69 };
70 
71 
72 #endif
Definition: PlaylistModeHandler.h:29
Definition: PlaylistMode.h:34