summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/peoplemodel.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-27 21:46:49 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-27 22:17:42 +0200
commite3a4d869cf0cc12a61f2b4faee44ab1d9751cca8 (patch)
tree22e5719b27e485e2ba9a47725d933941dd29fa58 /framework/src/domain/peoplemodel.cpp
parent2b8918e1cf28890b47c0cd2399eccf2087cbfbb4 (diff)
downloadkube-e3a4d869cf0cc12a61f2b4faee44ab1d9751cca8.tar.gz
kube-e3a4d869cf0cc12a61f2b4faee44ab1d9751cca8.zip
Show Avatar images
Diffstat (limited to 'framework/src/domain/peoplemodel.cpp')
-rw-r--r--framework/src/domain/peoplemodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/src/domain/peoplemodel.cpp b/framework/src/domain/peoplemodel.cpp
index c9e7248c..099c680a 100644
--- a/framework/src/domain/peoplemodel.cpp
+++ b/framework/src/domain/peoplemodel.cpp
@@ -38,6 +38,7 @@ PeopleModel::PeopleModel(QObject *parent)
38 query.request<Contact::Vcard>(); 38 query.request<Contact::Vcard>();
39 query.request<Contact::Firstname>(); 39 query.request<Contact::Firstname>();
40 query.request<Contact::Lastname>(); 40 query.request<Contact::Lastname>();
41 query.request<Contact::Photo>();
41 runQuery(query); 42 runQuery(query);
42} 43}
43 44
@@ -65,7 +66,8 @@ QHash< int, QByteArray > PeopleModel::roleNames() const
65 {Type, "type"}, 66 {Type, "type"},
66 {DomainObject, "domainObject"}, 67 {DomainObject, "domainObject"},
67 {FirstName, "firstName"}, 68 {FirstName, "firstName"},
68 {LastName, "lastName"} 69 {LastName, "lastName"},
70 {ImageData, "imageData"}
69 }; 71 };
70 return roles; 72 return roles;
71} 73}
@@ -96,6 +98,8 @@ QVariant PeopleModel::data(const QModelIndex &idx, int role) const
96 return contact->getFirstname(); 98 return contact->getFirstname();
97 case LastName: 99 case LastName:
98 return contact->getLastname(); 100 return contact->getLastname();
101 case ImageData:
102 return contact->getPhoto();
99 } 103 }
100 return QSortFilterProxyModel::data(idx, role); 104 return QSortFilterProxyModel::data(idx, role);
101} 105}