Expose the sampleUrl to the model

This commit is contained in:
Luca Beltrame 2015-02-26 00:21:19 +01:00
parent a11bc79309
commit adb33895fa
2 changed files with 5 additions and 1 deletions

View file

@ -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;
}