pineapple-comic-reader/dataitems/comicitem.h
Gary Wang edb3338bc4
feat(misc): a bunch of crude UI/UX tweaks
- display add time for later use
- basic keyboard navigation support
- remember last-used server address
- show connection error when attempt to connect to server
2024-11-16 00:24:04 +08:00

24 lines
448 B
C++

#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,
};
Q_ENUM(Roles)
explicit ComicItem(QJsonObject jsonObj, const QString &name);
static QHash<int, QByteArray> roleNames();
};