A scene of 2D graph nodes and edges.
More...
#include <GraphScene.hh>
Inherits QGVScene.
A scene of 2D graph nodes and edges.
Constructor.
- Parameters
-
[in] | _parent | Parent Widget. |
QGVEdge* AddEdge |
( |
const std::string & |
_id, |
|
|
const std::string & |
_node1, |
|
|
const std::string & |
_node2 |
|
) |
| |
Add an edge to connect two nodes.
- Parameters
-
[in] | _id | Edge ID. |
[in] | _node1 | Name of the first node. |
[in] | _node2 | Name of the second node. |
- Returns
- the Edge created.
QGVNode* AddNode |
( |
const std::string & |
_name | ) |
|
Add a node to the scene.
- Parameters
-
[in] | _name | Name of the node. |
- Returns
- the Node created.
QGVNode* GetNode |
( |
const std::string & |
_name | ) |
|
Get a node from the scene.
- Parameters
-
[in] | _name | Name of the name. |
- Returns
- Pointer to the node, NULL if it does not exist.
bool HasNode |
( |
const std::string & |
_name | ) |
|
Check if a node exists in the scene.
- Parameters
-
[in] | _name | Name of the node. |
- Returns
- True if the node exists.
void RemoveEdge |
( |
const std::string & |
_id | ) |
|
Remove an edge between two nodes.
- Parameters
-
void RemoveNode |
( |
const std::string & |
_name | ) |
|
Remove a node from the scene.
- Parameters
-
[in] | _name | Name of the name. |
void SetEdgeColor |
( |
const std::string & |
_id, |
|
|
const common::Color & |
_color |
|
) |
| |
Set the color of an edge.
- Parameters
-
[in] | _id | Edge ID. |
[in] | _color | Color to set the edge to. |
The documentation for this class was generated from the following file: