feat(browser): support display subfolders
This commit is contained in:
18
dataitems/folderitem.cpp
Normal file
18
dataitems/folderitem.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "folderitem.h"
|
||||
|
||||
FolderItem::FolderItem(QJsonObject jsonObj, const QString &name)
|
||||
: QStandardItem(name)
|
||||
{
|
||||
setData(jsonObj["id"].toString(), IdRole);
|
||||
setData(jsonObj["first_comic_hash"].toString(), FirstComicHashRole);
|
||||
setData(jsonObj["path"].toString(), PathRole);
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> FolderItem::roleNames()
|
||||
{
|
||||
return {
|
||||
{Qt::DisplayRole, "display"},
|
||||
{FolderItem::IdRole, "folderId"},
|
||||
{FolderItem::PathRole, "path"},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user