Added More alternative colours to NetworkView.

* Yellow - yourself.
 * Green  - your friends.
 * Blue    - other Authed People.
 * Magenta - partially Authed People.
 * Red     - unknown people.

Added Context Menu. This is empty now (as we are heading for a release).
The code to add specific menu items to rm/add friends is there - just commented out.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1225 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2009-05-12 23:44:51 +00:00
parent b212f65f69
commit e71d289e0e
3 changed files with 98 additions and 5 deletions

View file

@ -30,6 +30,8 @@
#include <iostream>
#include <algorithm>
#include "gui/elastic/node.h"
/** Constructor */
NetworkView::NetworkView(QWidget *parent)
: MainPage(parent)
@ -154,11 +156,25 @@ void NetworkView::insertPeers()
if (rsPeers->isFriend(*it))
{
type = 2;
type = ELASTIC_NODE_TYPE_FRIEND;
}
else
{
type = 3;
RsPeerDetails detail;
rsPeers->getPeerDetails(*it, detail);
if(detail.trustLvl > RS_TRUST_LVL_MARGINAL)
{
type = ELASTIC_NODE_TYPE_AUTHED;
}
else if (detail.trustLvl >= RS_TRUST_LVL_MARGINAL)
{
type = ELASTIC_NODE_TYPE_MARGINALAUTH;
}
else
{
type = ELASTIC_NODE_TYPE_FOF;
}
}
ui.graphicsView->addNode(type, *it, name);