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

0001 /****************************************************************************************
0002  * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn@kde.org>                                *
0003  * Copyright (c) 2009 Bart Cerneels <bart.cerneels@kde.org>                             *
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) any later           *
0008  * version.                                                                             *
0009  *                                                                                      *
0010  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0012  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0013  *                                                                                      *
0014  * You should have received a copy of the GNU General Public License along with         *
0015  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0016  ****************************************************************************************/
0017 
0018 #include "UserPlaylistCategory.h"
0019 
0020 #include "UserPlaylistModel.h"
0021 
0022 #include <QStandardPaths>
0023 
0024 #include <KLocalizedString>
0025 
0026 
0027 using namespace PlaylistBrowserNS;
0028 
0029 QString UserPlaylistCategory::s_configGroup( QStringLiteral("Saved Playlists View") );
0030 
0031 UserPlaylistCategory::UserPlaylistCategory( QWidget * parent )
0032     : PlaylistBrowserCategory( Playlists::UserPlaylist,
0033                                QStringLiteral("user playlists"), s_configGroup,
0034                                The::userPlaylistModel(), parent )
0035 {
0036     setPrettyName( i18n( "Saved Playlists" ) );
0037     setShortDescription( i18n( "User generated and imported playlists" ) );
0038     setIcon( QIcon::fromTheme( QStringLiteral("amarok_playlist") ) );
0039 
0040     setLongDescription( i18n( "Create, edit, organize and load playlists. "
0041         "Amarok automatically adds any playlists found when scanning your collection, "
0042         "and any playlists that you save are also shown here." ) );
0043 
0044     setImagePath( QStandardPaths::locate( QStandardPaths::GenericDataLocation, QStringLiteral("amarok/images/hover_info_user_playlists.png") ) );
0045 }
0046 
0047 UserPlaylistCategory::~UserPlaylistCategory()
0048 {
0049 }