File indexing completed on 2024-05-05 04:48:43
0001 /**************************************************************************************** 0002 * Copyright (c) 2007 Ian Monroe <ian@monroe.nu> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) version 3 or * 0007 * any later version accepted by the membership of KDE e.V. (or its successor approved * 0008 * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of * 0009 * version 3 of the license. * 0010 * * 0011 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0012 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0013 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License along with * 0016 * this program. If not, see <http://www.gnu.org/licenses/>. * 0017 ****************************************************************************************/ 0018 0019 #ifndef AMAROK_PLAYLISTDOCK_H 0020 #define AMAROK_PLAYLISTDOCK_H 0021 0022 #include "PlaylistSortWidget.h" 0023 #include "view/listview/PrettyListView.h" 0024 #include "widgets/AmarokDockWidget.h" 0025 #include "core-impl/playlists/providers/user/UserPlaylistProvider.h" 0026 0027 #include <QPointer> 0028 0029 class KActionCollection; 0030 class KActionMenu; 0031 class BoxWidget; 0032 class QLabel; 0033 class QWidget; 0034 class PlaylistQueueEditor; 0035 0036 namespace Playlists { 0037 class PlaylistProvider; 0038 class UserPlaylistProvider; 0039 } 0040 0041 namespace Playlist 0042 { 0043 0044 class ProgressiveSearchWidget; 0045 0046 class Dock : public AmarokDockWidget 0047 { 0048 Q_OBJECT 0049 0050 public: 0051 explicit Dock( QWidget* parent ); 0052 PrettyListView *currentView(); 0053 SortWidget *sortWidget(); 0054 ProgressiveSearchWidget *searchWidget(); 0055 void showActiveTrack(); 0056 void editTrackInfo(); 0057 0058 void polish() override; 0059 0060 public Q_SLOTS: 0061 void clearFilterIfActive(); 0062 void slotEditQueue(); 0063 0064 protected: 0065 QSize sizeHint() const override; 0066 0067 private Q_SLOTS: 0068 /** show or hide the dynamic playlist mode indicator */ 0069 void showDynamicHint(); 0070 0071 void paletteChanged( const QPalette& palette ); 0072 void playlistProviderAdded( Playlists::PlaylistProvider *provider, int category ); 0073 void playlistProviderRemoved( Playlists::PlaylistProvider *provider, int category ); 0074 void slotSaveCurrentPlaylist(); 0075 void slotDynamicHintLinkActivated( const QString &href ); 0076 0077 private: 0078 KActionMenu *m_savePlaylistMenu; 0079 KActionCollection *m_saveActions; 0080 0081 QPointer<PlaylistQueueEditor> m_playlistQueueEditor; 0082 0083 PrettyListView *m_playlistView; 0084 ProgressiveSearchWidget *m_searchWidget; 0085 SortWidget *m_sortWidget; 0086 QLabel *m_dynamicHintWidget; 0087 0088 BoxWidget *m_mainWidget; 0089 BoxWidget *m_barBox; 0090 }; 0091 } 0092 0093 Q_DECLARE_METATYPE( QPointer<Playlists::UserPlaylistProvider> ) 0094 #endif