pineapple-comic-reader/dataitems/libraryitem.cpp

18 lines
429 B
C++
Raw Permalink Normal View History

2024-11-09 15:05:14 +08:00
#include "libraryitem.h"
LibraryItem::LibraryItem(int id, const QString &name, const QString &uuid)
: QStandardItem(QIcon::fromTheme(QIcon::ThemeIcon::FolderOpen), name)
{
setData(id, IdRole);
setData(uuid, UuidRole);
}
QHash<int, QByteArray> LibraryItem::roleNames()
{
return {
{Qt::DisplayRole, "display"},
{LibraryItem::IdRole, "libraryId"},
{LibraryItem::UuidRole, "uuid"},
};
}