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

0001 /****************************************************************************************
0002  * Copyright (c) 2009 Téo Mrnjavac <teo@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 "PlaylistBreadcrumbLevel.h"
0018 
0019 #include "PlaylistDefines.h"
0020 
0021 #include <KLocalizedString>
0022 
0023 namespace Playlist
0024 {
0025 
0026 BreadcrumbLevel::BreadcrumbLevel( const QString &internalColumnName )
0027     : m_name( internalColumnName )
0028 {
0029     Column col = columnForName( internalColumnName );
0030 
0031     m_icon = QIcon::fromTheme( iconName( col ) );
0032     m_prettyName = columnName( col );
0033 }
0034 
0035 BreadcrumbLevel::~BreadcrumbLevel()
0036 {}
0037 
0038 const QString &
0039 BreadcrumbLevel::name()
0040 {
0041     return m_name;
0042 }
0043 
0044 const QString &
0045 BreadcrumbLevel::prettyName()
0046 {
0047     return m_prettyName;
0048 }
0049 
0050 const QIcon &
0051 BreadcrumbLevel::icon()
0052 {
0053     return m_icon;
0054 }
0055 
0056 }   //namespace Playlist