MCPcopy Create free account
hub / github.com/KDE/okular / data

Method data

part/annotationproxymodels.cpp:560–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560QVariant AuthorGroupProxyModel::data(const QModelIndex &proxyIndex, int role) const
561{
562 if (isAuthorItem(proxyIndex)) {
563 const AuthorGroupItem *item = static_cast<AuthorGroupItem *>(proxyIndex.internalPointer());
564 if (role == Qt::DisplayRole) {
565 return item->author();
566 } else if (role == Qt::DecorationRole) {
567 return QIcon::fromTheme(item->author().isEmpty() ? QStringLiteral("user-away") : QStringLiteral("user-identity"));
568 } else {
569 return QVariant();
570 }
571 } else {
572 return QAbstractProxyModel::data(proxyIndex, role);
573 }
574}
575
576QMap<int, QVariant> AuthorGroupProxyModel::itemData(const QModelIndex &index) const
577{

Callers 2

filterAcceptsRowMethod · 0.45
doRebuildIndexesMethod · 0.45

Calls 4

isAuthorItemFunction · 0.85
QVariantClass · 0.85
isEmptyMethod · 0.80
authorMethod · 0.45

Tested by

no test coverage detected