File indexing completed on 2024-05-19 04:49:50
0001 /**************************************************************************************** 0002 * Copyright (c) 2008 Daniel Jones <danielcjones@gmail.com> * 0003 * Copyright (c) 2010 Ralf Engels <ralf-engels@gmx.de> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify it under * 0006 * the terms of the GNU General Public License as published by the Free Software * 0007 * Foundation; either version 2 of the License, or (at your option) version 3 or * 0008 * any later version accepted by the membership of KDE e.V. (or its successor approved * 0009 * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of * 0010 * version 3 of the license. * 0011 * * 0012 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0013 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0014 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0015 * * 0016 * You should have received a copy of the GNU General Public License along with * 0017 * this program. If not, see <http://www.gnu.org/licenses/>. * 0018 ****************************************************************************************/ 0019 0020 #ifndef DYNAMICTRACKNAVIGATOR_H 0021 #define DYNAMICTRACKNAVIGATOR_H 0022 0023 #include "StandardTrackNavigator.h" 0024 0025 namespace Dynamic 0026 { 0027 class DynamicPlaylist; 0028 } 0029 0030 #include <QPointer> 0031 0032 namespace Playlist 0033 { 0034 0035 /** A navigator that implements 'dynamic mode', which is a never-ending queue of tracks. 0036 The navigator will use the current dynamic playlist and try to get new 0037 tracks before advancing 0038 */ 0039 class DynamicTrackNavigator : public StandardTrackNavigator 0040 { 0041 Q_OBJECT 0042 0043 public: 0044 DynamicTrackNavigator() ; 0045 ~DynamicTrackNavigator() override; 0046 0047 void appendUpcoming(); 0048 0049 public Q_SLOTS: 0050 void repopulate(); 0051 0052 private Q_SLOTS: 0053 void activePlaylistChanged(); 0054 void receiveTracks( const Meta::TrackList &); 0055 void trackChanged(); 0056 0057 private: 0058 void removePlayed(); 0059 0060 QPointer<Dynamic::DynamicPlaylist> m_playlist; 0061 }; 0062 } 0063 0064 #endif