2010-03-24 00:11:46 +01:00
|
|
|
/* This file is part of Clementine.
|
2010-11-20 14:27:10 +01:00
|
|
|
Copyright 2010, David Sansome <me@davidsansome.com>
|
2010-03-24 00:11:46 +01:00
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2009-12-24 20:16:07 +01:00
|
|
|
#ifndef LIBRARYITEM_H
|
|
|
|
#define LIBRARYITEM_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QList>
|
|
|
|
|
2010-05-10 23:50:31 +02:00
|
|
|
#include "core/simpletreeitem.h"
|
|
|
|
#include "core/song.h"
|
2009-12-24 20:16:07 +01:00
|
|
|
|
2009-12-26 14:49:18 +01:00
|
|
|
class LibraryItem : public SimpleTreeItem<LibraryItem> {
|
|
|
|
public:
|
2009-12-24 20:16:07 +01:00
|
|
|
enum Type {
|
|
|
|
Type_Root,
|
|
|
|
Type_Divider,
|
2010-03-31 02:30:57 +02:00
|
|
|
Type_Container,
|
2009-12-24 20:16:07 +01:00
|
|
|
Type_Song,
|
2010-11-17 21:21:04 +01:00
|
|
|
Type_PlaylistContainer,
|
|
|
|
Type_SmartPlaylist,
|
2011-02-26 15:27:57 +01:00
|
|
|
Type_LoadingIndicator,
|
2009-12-24 20:16:07 +01:00
|
|
|
};
|
|
|
|
|
2009-12-30 01:31:00 +01:00
|
|
|
LibraryItem(SimpleTreeModel<LibraryItem>* model)
|
2014-02-07 16:34:20 +01:00
|
|
|
: SimpleTreeItem<LibraryItem>(Type_Root, model),
|
|
|
|
container_level(-1),
|
2014-02-21 17:24:49 +01:00
|
|
|
compilation_artist_node_(nullptr) {}
|
2012-10-28 01:28:36 +02:00
|
|
|
|
2014-02-21 17:24:49 +01:00
|
|
|
LibraryItem(Type type, LibraryItem* parent = nullptr)
|
2014-02-07 16:34:20 +01:00
|
|
|
: SimpleTreeItem<LibraryItem>(type, parent),
|
|
|
|
container_level(-1),
|
2014-02-21 17:24:49 +01:00
|
|
|
compilation_artist_node_(nullptr) {}
|
2009-12-24 20:16:07 +01:00
|
|
|
|
2010-03-31 02:30:57 +02:00
|
|
|
int container_level;
|
|
|
|
Song metadata;
|
2010-11-17 21:21:04 +01:00
|
|
|
QByteArray smart_playlist_data;
|
2012-10-22 05:20:24 +02:00
|
|
|
LibraryItem* compilation_artist_node_;
|
2009-12-24 20:16:07 +01:00
|
|
|
};
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
#endif // LIBRARYITEM_H
|