pineapple-comic-reader/dataitems/comicitem.h

24 lines
448 B
C
Raw Permalink Normal View History

2024-11-09 15:05:14 +08:00
#pragma once
#include <QJsonObject>
#include <QStandardItem>
#include <QQmlEngine>
class ComicItem : public QStandardItem
{
Q_GADGET
public:
enum Roles {
IdRole = Qt::UserRole + 1,
HashRole,
PageCountRole,
CurrentPageRole,
TypeRole,
AddedTimeRole,
2024-11-09 15:05:14 +08:00
};
Q_ENUM(Roles)
explicit ComicItem(QJsonObject jsonObj, const QString &name);
static QHash<int, QByteArray> roleNames();
2024-11-09 15:05:14 +08:00
};