mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-18 19:08:35 -04:00
first networkview implementation. Totally unfinished
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3738 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a1f9d2a607
commit
0fcc298801
7 changed files with 263 additions and 238 deletions
|
@ -58,17 +58,26 @@ public:
|
|||
typedef int EdgeId ;
|
||||
|
||||
typedef enum {
|
||||
ELASTIC_NODE_FLAG_OWN = 0x0001,
|
||||
ELASTIC_NODE_FLAG_FRIEND = 0x0002,
|
||||
ELASTIC_NODE_FLAG_AUTHED = 0x0004,
|
||||
ELASTIC_NODE_FLAG_MARGINALAUTH = 0x0008
|
||||
} NodeFlags ;
|
||||
ELASTIC_NODE_TYPE_OWN = 0x0000,
|
||||
ELASTIC_NODE_TYPE_FRIEND = 0x0001,
|
||||
ELASTIC_NODE_TYPE_F_OF_F = 0x0002,
|
||||
ELASTIC_NODE_TYPE_UNKNOWN = 0x0003
|
||||
} NodeType ;
|
||||
|
||||
virtual void itemMoved();
|
||||
NodeId addNode(const std::string& NodeText,uint32_t flags) ;
|
||||
typedef enum {
|
||||
ELASTIC_NODE_AUTH_FULL = 0x0000,
|
||||
ELASTIC_NODE_AUTH_MARGINAL = 0x0001,
|
||||
ELASTIC_NODE_AUTH_UNKNOWN = 0x0002
|
||||
} AuthType ;
|
||||
|
||||
NodeId addNode(const std::string& NodeShortText,const std::string& nodeCompleteText,NodeType type,AuthType auth) ;
|
||||
EdgeId addEdge(NodeId n1,NodeId n2) ;
|
||||
|
||||
void clearGraph() ;
|
||||
virtual void itemMoved();
|
||||
|
||||
void setEdgeLength(uint32_t l) ;
|
||||
uint32_t edgeLength() const { return _edge_length ; }
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
|
@ -85,6 +94,8 @@ private:
|
|||
|
||||
std::vector<Node *> _nodes ;
|
||||
std::vector<Node *> _edges ;
|
||||
|
||||
uint32_t _edge_length ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue