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:
thunder2 2011-09-05 21:19:07 +00:00
parent 0ed60eaf86
commit 62b2de63b7
46 changed files with 730 additions and 595 deletions

View file

@ -64,7 +64,6 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint
connect( sendmsgButton, SIGNAL( clicked( ) ), this, SLOT( sendMessage() ) );
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem()));
QMenu *msgmenu = new QMenu();
@ -72,10 +71,11 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint
quickmsgButton->setMenu(msgmenu);
avatar->setId(mPeerId, false);
small();
updateItemStatic();
updateItem();
updateAvatar(QString::fromStdString(mPeerId));
}
@ -309,18 +309,6 @@ void PeerItem::openChat()
}
}
void PeerItem::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");
avatar_label->setPixmap(avatar);
}
void PeerItem::togglequickmessage()
{
if (messageframe->isHidden())