Enabled Antialiasing for QGraphicsView

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7578 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2014-10-02 16:23:29 +00:00
parent 77a367bc8a
commit 9f12ebaddf
3 changed files with 8 additions and 4 deletions

View File

@ -25,6 +25,8 @@ CircleWidget::CircleWidget(QString name/*=QString()*/
ui->graphicsView->setEnabled(false);
ui->graphicsView->setAlignment(Qt::AlignLeft | Qt::AlignTop);
ui->graphicsView->setRenderHints( QPainter::Antialiasing | QPainter::SmoothPixmapTransform );
setIsCurrent(false);
setIsSelected(false);

View File

@ -13,7 +13,8 @@
#include <gui/gxs/GxsIdDetails.h>
#include "IdentityItem.h"
#define IMAGE_MAKEFRIEND ""
#define IMAGE_MAKEFRIEND ":/images/user/add_user16.png"
#define IMAGE_CHAT ":/images/chat_24.png"
IdentityItem *IdentityItem::_selected_node = NULL ;
@ -69,6 +70,8 @@ void IdentityItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
painter->setPen(Qt::NoPen);
painter->setBrush(Qt::lightGray);
//painter->drawEllipse(-7, -7, 20, 20);
painter->setRenderHint(QPainter::Antialiasing);
QRadialGradient gradient(-10, -IMG_SIZE/3.0, IMG_SIZE*1.5);
gradient.setColorAt(0.0f,Qt::lightGray) ;
@ -118,7 +121,7 @@ void IdentityItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
QMenu contextMnu ;
contextMnu.addAction(QIcon(IMAGE_MAKEFRIEND), QObject::tr( "Peer details" ), this, SLOT(peerDetails()) );
contextMnu.addAction(QIcon(IMAGE_MAKEFRIEND), QObject::tr( "Chat this peer" ), this, SLOT(distantChat()) );
contextMnu.addAction(QIcon(IMAGE_CHAT), QObject::tr( "Chat this peer" ), this, SLOT(distantChat()) );
contextMnu.exec(event->screenPos());
}
@ -139,4 +142,3 @@ void IdentityItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QGraphicsItem::mouseReleaseEvent(event);
}

View File

@ -28,7 +28,7 @@
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Suggestions&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>People you may know on RetroShare</string>
</property>
</widget>
</item>