mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
* added basic set avatar picture for MessengerWindow and Privat Chat
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@907 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
50b18911c5
commit
d2e64551c2
5 changed files with 408 additions and 369 deletions
|
@ -81,7 +81,7 @@ MessengerWindow::MessengerWindow(QWidget * parent)
|
|||
|
||||
connect( ui.messengertreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( messengertreeWidgetCostumPopupMenu( QPoint ) ) );
|
||||
|
||||
connect( ui.avatarButton, SIGNAL(clicked()), SLOT(changeAvatarClicked()));
|
||||
connect( ui.avatarButton, SIGNAL(clicked()), SLOT(getPicture()));
|
||||
connect( ui.addIMAccountButton, SIGNAL(clicked( bool ) ), this , SLOT( addFriend2() ) );
|
||||
|
||||
connect( ui.messengertreeWidget, SIGNAL(itemDoubleClicked ( QTreeWidgetItem *, int)), this, SLOT(chatfriend2()));
|
||||
|
@ -532,3 +532,14 @@ LogoBar & MessengerWindow::getLogoBar() const {
|
|||
return *_rsLogoBarmessenger;
|
||||
}
|
||||
|
||||
void MessengerWindow::getPicture()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this, "Load File",
|
||||
QDir::homePath(),
|
||||
"Pictures (*.png *.xpm *.jpg)");
|
||||
if(!fileName.isEmpty())
|
||||
{
|
||||
picture = QPixmap(fileName).scaled(72,72, Qt::KeepAspectRatio);
|
||||
ui.avatarButton->setIcon(picture);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue