mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Display the avatar for the Wire author
Display the avatar for the Wire author
This commit is contained in:
parent
519fb01536
commit
70975b30d9
@ -24,6 +24,7 @@
|
||||
#include <QBuffer>
|
||||
|
||||
#include "WireGroupItem.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
@ -49,6 +50,16 @@ void WireGroupItem::setup()
|
||||
label_groupName->setText(QString::fromStdString(mGroup.mMeta.mGroupName));
|
||||
label_authorId->setId(mGroup.mMeta.mAuthorId);
|
||||
frame_details->setVisible(false);
|
||||
|
||||
RsIdentityDetails idDetails ;
|
||||
rsIdentity->getIdDetails(mGroup.mMeta.mAuthorId,idDetails);
|
||||
|
||||
QPixmap pixmap ;
|
||||
|
||||
if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL))
|
||||
pixmap = GxsIdDetails::makeDefaultIcon(mGroup.mMeta.mAuthorId,GxsIdDetails::SMALL);
|
||||
|
||||
label_avatar->setPixmap(pixmap);
|
||||
|
||||
connect(toolButton_show, SIGNAL(clicked()), this, SLOT(show()));
|
||||
connect(toolButton_subscribe, SIGNAL(clicked()), this, SLOT(subscribe()));
|
||||
|
@ -25,6 +25,22 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_avatar">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Avatar</string>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_groupName">
|
||||
<property name="text">
|
||||
|
Loading…
Reference in New Issue
Block a user