Debian Codegraph @

src/playlist/navigators/DynamicTrackNavigator.h

raw
1 /****************************************************************************************
2 * Copyright (c) 2008 Daniel Jones <[email protected]> *
3 * Copyright (c) 2010 Ralf Engels <[email protected]> *
4 * *
5 * This program is free software; you can redistribute it and/or modify it under *
6 * the terms of the GNU General Public License as published by the Free Software *
7 * Foundation; either version 2 of the License, or (at your option) version 3 or *
8 * any later version accepted by the membership of KDE e.V. (or its successor approved *
9 * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of *
10 * version 3 of the license. *
11 * *
12 * This program is distributed in the hope that it will be useful, but WITHOUT ANY *
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
14 * PARTICULAR PURPOSE. See the GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License along with *
17 * this program. If not, see <http://www.gnu.org/licenses/>. *
18 ****************************************************************************************/
19
20 #ifndef DYNAMICTRACKNAVIGATOR_H
21 #define DYNAMICTRACKNAVIGATOR_H
22
23 #include "StandardTrackNavigator.h"
24
25 namespace Dynamic
26 {
27 class DynamicPlaylist;
28 }
29
30 #include <QPointer>
31
32 namespace Playlist
33 {
34
35 /** A navigator that implements 'dynamic mode', which is a never-ending queue of tracks.
36 The navigator will use the current dynamic playlist and try to get new
37 tracks before advancing
38 */
39 class DynamicTrackNavigator : public StandardTrackNavigator
40 {
41 Q_OBJECT
42
43 public:
44 DynamicTrackNavigator() ;
45 ~DynamicTrackNavigator() override;
46
47 void appendUpcoming();
48
49 public Q_SLOTS:
50 void repopulate();
51
52 private Q_SLOTS:
53 void activePlaylistChanged();
54 void receiveTracks( const Meta::TrackList &);
55 void trackChanged();
56
57 private:
58 void removePlayed();
59
60 QPointer<Dynamic::DynamicPlaylist> m_playlist;
61 };
62 }
63
64 #endif