diff options
Diffstat (limited to 'framework/src/domain')
-rw-r--r-- | framework/src/domain/contactcontroller.cpp | 1 | ||||
-rw-r--r-- | framework/src/domain/contactcontroller.h | 1 | ||||
-rw-r--r-- | framework/src/domain/peoplemodel.cpp | 6 | ||||
-rw-r--r-- | framework/src/domain/peoplemodel.h | 3 |
4 files changed, 9 insertions, 2 deletions
diff --git a/framework/src/domain/contactcontroller.cpp b/framework/src/domain/contactcontroller.cpp index 90ef6323..bc536bf6 100644 --- a/framework/src/domain/contactcontroller.cpp +++ b/framework/src/domain/contactcontroller.cpp | |||
@@ -59,6 +59,7 @@ void ContactController::loadContact(const QVariant &contact) | |||
59 | } | 59 | } |
60 | setCompany(addressee.organization()); | 60 | setCompany(addressee.organization()); |
61 | setJobTitle(addressee.role()); | 61 | setJobTitle(addressee.role()); |
62 | setImageData(addressee.photo().rawData()); | ||
62 | } | 63 | } |
63 | } | 64 | } |
64 | 65 | ||
diff --git a/framework/src/domain/contactcontroller.h b/framework/src/domain/contactcontroller.h index fea42430..72d8eee1 100644 --- a/framework/src/domain/contactcontroller.h +++ b/framework/src/domain/contactcontroller.h | |||
@@ -41,6 +41,7 @@ class ContactController : public Kube::Controller | |||
41 | KUBE_CONTROLLER_PROPERTY(QString, Country, country) | 41 | KUBE_CONTROLLER_PROPERTY(QString, Country, country) |
42 | KUBE_CONTROLLER_PROPERTY(QString, Company, company) | 42 | KUBE_CONTROLLER_PROPERTY(QString, Company, company) |
43 | KUBE_CONTROLLER_PROPERTY(QString, JobTitle, jobTitle) | 43 | KUBE_CONTROLLER_PROPERTY(QString, JobTitle, jobTitle) |
44 | KUBE_CONTROLLER_PROPERTY(QByteArray, ImageData, imageData) | ||
44 | 45 | ||
45 | KUBE_CONTROLLER_ACTION(save) | 46 | KUBE_CONTROLLER_ACTION(save) |
46 | 47 | ||
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 | } |
diff --git a/framework/src/domain/peoplemodel.h b/framework/src/domain/peoplemodel.h index a59e752c..69d07417 100644 --- a/framework/src/domain/peoplemodel.h +++ b/framework/src/domain/peoplemodel.h | |||
@@ -51,7 +51,8 @@ public: | |||
51 | Addressbook, | 51 | Addressbook, |
52 | DomainObject, | 52 | DomainObject, |
53 | FirstName, | 53 | FirstName, |
54 | LastName | 54 | LastName, |
55 | ImageData | ||
55 | }; | 56 | }; |
56 | 57 | ||
57 | QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; | 58 | QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; |