--- a/phonebookui/pbkcommonui/src/cntgroupdeletepopupmodel.cpp Fri Jun 11 13:29:23 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupdeletepopupmodel.cpp Wed Jun 23 18:02:44 2010 +0300
@@ -19,6 +19,7 @@
#include <qtcontacts.h>
#include <hbglobal.h>
+#include <hbiconitem.h>
/*!
Constructor
@@ -88,6 +89,23 @@
// contact Id for identification
dataList.append(groupContactIds.at(i));
+ // Default if no image for group
+ bool icon = false;
+ QList<QContactAvatar> details = contact.details<QContactAvatar>();
+ for (int k = 0;k < details.count();k++)
+ {
+ if (details.at(k).imageUrl().isValid())
+ {
+ dataList.append(QStringList(details.at(k).imageUrl().toString()));
+ icon = true;
+ break;
+ }
+ }
+ if(!icon)
+ {
+ dataList.append(QStringList("qtg_large_custom"));
+ }
+
mDataPointer->mDataList.append(dataList);
}
}
@@ -154,6 +172,17 @@
return QVariant(list);
}
+ else if (role == Qt::DecorationRole)
+ {
+ QVariantList icons;
+ for (int i = 0;i < values[2].toStringList().count();i++)
+ {
+ HbIcon icon(values[2].toStringList().at(i));
+ icons.append(icon);
+ }
+ return QVariant(icons);
+ }
+
else if (role == Qt::UserRole)
{
int contactId = values[1].toInt();