mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04: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
|
@ -79,10 +79,6 @@ ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::WFlag
|
|||
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
|
||||
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updatePeersAvatar(const QString&)));
|
||||
|
||||
isOnlyGpg = false;
|
||||
|
||||
#ifndef MINIMAL_RSGUI
|
||||
MainWindow *w = MainWindow::getInstance();
|
||||
if (w) {
|
||||
|
@ -143,8 +139,6 @@ void ConfCertDialog::load()
|
|||
return;
|
||||
}
|
||||
|
||||
isOnlyGpg = detail.isOnlyGPGdetail;
|
||||
|
||||
ui.name->setText(QString::fromUtf8(detail.name.c_str()));
|
||||
ui.peerid->setText(QString::fromStdString(detail.id));
|
||||
|
||||
|
@ -155,6 +149,7 @@ void ConfCertDialog::load()
|
|||
ui.rsid->setToolTip(link.title());
|
||||
|
||||
if (!detail.isOnlyGPGdetail) {
|
||||
ui.avatar->setId(mId, false);
|
||||
|
||||
ui.loc->setText(QString::fromUtf8(detail.location.c_str()));
|
||||
// Dont Show a timestamp in RS calculate the day
|
||||
|
@ -199,6 +194,8 @@ void ConfCertDialog::load()
|
|||
ui.rsid->hide();
|
||||
ui.label_rsid->hide();
|
||||
} else {
|
||||
ui.avatar->setId(mId, true);
|
||||
|
||||
ui.rsid->show();
|
||||
ui.label_rsid->show();
|
||||
ui.loc->hide();
|
||||
|
@ -335,8 +332,6 @@ void ConfCertDialog::load()
|
|||
font.setStyle(QFont::StyleNormal);
|
||||
ui.userCertificateText->setFont(font);
|
||||
ui.userCertificateText->setText(QString::fromUtf8(invite.c_str()));
|
||||
|
||||
updatePeersAvatar(QString::fromStdString(mId));
|
||||
}
|
||||
|
||||
|
||||
|
@ -450,20 +445,3 @@ void ConfCertDialog::showHelpDialog(const QString &topic)
|
|||
helpBrowser = new HelpBrowser(this);
|
||||
helpBrowser->showWindow(topic);
|
||||
}
|
||||
|
||||
void ConfCertDialog::updatePeersAvatar(const QString& peer_id)
|
||||
{
|
||||
if (isOnlyGpg) {
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromGpgId(mId, avatar);
|
||||
ui.AvatarLabel->setPixmap(avatar);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (mId == peer_id.toStdString()) {
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getAvatarFromSslId(mId, avatar);
|
||||
ui.AvatarLabel->setPixmap(avatar);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue