Added avatar image to ConfCertDialog (defnax).

Added new class AvatarDefs to get the avatar for a ssl id or gpg id.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4585 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-09-02 10:22:44 +00:00
parent 0591ef0432
commit b35d32ef15
19 changed files with 282 additions and 248 deletions

View file

@ -21,6 +21,7 @@
#include "gui/profile/ProfileView.h"
#include "gui/profile/ProfileEdit.h"
#include "gui/common/AvatarDefs.h"
#include <retroshare/rspeers.h>
#include <retroshare/rsmsgs.h>
@ -286,26 +287,9 @@ void ProfileView::filesClear()
void ProfileView::loadAvatar()
{
unsigned char *data = NULL;
int size = 0 ;
rsMsgs->getAvatarData(pId,data,size);
if(size != 0)
{
// set the image
QPixmap pix ;
pix.loadFromData(data,size,"PNG") ;
ui.photoLabel->setPixmap(pix);
delete[] data ;
}
else
{
ui.photoLabel->setPixmap(QPixmap(":/images/user/personal64.png"));
}
QPixmap avatar;
AvatarDefs::getAvatarFromSslId(pId, avatar, ":/images/user/personal64.png");
ui.avatarlabel->setPixmap(avatar);
ui.photoLabel->setPixmap(avatar);
}