draw picture for new lrc model of conversation

The conversationPhoto() from PixmapManipulator is implemented in order
to provide the picture associated to a conversation. In case no
picture is present in database, we draw the fallback avatar.

With this implementation, picture for conference will be the one of
the first participant in the conversation. This limitation is left
for future improvement.

Change-Id: I6be58465d48bfe7a32e4c19b4aca50a077030324
Reviewed-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
diff --git a/src/delegates/ImageManipulationDelegate.h b/src/delegates/ImageManipulationDelegate.h
index 1bafeb5..59acf1e 100644
--- a/src/delegates/ImageManipulationDelegate.h
+++ b/src/delegates/ImageManipulationDelegate.h
@@ -36,10 +36,16 @@
     class ImageManipulationDelegate : public PixmapManipulatorI {
 
     public:
+        static constexpr int IMG_SIZE = 80;
+
         ImageManipulationDelegate();
         QVariant contactPhoto(Person* c, const QSize& size, bool displayPresence = true) override;
         virtual QByteArray toByteArray(const QVariant& pxm) override;
         virtual QVariant personPhoto(const QByteArray& data, const QString& type = "PNG") override;
+        QVariant conversationPhoto(const lrc::api::conversation::Info& conversation,
+                                   const lrc::api::account::Info& accountInfo,
+                                   const QSize& size = QSize(IMG_SIZE, IMG_SIZE),
+                                   bool displayPresence = true) override;
 
         QVariant callPhoto(Call* c, const QSize& size, bool displayPresence = true) override;
         QVariant callPhoto(const ContactMethod* n, const QSize& size, bool displayPresence = true) override;
@@ -65,6 +71,7 @@
 
         QHash<QString, QPixmap> m_hDefaultUserPixmap;
         QHash<QString, QPair<QMetaObject::Connection, QPixmap>> m_hContactsPixmap;
+        QHash<QString, QPixmap> convPixmCache;
         static const QColor avatarColors_[];
 
         /**