File indexing completed on 2024-05-19 04:48:39

0001 /****************************************************************************************
0002  * Copyright (c) 2007 Bart Cerneels <bart.cerneels@kde.org>                             *
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) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 #include "PlaylistBrowser.h"
0018 
0019 #include "browsers/playlistbrowser/APGCategory.h"
0020 #include "browsers/playlistbrowser/DynamicCategory.h"
0021 #include "browsers/playlistbrowser/UserPlaylistCategory.h"
0022 #include "core/playlists/Playlist.h"
0023 #include "core/support/Amarok.h"
0024 #include "core/support/Debug.h"
0025 #include "playlistmanager/PlaylistManager.h"
0026 
0027 #include <QLayout>
0028 #include <QList>
0029 #include <QStandardPaths>
0030 #include <QString>
0031 
0032 #include <KLocalizedString>
0033 
0034 PlaylistBrowserNS::PlaylistBrowser::PlaylistBrowser( const QString &name, QWidget *parent )
0035     : BrowserCategoryList( name, parent )
0036 {
0037     setContentsMargins(0,0,0,0);
0038 
0039     addCategory( new DynamicCategory( nullptr ) );
0040     addCategory( new UserPlaylistCategory( nullptr ) );
0041     addCategory( new APGCategory( nullptr ) );
0042 
0043     setLongDescription( i18n( "The playlist browser contains your list of imported and saved playlists. It is also where you can specify powerful dynamic playlists and manage your podcast subscriptions and episodes." ) );
0044 
0045     setImagePath( QStandardPaths::locate( QStandardPaths::GenericDataLocation, QStringLiteral("amarok/images/hover_info_playlists.png") ) );
0046 }
0047 
0048 PlaylistBrowserNS::PlaylistBrowser::~PlaylistBrowser()
0049 {
0050 }
0051