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 #ifndef PLAYLISTBREADCRUMBLEVEL_H
0018 #define PLAYLISTBREADCRUMBLEVEL_H
0019 
0020 #include <QIcon>
0021 
0022 #include <QMap>
0023 #include <QPair>
0024 #include <QString>
0025 
0026 namespace Playlist
0027 {
0028 
0029 /**
0030  *  A level of a hierarchical structure which can be used in a breadcrumb interface.
0031  *  @author Téo Mrnjavac <teo@kde.org>
0032  */
0033 class BreadcrumbLevel
0034 {
0035 public:
0036     /**
0037      * Constructor.
0038      */
0039     explicit BreadcrumbLevel(const QString &internalColumnName );
0040 
0041     /**
0042      * Destructor.
0043      */
0044     ~BreadcrumbLevel();
0045 
0046     const QString & name();
0047 
0048     const QString & prettyName();
0049 
0050     const QIcon& icon();
0051 
0052     const QMap< QString, QPair< QIcon, QString > > siblings();
0053 
0054 protected:
0055     QString m_name;         //!< the name of this item.
0056     QString m_prettyName;
0057     QIcon m_icon;
0058 };
0059 
0060 }   //namespace Playlist
0061 
0062 #endif  //PLAYLISTBREADCRUMBLEVEL_H