mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
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:
parent
0591ef0432
commit
b35d32ef15
19 changed files with 282 additions and 248 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue