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

0001 /****************************************************************************************
0002  * Copyright (c) 2008 Nikolaj Hald Nielsen <nhn@kde.org>                                *
0003  * Copyright (c) 2008 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 #ifndef PLAYLISTVIEWITEM_H
0019 #define PLAYLISTVIEWITEM_H
0020 
0021 #include "core/meta/PlaylistGroup.h"
0022 
0023 #include <QSharedData>
0024 #include "AmarokSharedPointer.h"
0025 
0026 /**
0027     @author Nikolaj Hald Nielsen <nhn@kde.org>
0028 */
0029 
0030 class PlaylistViewItem;
0031 typedef AmarokSharedPointer<PlaylistViewItem> PlaylistViewItemPtr;
0032 
0033 class PlaylistViewItem : public virtual QSharedData
0034 {
0035     public:
0036         PlaylistViewItem() : QSharedData() {}
0037 
0038         virtual  ~PlaylistViewItem() {}
0039 
0040         virtual Meta::PlaylistGroupPtr parent() const = 0;
0041         virtual int childCount() const { return 0; }
0042         virtual QString name() const = 0;
0043         virtual QString description() const = 0;
0044         virtual void rename( const QString &name ) = 0;
0045 
0046 };
0047 
0048 Q_DECLARE_METATYPE( PlaylistViewItemPtr )
0049 
0050 #endif