mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 04:16:40 -05:00
Added new widget to display an avatar with or without the status frame - AvatarWidget.
Changed all existing avatars to AvatarWidget. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4589 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0ed60eaf86
commit
62b2de63b7
46 changed files with 730 additions and 595 deletions
|
|
@ -56,12 +56,9 @@ MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, std::string msgId, bool is
|
|||
connect( deleteButton, SIGNAL( clicked( void ) ), this, SLOT( deleteMsg ( void ) ) );
|
||||
connect( replyButton, SIGNAL( clicked( void ) ), this, SLOT( replyMsg ( void ) ) );
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
||||
small();
|
||||
updateItemStatic();
|
||||
updateItem();
|
||||
updateAvatar(QString::fromStdString(mPeerId));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -84,6 +81,8 @@ void MsgItem::updateItemStatic()
|
|||
/* get peer Id */
|
||||
mPeerId = mi.srcId;
|
||||
|
||||
avatar->setId(mPeerId, false);
|
||||
|
||||
QString title;
|
||||
QString timestamp;
|
||||
QString srcName = QString::fromUtf8(rsPeers->getPeerName(mi.srcId).c_str());
|
||||
|
|
@ -276,16 +275,3 @@ void MsgItem::playMedia()
|
|||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void MsgItem::updateAvatar(const QString &peer_id)
|
||||
{
|
||||
if (peer_id.toStdString() != mPeerId) {
|
||||
/* it 's not me */
|
||||
return;
|
||||
}
|
||||
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mPeerId, avatar, ":/images/user/personal64.png");
|
||||
avatarlabel->setPixmap(avatar);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue