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,
|
2024-11-15 20:58:03 +08:00
|
|
|
AddedTimeRole,
|
2024-11-09 15:05:14 +08:00
|
|
|
};
|
|
|
|
Q_ENUM(Roles)
|
|
|
|
|
|
|
|
explicit ComicItem(QJsonObject jsonObj, const QString &name);
|
2024-11-10 17:10:45 +08:00
|
|
|
static QHash<int, QByteArray> roleNames();
|
2024-11-09 15:05:14 +08:00
|
|
|
};
|