A scene of 2D graph nodes and edges.
More...
#include <GraphScene.hh>
Inherits QGVScene.
|
| GraphScene (QWidget *_parent=0) |
| Constructor. More...
|
|
virtual | ~GraphScene ()=default |
| Destructor. More...
|
|
QGVEdge * | AddEdge (const std::string &_id, const std::string &_node1, const std::string &_node2) |
| Add an edge to connect two nodes. More...
|
|
QGVNode * | AddNode (const std::string &_name) |
| Add a node to the scene. More...
|
|
QGVNode * | GetNode (const std::string &_name) |
| Get a node from the scene. More...
|
|
bool | HasNode (const std::string &_name) |
| Check if a node exists in the scene. More...
|
|
void | RemoveEdge (const std::string &_id) |
| Remove an edge between two nodes. More...
|
|
void | RemoveNode (const std::string &_name) |
| Remove a node from the scene. More...
|
|
void | SetEdgeColor (const std::string &_id, const ignition::math::Color &_color) |
| Set the color of an edge. More...
|
|
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 ignition::math::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: