A scene of 2D graph nodes and edges. More...
#include <GraphScene.hh>
Public Member Functions | |
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... | |
Public Member Functions inherited from QGVScene | |
QGVScene (const QString &name, QObject *parent=0) | |
~QGVScene () | |
QGVEdge * | addEdge (QGVNode *source, QGVNode *target, const QString &label) |
QGVEdge * | addEdge (const QString &source, const QString &target, const QString &label) |
QGVNode * | addNode (const QString &label) |
QGVSubGraph * | addSubGraph (const QString &name, bool cluster=true) |
void | applyLayout () |
void | clear () |
void | clearLayout () |
int | edgeCount () const |
QGVNode * | getNode (const QString &name) |
bool | hasNode (const QString &name) |
void | loadLayout (const QString &text) |
int | nodeCount () const |
void | removeEdge (const QString &label) |
void | removeNode (const QString &label) |
void | setEdgeAttribute (const QString &name, const QString &value) |
void | setGraphAttribute (const QString &name, const QString &value) |
void | setNodeAttribute (const QString &name, const QString &value) |
void | setRootNode (QGVNode *node) |
Additional Inherited Members | |
Signals inherited from QGVScene | |
void | edgeContextMenu (QGVEdge *edge) |
void | edgeDoubleClick (QGVEdge *edge) |
void | graphContextMenuEvent () |
void | nodeContextMenu (QGVNode *node) |
void | nodeDoubleClick (QGVNode *node) |
void | subGraphContextMenu (QGVSubGraph *graph) |
void | subGraphDoubleClick (QGVSubGraph *graph) |
Protected Member Functions inherited from QGVScene | |
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *contextMenuEvent) |
virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent) |
A scene of 2D graph nodes and edges.
gazebo::gui::GraphScene::GraphScene | ( | QWidget * | _parent = 0 | ) |
Constructor.
[in] | _parent | Parent Widget. |
|
virtualdefault |
Destructor.
QGVEdge* gazebo::gui::GraphScene::AddEdge | ( | const std::string & | _id, |
const std::string & | _node1, | ||
const std::string & | _node2 | ||
) |
Add an edge to connect two nodes.
[in] | _id | Edge ID. |
[in] | _node1 | Name of the first node. |
[in] | _node2 | Name of the second node. |
QGVNode* gazebo::gui::GraphScene::AddNode | ( | const std::string & | _name | ) |
Add a node to the scene.
[in] | _name | Name of the node. |
QGVNode* gazebo::gui::GraphScene::GetNode | ( | const std::string & | _name | ) |
Get a node from the scene.
[in] | _name | Name of the name. |
bool gazebo::gui::GraphScene::HasNode | ( | const std::string & | _name | ) |
Check if a node exists in the scene.
[in] | _name | Name of the node. |
void gazebo::gui::GraphScene::RemoveEdge | ( | const std::string & | _id | ) |
Remove an edge between two nodes.
[in] | _id | Edge ID. |
void gazebo::gui::GraphScene::RemoveNode | ( | const std::string & | _name | ) |
Remove a node from the scene.
[in] | _name | Name of the name. |