mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Add current/next comic view to GridView.
This commit is contained in:
@ -295,7 +295,7 @@ QVariant ComicModel::data(const QModelIndex &index, int role) const
|
||||
else if (role == RatingRole)
|
||||
return item->data(Rating);
|
||||
else if (role == CoverPathRole)
|
||||
return QUrl("file:"+_databasePath+"/covers/"+item->data(Hash).toString()+".jpg");
|
||||
return getCoverUrlPathForComicHash(item->data(Hash).toString());
|
||||
else if (role == NumPagesRole)
|
||||
return item->data(NumPages);
|
||||
else if (role == CurrentPageRole)
|
||||
@ -994,6 +994,11 @@ void ComicModel::resetComicRating(const QModelIndex &mi)
|
||||
QSqlDatabase::removeDatabase(_databasePath);
|
||||
}
|
||||
|
||||
QUrl ComicModel::getCoverUrlPathForComicHash(const QString &hash) const
|
||||
{
|
||||
return QUrl("file:"+_databasePath+"/covers/"+hash+".jpg");
|
||||
}
|
||||
|
||||
void ComicModel::addComicsToFavorites(const QList<qulonglong> &comicIds)
|
||||
{
|
||||
addComicsToFavorites(getIndexesFromIds(comicIds));
|
||||
|
Reference in New Issue
Block a user