mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
update display of the profilewidget tab in peersdialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2087 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0b736d9f28
commit
2f13d31725
3 changed files with 20 additions and 18 deletions
|
@ -297,6 +297,15 @@ void PeersDialog::keyPressEvent(QKeyEvent *e)
|
||||||
|
|
||||||
void PeersDialog::updateDisplay()
|
void PeersDialog::updateDisplay()
|
||||||
{
|
{
|
||||||
|
// add self nick and Avatar to Friends.
|
||||||
|
RsPeerDetails pd ;
|
||||||
|
if (rsPeers->getPeerDetails(rsPeers->getOwnId(),pd)) {
|
||||||
|
QString titleStr("<span style=\"font-size:16pt; font-weight:500;"
|
||||||
|
"color:#32cd32;\">%1</span>");
|
||||||
|
ui.nicklabel->setText(titleStr.arg(QString::fromStdString(pd.name) + tr(" (me)") + QString::fromStdString(pd.location))) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
insertPeers() ;
|
insertPeers() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,6 +317,7 @@ void PeersDialog::insertPeers()
|
||||||
|
|
||||||
if (!rsPeers) {
|
if (!rsPeers) {
|
||||||
/* not ready yet! */
|
/* not ready yet! */
|
||||||
|
std::cerr << "PeersDialog::insertPeers() not ready yet : rsPeers unintialized." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,14 +333,6 @@ void PeersDialog::insertPeers()
|
||||||
/* get a link to the table */
|
/* get a link to the table */
|
||||||
QTreeWidget *peertreeWidget = ui.peertreeWidget;
|
QTreeWidget *peertreeWidget = ui.peertreeWidget;
|
||||||
|
|
||||||
// add self nick and Avatar to Friends.
|
|
||||||
RsPeerDetails pd ;
|
|
||||||
if (rsPeers->getPeerDetails(rsPeers->getOwnId(),pd)) {
|
|
||||||
QString titleStr("<span style=\"font-size:16pt; font-weight:500;"
|
|
||||||
"color:#32cd32;\">%1</span>");
|
|
||||||
ui.nicklabel->setText(titleStr.arg(QString::fromStdString(pd.name) + tr(" (me)"))) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//remove items that are not fiends anymore
|
//remove items that are not fiends anymore
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while (index < peertreeWidget->topLevelItemCount()) {
|
while (index < peertreeWidget->topLevelItemCount()) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ ProfileWidget::ProfileWidget(QWidget *parent, Qt::WFlags flags)
|
||||||
|
|
||||||
connect(ui.editstatuspushButton,SIGNAL(clicked()), this, SLOT(statusmessagedlg()));
|
connect(ui.editstatuspushButton,SIGNAL(clicked()), this, SLOT(statusmessagedlg()));
|
||||||
|
|
||||||
loadDialog();
|
//loadDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Destructor. */
|
/** Destructor. */
|
||||||
|
@ -58,7 +58,7 @@ void ProfileWidget::closeEvent (QCloseEvent * event)
|
||||||
QWidget::closeEvent(event);
|
QWidget::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileWidget::loadDialog()
|
void ProfileWidget::showEvent ( QShowEvent * event )
|
||||||
{
|
{
|
||||||
|
|
||||||
RsPeerDetails detail;
|
RsPeerDetails detail;
|
||||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void loadDialog();
|
void showEvent ( QShowEvent * event );
|
||||||
void statusmessagedlg();
|
void statusmessagedlg();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue