Expose the sampleUrl to the model
This commit is contained in:
parent
a11bc79309
commit
adb33895fa
2 changed files with 5 additions and 1 deletions
|
@ -111,6 +111,8 @@ QVariant DanbooruPostModel::data(const QModelIndex &index, int role) const
|
|||
QStringList tagList = post->tags().toList();
|
||||
return tagList;
|
||||
}
|
||||
case SampleUrlRole:
|
||||
return post->sampleUrl();
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
@ -141,6 +143,7 @@ QHash< int, QByteArray > DanbooruPostModel::roleNames() const
|
|||
roles[TagRole] = "tags";
|
||||
roles[SizeRole] = "fileSize";
|
||||
roles[ResolutionRole] = "resolution";
|
||||
roles[SampleUrlRole] = "sampleUrl";
|
||||
return roles;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,8 @@ public:
|
|||
SizeRole = Qt::UserRole + 1003,
|
||||
RatingRole = Qt::UserRole + 1004,
|
||||
TagRole = Qt::UserRole + 1005,
|
||||
ResolutionRole = Qt::UserRole + 1006
|
||||
ResolutionRole = Qt::UserRole + 1006,
|
||||
SampleUrlRole = Qt::UserRole + 1007
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue