2008-06-20 08:43:23 -04:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Robert Fernie
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
2010-07-23 14:52:58 -04:00
|
|
|
|
|
|
|
#include <QDateTime>
|
2011-01-27 03:34:23 -05:00
|
|
|
#include <QMessageBox>
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
#include "ForumMsgItem.h"
|
|
|
|
#include "FeedHolder.h"
|
|
|
|
|
2010-08-06 05:40:23 -04:00
|
|
|
#include <retroshare/rsforums.h>
|
2011-01-26 04:34:48 -05:00
|
|
|
#include <retroshare/rsmsgs.h>
|
|
|
|
#include <retroshare/rspeers.h>
|
|
|
|
|
|
|
|
#include "gui/notifyqt.h"
|
|
|
|
|
2010-02-08 15:43:23 -05:00
|
|
|
#include "gui/forums/CreateForumMsg.h"
|
2011-01-13 17:19:20 -05:00
|
|
|
#include "gui/chat/HandleRichText.h"
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2011-01-26 04:34:48 -05:00
|
|
|
#include <algorithm>
|
|
|
|
|
2008-07-09 05:53:47 -04:00
|
|
|
/****
|
|
|
|
* #define DEBUG_ITEM 1
|
|
|
|
****/
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
/** Constructor */
|
2011-01-26 16:36:13 -05:00
|
|
|
ForumMsgItem::ForumMsgItem(FeedHolder *parent, uint32_t feedId, const std::string &forumId, const std::string &postId, bool isHome)
|
|
|
|
:QWidget(NULL), mParent(parent), mFeedId(feedId), mForumId(forumId), mPostId(postId), mIsHome(isHome), mIsTop(false)
|
2008-06-20 08:43:23 -04:00
|
|
|
{
|
|
|
|
/* Invoke the Qt Designer generated object setup routine */
|
|
|
|
setupUi(this);
|
|
|
|
|
2010-05-04 20:05:36 -04:00
|
|
|
setAttribute ( Qt::WA_DeleteOnClose, true );
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
/* general ones */
|
|
|
|
connect( expandButton, SIGNAL( clicked( void ) ), this, SLOT( toggle ( void ) ) );
|
|
|
|
connect( clearButton, SIGNAL( clicked( void ) ), this, SLOT( removeItem ( void ) ) );
|
2008-07-04 10:41:24 -04:00
|
|
|
//connect( gotoButton, SIGNAL( clicked( void ) ), this, SLOT( gotoHome ( void ) ) );
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
/* specific ones */
|
|
|
|
connect( unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeForum ( void ) ) );
|
|
|
|
connect( replyButton, SIGNAL( clicked( void ) ), this, SLOT( replyToPost ( void ) ) );
|
2011-01-27 03:34:23 -05:00
|
|
|
connect( sendButton, SIGNAL( clicked( ) ), this, SLOT( sendMsg() ) );
|
2011-01-26 04:34:48 -05:00
|
|
|
|
|
|
|
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
small();
|
|
|
|
updateItemStatic();
|
|
|
|
updateItem();
|
2011-01-27 03:34:23 -05:00
|
|
|
textEdit->hide();
|
|
|
|
sendButton->hide();
|
|
|
|
signedcheckBox->hide();
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ForumMsgItem::updateItemStatic()
|
|
|
|
{
|
|
|
|
if (!rsForums)
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* fill in */
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "ForumMsgItem::updateItemStatic()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
ForumInfo fi;
|
|
|
|
if (rsForums->getForumInfo(mForumId, fi))
|
|
|
|
{
|
|
|
|
QString title = "Forum Post: ";
|
|
|
|
title += QString::fromStdWString(fi.forumName);
|
|
|
|
|
|
|
|
titleLabel->setText(title);
|
|
|
|
if (!(fi.forumFlags & RS_DISTRIB_SUBSCRIBED))
|
|
|
|
{
|
|
|
|
unsubscribeButton->setEnabled(false);
|
2010-02-08 15:43:23 -05:00
|
|
|
replyButton->setEnabled(true);
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
unsubscribeButton->setEnabled(true);
|
|
|
|
replyButton->setEnabled(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-13 17:19:20 -05:00
|
|
|
titleLabel->setText(tr("Unknown Forum Post"));
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* get actual Message */
|
|
|
|
ForumMsgInfo msg;
|
|
|
|
if (rsForums->getForumMessage(mForumId, mPostId, msg))
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "Ids: MsgId: " << msg.msgId;
|
|
|
|
std::cerr << std::endl;
|
|
|
|
std::cerr << "Ids: ParentId: " << msg.parentId;
|
|
|
|
std::cerr << std::endl;
|
|
|
|
std::cerr << "Ids: ThreadId: " << msg.threadId;
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* decide if top or not */
|
|
|
|
if ((msg.msgId == msg.threadId) || (msg.threadId == ""))
|
|
|
|
{
|
|
|
|
mIsTop = true;
|
|
|
|
}
|
2011-01-26 04:34:48 -05:00
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
if (mIsTop)
|
2011-01-26 04:34:48 -05:00
|
|
|
{
|
2011-01-26 16:36:13 -05:00
|
|
|
mGpgIdPrev = msg.srcId;
|
|
|
|
|
|
|
|
if (rsPeers->getPeerName(msg.srcId) !="")
|
|
|
|
{
|
|
|
|
namelabel->setText(QString::fromStdString(rsPeers->getPeerName(msg.srcId)));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
namelabel->setText(tr("Anonymous"));
|
|
|
|
}
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
prevSubLabel->setText(QString::fromStdWString(msg.title));
|
2011-01-13 17:19:20 -05:00
|
|
|
prevMsgLabel->setText(RsHtml::formatText(QString::fromStdWString(msg.msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
2010-03-10 17:41:10 -05:00
|
|
|
|
2010-08-27 09:52:17 -04:00
|
|
|
QDateTime qtime;
|
|
|
|
qtime.setTime_t(msg.ts);
|
2010-11-03 14:24:58 -04:00
|
|
|
QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss");
|
2011-01-26 04:34:48 -05:00
|
|
|
timestamplabel->setText(timestamp);
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
nextFrame->hide();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-26 16:36:13 -05:00
|
|
|
mGpgIdNext = msg.srcId;
|
|
|
|
|
|
|
|
if (rsPeers->getPeerName(msg.srcId) !="")
|
|
|
|
{
|
|
|
|
nextnamelabel->setText(QString::fromStdString(rsPeers->getPeerName(msg.srcId)));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nextnamelabel->setText(tr("Anonymous"));
|
|
|
|
}
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
nextSubLabel->setText(QString::fromStdWString(msg.title));
|
2011-01-13 17:19:20 -05:00
|
|
|
nextMsgLabel->setText(RsHtml::formatText(QString::fromStdWString(msg.msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
2008-06-20 08:43:23 -04:00
|
|
|
|
2010-03-10 17:41:10 -05:00
|
|
|
QDateTime qtime;
|
2010-08-27 09:52:17 -04:00
|
|
|
qtime.setTime_t(msg.ts);
|
2010-11-03 14:24:58 -04:00
|
|
|
QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss");
|
2010-08-27 09:52:17 -04:00
|
|
|
timestamplabel->setText(timestamp);
|
2010-03-10 17:41:10 -05:00
|
|
|
|
2010-10-23 10:08:20 -04:00
|
|
|
prevSHLabel->setText(tr("In Reply to") + ": ");
|
2008-06-20 08:43:23 -04:00
|
|
|
|
|
|
|
ForumMsgInfo msgParent;
|
|
|
|
if (rsForums->getForumMessage(mForumId, msg.parentId, msgParent))
|
|
|
|
{
|
2011-01-26 16:36:13 -05:00
|
|
|
mGpgIdPrev = msgParent.srcId;
|
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
prevSubLabel->setText(QString::fromStdWString(msgParent.title));
|
2011-01-13 17:19:20 -05:00
|
|
|
prevMsgLabel->setText(RsHtml::formatText(QString::fromStdWString(msgParent.msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
2011-01-26 04:34:48 -05:00
|
|
|
|
|
|
|
if (rsPeers->getPeerName(msgParent.srcId) !="")
|
|
|
|
{
|
2011-01-26 16:36:13 -05:00
|
|
|
namelabel->setText(QString::fromStdString(rsPeers->getPeerName(msgParent.srcId)));
|
2011-01-26 04:34:48 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-26 16:36:13 -05:00
|
|
|
namelabel->setText(tr("Anonymous"));
|
2011-01-26 04:34:48 -05:00
|
|
|
}
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
prevSubLabel->setText("???");
|
|
|
|
prevMsgLabel->setText("???");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* header stuff */
|
|
|
|
subjectLabel->setText(QString::fromStdWString(msg.title));
|
|
|
|
srcLabel->setText(QString::fromStdString(msg.srcId));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (mIsHome)
|
|
|
|
{
|
|
|
|
/* disable buttons */
|
|
|
|
clearButton->setEnabled(false);
|
2008-07-04 10:41:24 -04:00
|
|
|
//gotoButton->setEnabled(false);
|
|
|
|
|
|
|
|
clearButton->hide();
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
2008-07-04 10:41:24 -04:00
|
|
|
|
|
|
|
unsubscribeButton->hide();
|
2011-01-26 16:36:13 -05:00
|
|
|
|
|
|
|
showAvatar("", true);
|
|
|
|
showAvatar("", false);
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ForumMsgItem::updateItem()
|
|
|
|
{
|
|
|
|
/* fill in */
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "ForumMsgItem::updateItem()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ForumMsgItem::small()
|
|
|
|
{
|
|
|
|
nextFrame->hide();
|
|
|
|
prevFrame->hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ForumMsgItem::toggle()
|
|
|
|
{
|
|
|
|
if (prevFrame->isHidden())
|
|
|
|
{
|
|
|
|
prevFrame->show();
|
2011-01-27 03:34:23 -05:00
|
|
|
textEdit->show();
|
|
|
|
sendButton->show();
|
|
|
|
signedcheckBox->show();
|
2008-08-17 10:13:09 -04:00
|
|
|
expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png")));
|
|
|
|
expandButton->setToolTip("Hide");
|
2008-06-20 08:43:23 -04:00
|
|
|
if (!mIsTop)
|
|
|
|
{
|
|
|
|
nextFrame->show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
prevFrame->hide();
|
|
|
|
nextFrame->hide();
|
2011-01-27 03:34:23 -05:00
|
|
|
textEdit->hide();
|
|
|
|
sendButton->hide();
|
|
|
|
signedcheckBox->hide();
|
2008-08-17 10:13:09 -04:00
|
|
|
expandButton->setIcon(QIcon(QString(":/images/edit_add24.png")));
|
|
|
|
expandButton->setToolTip("Expand");
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ForumMsgItem::removeItem()
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "ForumMsgItem::removeItem()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
hide();
|
|
|
|
if (mParent)
|
|
|
|
{
|
|
|
|
mParent->deleteFeedItem(this, mFeedId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ForumMsgItem::gotoHome()
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "ForumMsgItem::gotoHome()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********** SPECIFIC FUNCTIOSN ***********************/
|
|
|
|
|
|
|
|
|
|
|
|
void ForumMsgItem::unsubscribeForum()
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "ForumMsgItem::unsubscribeForum()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
if (rsForums)
|
|
|
|
{
|
|
|
|
rsForums->forumSubscribe(mForumId, false);
|
|
|
|
}
|
|
|
|
updateItemStatic();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ForumMsgItem::subscribeForum()
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "ForumMsgItem::subscribeForum()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
if (rsForums)
|
|
|
|
{
|
|
|
|
rsForums->forumSubscribe(mForumId, true);
|
|
|
|
}
|
|
|
|
updateItemStatic();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ForumMsgItem::replyToPost()
|
|
|
|
{
|
|
|
|
#ifdef DEBUG_ITEM
|
|
|
|
std::cerr << "ForumMsgItem::replyToPost()";
|
|
|
|
std::cerr << std::endl;
|
|
|
|
#endif
|
|
|
|
if (mParent)
|
|
|
|
{
|
2010-05-23 19:02:15 -04:00
|
|
|
CreateForumMsg *cfm = new CreateForumMsg(mForumId, mPostId);
|
|
|
|
cfm->show();
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
2010-02-08 15:43:23 -05:00
|
|
|
|
2008-06-20 08:43:23 -04:00
|
|
|
}
|
|
|
|
|
2011-01-27 03:34:23 -05:00
|
|
|
void ForumMsgItem::sendMsg()
|
|
|
|
{
|
|
|
|
QString name = prevSubLabel->text();
|
|
|
|
QString desc = textEdit->toHtml();
|
|
|
|
|
|
|
|
if(textEdit->toPlainText().isEmpty())
|
|
|
|
{ /* error message */
|
|
|
|
QMessageBox::warning(this, tr("RetroShare"),tr("Please give a Text Message"),
|
|
|
|
QMessageBox::Ok, QMessageBox::Ok);
|
|
|
|
|
|
|
|
return; //Don't add a empty Message!!
|
|
|
|
}
|
|
|
|
|
|
|
|
ForumMsgInfo msgInfo;
|
|
|
|
|
|
|
|
msgInfo.forumId = mForumId;
|
|
|
|
msgInfo.threadId = "";
|
|
|
|
msgInfo.parentId = mPostId;
|
|
|
|
msgInfo.msgId = "";
|
|
|
|
|
|
|
|
msgInfo.title = name.toStdWString();
|
|
|
|
msgInfo.msg = desc.toStdWString();
|
|
|
|
msgInfo.msgflags = 0;
|
|
|
|
|
|
|
|
if (signedcheckBox->isChecked())
|
|
|
|
{
|
|
|
|
msgInfo.msgflags = RS_DISTRIB_AUTHEN_REQ;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((msgInfo.msg == L"") && (msgInfo.title == L""))
|
|
|
|
return; /* do nothing */
|
|
|
|
|
|
|
|
if (rsForums->ForumMessageSend(msgInfo) == true) {
|
|
|
|
textEdit->clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-26 04:34:48 -05:00
|
|
|
void ForumMsgItem::updateAvatar(const QString &peer_id)
|
|
|
|
{
|
2011-01-26 16:36:13 -05:00
|
|
|
if (mGpgIdPrev.empty() == false) {
|
|
|
|
/* Is this one of the ssl ids of the gpg id ? */
|
|
|
|
std::list<std::string> sslIds;
|
|
|
|
if (rsPeers->getSSLChildListOfGPGId(mGpgIdPrev, sslIds) == false) {
|
|
|
|
return;
|
|
|
|
}
|
2011-01-26 04:34:48 -05:00
|
|
|
|
2011-01-26 16:36:13 -05:00
|
|
|
if (std::find(sslIds.begin(), sslIds.end(), peer_id.toStdString()) != sslIds.end()) {
|
|
|
|
/* One of the ssl ids of the gpg id */
|
|
|
|
showAvatar(peer_id.toStdString(), false);
|
|
|
|
}
|
2011-01-26 04:34:48 -05:00
|
|
|
}
|
|
|
|
|
2011-01-26 16:36:13 -05:00
|
|
|
if (mGpgIdNext.empty() == false) {
|
|
|
|
/* Is this one of the ssl ids of the gpg id ? */
|
|
|
|
std::list<std::string> sslIds;
|
|
|
|
if (rsPeers->getSSLChildListOfGPGId(mGpgIdNext, sslIds) == false) {
|
|
|
|
return;
|
|
|
|
}
|
2011-01-26 04:34:48 -05:00
|
|
|
|
2011-01-26 16:36:13 -05:00
|
|
|
if (std::find(sslIds.begin(), sslIds.end(), peer_id.toStdString()) != sslIds.end()) {
|
|
|
|
/* One of the ssl ids of the gpg id */
|
|
|
|
showAvatar(peer_id.toStdString(), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-01-26 04:34:48 -05:00
|
|
|
|
2011-01-26 16:36:13 -05:00
|
|
|
void ForumMsgItem::showAvatar(const std::string &peer_id, bool next)
|
2011-01-26 04:34:48 -05:00
|
|
|
{
|
2011-01-26 16:36:13 -05:00
|
|
|
std::string gpgId = next ? mGpgIdNext : mGpgIdPrev;
|
|
|
|
QLabel *avatar = next ? nextavatarlabel : avatarlabel;
|
|
|
|
|
|
|
|
if (gpgId.empty()) {
|
|
|
|
avatar->setPixmap(QPixmap(":/images/user/personal64.png"));
|
2011-01-26 04:34:48 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned char *data = NULL;
|
|
|
|
int size = 0 ;
|
|
|
|
|
2011-01-26 16:36:13 -05:00
|
|
|
if (gpgId == rsPeers->getGPGOwnId()) {
|
2011-01-26 04:34:48 -05:00
|
|
|
/* Its me */
|
|
|
|
rsMsgs->getOwnAvatarData(data,size);
|
|
|
|
} else {
|
|
|
|
if (peer_id.empty()) {
|
|
|
|
/* Show the first available avatar of one of the ssl ids */
|
|
|
|
std::list<std::string> sslIds;
|
2011-01-26 16:36:13 -05:00
|
|
|
if (rsPeers->getSSLChildListOfGPGId(gpgId, sslIds) == false) {
|
2011-01-26 04:34:48 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::list<std::string>::iterator sslId;
|
|
|
|
for (sslId = sslIds.begin(); sslId != sslIds.end(); sslId++) {
|
|
|
|
rsMsgs->getAvatarData(*sslId,data,size);
|
|
|
|
if (size) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
rsMsgs->getAvatarData(peer_id,data,size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(size != 0) {
|
|
|
|
// set the image
|
|
|
|
QPixmap pix ;
|
|
|
|
pix.loadFromData(data,size,"PNG") ;
|
2011-01-26 16:36:13 -05:00
|
|
|
avatar->setPixmap(pix);
|
2011-01-26 04:34:48 -05:00
|
|
|
delete[] data ;
|
|
|
|
} else {
|
2011-01-26 16:36:13 -05:00
|
|
|
avatar->setPixmap(QPixmap(":/images/user/personal64.png"));
|
2011-01-26 04:34:48 -05:00
|
|
|
}
|
|
|
|
}
|