Public Member Functions | List of all members
gazebo::gui::GraphScene Class Reference

A scene of 2D graph nodes and edges. More...

#include <GraphScene.hh>

Inheritance diagram for gazebo::gui::GraphScene:
Inheritance graph
[legend]

Public Member Functions

 GraphScene (QWidget *_parent=0)
 Constructor. More...
 
virtual ~GraphScene ()=default
 Destructor. More...
 
QGVEdgeAddEdge (const std::string &_id, const std::string &_node1, const std::string &_node2)
 Add an edge to connect two nodes. More...
 
QGVNodeAddNode (const std::string &_name)
 Add a node to the scene. More...
 
QGVNodeGetNode (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 ()
 
QGVEdgeaddEdge (QGVNode *source, QGVNode *target, const QString &label)
 
QGVEdgeaddEdge (const QString &source, const QString &target, const QString &label)
 
QGVNodeaddNode (const QString &label)
 
QGVSubGraphaddSubGraph (const QString &name, bool cluster=true)
 
void applyLayout ()
 
void clear ()
 
void clearLayout ()
 
int edgeCount () const
 
QGVNodegetNode (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)
 

Detailed Description

A scene of 2D graph nodes and edges.

Constructor & Destructor Documentation

gazebo::gui::GraphScene::GraphScene ( QWidget *  _parent = 0)

Constructor.

Parameters
[in]_parentParent Widget.
virtual gazebo::gui::GraphScene::~GraphScene ( )
virtualdefault

Destructor.

Member Function Documentation

QGVEdge* gazebo::gui::GraphScene::AddEdge ( const std::string &  _id,
const std::string &  _node1,
const std::string &  _node2 
)

Add an edge to connect two nodes.

Parameters
[in]_idEdge ID.
[in]_node1Name of the first node.
[in]_node2Name of the second node.
Returns
the Edge created.
QGVNode* gazebo::gui::GraphScene::AddNode ( const std::string &  _name)

Add a node to the scene.

Parameters
[in]_nameName of the node.
Returns
the Node created.
QGVNode* gazebo::gui::GraphScene::GetNode ( const std::string &  _name)

Get a node from the scene.

Parameters
[in]_nameName of the name.
Returns
Pointer to the node, NULL if it does not exist.
bool gazebo::gui::GraphScene::HasNode ( const std::string &  _name)

Check if a node exists in the scene.

Parameters
[in]_nameName of the node.
Returns
True if the node exists.
void gazebo::gui::GraphScene::RemoveEdge ( const std::string &  _id)

Remove an edge between two nodes.

Parameters
[in]_idEdge ID.
void gazebo::gui::GraphScene::RemoveNode ( const std::string &  _name)

Remove a node from the scene.

Parameters
[in]_nameName of the name.

The documentation for this class was generated from the following file: