mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-09 14:52:28 -04:00
added context menu to networkview
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3770 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f7d5836a86
commit
ca45c73dc2
5 changed files with 65 additions and 15 deletions
|
@ -52,10 +52,12 @@ QT_BEGIN_NAMESPACE
|
|||
class QGraphicsSceneMouseEvent;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class Node : public QGraphicsItem
|
||||
class Node : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Node(const std::string& node_string,GraphWidget::NodeType type,GraphWidget::AuthType auth,GraphWidget *graphWidget);
|
||||
Node(const std::string& node_string,GraphWidget::NodeType type,GraphWidget::AuthType auth,GraphWidget *graphWidget,const std::string& ssl_id,const std::string& gpg_id);
|
||||
|
||||
void addEdge(Edge *edge);
|
||||
const QList<Edge *>& edges() const;
|
||||
|
@ -75,7 +77,13 @@ protected:
|
|||
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
|
||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *) ;
|
||||
|
||||
protected slots:
|
||||
void denyFriend() ;
|
||||
void makeFriend() ;
|
||||
void peerDetails() ;
|
||||
private:
|
||||
QList<Edge *> edgeList;
|
||||
QPointF newPos;
|
||||
|
@ -88,6 +96,9 @@ private:
|
|||
bool mDeterminedBB ;
|
||||
int mBBWidth ;
|
||||
|
||||
std::string _ssl_id ;
|
||||
std::string _gpg_id ;
|
||||
|
||||
static const float MASS_FACTOR = 10 ;
|
||||
static const float FRICTION_FACTOR = 6.8 ;
|
||||
static const float REPULSION_FACTOR = 4 ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue