Changeset View
Changeset View
Standalone View
Standalone View
src/akonadi-contacts/contactviewer.cpp
Show All 21 Lines | |||||
22 | #include "contactviewer.h" | 22 | #include "contactviewer.h" | ||
23 | 23 | | |||
24 | #include "contactmetadataakonadi_p.h" | 24 | #include "contactmetadataakonadi_p.h" | ||
25 | #include "attributes/contactmetadataattribute_p.h" | 25 | #include "attributes/contactmetadataattribute_p.h" | ||
26 | #include "customfieldmanager_p.h" | 26 | #include "customfieldmanager_p.h" | ||
27 | #include "standardcontactformatter.h" | 27 | #include "standardcontactformatter.h" | ||
28 | #include "textbrowser_p.h" | 28 | #include "textbrowser_p.h" | ||
29 | 29 | | |||
30 | #include "editor/im/improtocols.h" | | |||
31 | #include <KIOCore/kio/transferjob.h> | 30 | #include <KIOCore/kio/transferjob.h> | ||
32 | #include <collection.h> | 31 | #include <collection.h> | ||
33 | #include <collectionfetchjob.h> | 32 | #include <collectionfetchjob.h> | ||
34 | #include <entitydisplayattribute.h> | 33 | #include <entitydisplayattribute.h> | ||
35 | #include <item.h> | 34 | #include <item.h> | ||
36 | #include <itemfetchscope.h> | 35 | #include <itemfetchscope.h> | ||
37 | #include <kcontacts/addressee.h> | 36 | #include <kcontacts/addressee.h> | ||
38 | #include <kcolorscheme.h> | 37 | #include <kcolorscheme.h> | ||
Show All 28 Lines | 65 | { | |||
67 | delete mStandardContactFormatter; | 66 | delete mStandardContactFormatter; | ||
68 | delete mQRCode; | 67 | delete mQRCode; | ||
69 | } | 68 | } | ||
70 | 69 | | |||
71 | void updateView(const QVariantList &localCustomFieldDescriptions = QVariantList(), const QString &addressBookName = QString()) | 70 | void updateView(const QVariantList &localCustomFieldDescriptions = QVariantList(), const QString &addressBookName = QString()) | ||
72 | { | 71 | { | ||
73 | static QPixmap defaultPixmap = QIcon::fromTheme(QStringLiteral("user-identity")).pixmap(QSize(100, 100)); | 72 | static QPixmap defaultPixmap = QIcon::fromTheme(QStringLiteral("user-identity")).pixmap(QSize(100, 100)); | ||
74 | static QPixmap defaultMapPixmap = QIcon::fromTheme(QStringLiteral("map-symbolic")).pixmap(QSize(16, 16)); | 73 | static QPixmap defaultMapPixmap = QIcon::fromTheme(QStringLiteral("map-symbolic")).pixmap(QSize(16, 16)); | ||
75 | static QPixmap defaultSmsPixmap = QIcon::fromTheme(IMProtocols::self()->icon(QStringLiteral("messaging/sms"))).pixmap(QSize(16, 16)); | 74 | static QPixmap defaultSmsPixmap = QIcon::fromTheme(KContacts::Impp::serviceIcon(QStringLiteral("sms"))).pixmap(QSize(16, 16)); | ||
76 | 75 | | |||
77 | mParent->setWindowTitle(i18n("Contact %1", mCurrentContact.assembledName())); | 76 | mParent->setWindowTitle(i18n("Contact %1", mCurrentContact.assembledName())); | ||
78 | 77 | | |||
79 | if (mCurrentContact.photo().isIntern()) { | 78 | if (mCurrentContact.photo().isIntern()) { | ||
80 | mBrowser->document()->addResource(QTextDocument::ImageResource, | 79 | mBrowser->document()->addResource(QTextDocument::ImageResource, | ||
81 | QUrl(QStringLiteral("contact_photo")), | 80 | QUrl(QStringLiteral("contact_photo")), | ||
82 | mCurrentContact.photo().data()); | 81 | mCurrentContact.photo().data()); | ||
83 | } else if (!mCurrentContact.photo().url().isEmpty()) { | 82 | } else if (!mCurrentContact.photo().url().isEmpty()) { | ||
▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines |