Clementine-audio-player-Mac.../src/library/libraryitem.h

56 lines
1.6 KiB
C
Raw Normal View History

/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
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>
#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,
Type_Container,
2009-12-24 20:16:07 +01:00
Type_Song,
Type_PlaylistContainer,
Type_SmartPlaylist,
Type_LoadingIndicator,
2009-12-24 20:16:07 +01:00
};
2009-12-30 01:31:00 +01:00
LibraryItem(SimpleTreeModel<LibraryItem>* model)
: 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)
: 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
int container_level;
Song metadata;
QByteArray smart_playlist_data;
LibraryItem* compilation_artist_node_;
2009-12-24 20:16:07 +01:00
};
#endif // LIBRARYITEM_H