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

The parent widget of the CML editor. More...

#include <SchematicViewWidget.hh>

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

Public Member Functions

 SchematicViewWidget (QWidget *_parent=0)
 Constructor. More...
 
 ~SchematicViewWidget ()=default
 Destructor. More...
 
void AddEdge (const std::string &_id, const std::string &_name, const std::string &_parent, const std::string &_child)
 Add an edge to the scene in the widget. More...
 
void AddNode (const std::string &_node)
 Add a node to the scene in the widget. More...
 
void FitInView ()
 Scales the view to ensure the items of the scene are visible. More...
 
unsigned int GetEdgeCount () const
 Get number of edges in the scene. More...
 
unsigned int GetNodeCount () const
 Get number of nodes in the scene. More...
 
bool HasNode (const std::string &_name) const
 Check if a node exists in the scene in the widget. More...
 
void Init ()
 Initialize the widget to listen to events/topics. More...
 
void RemoveEdge (const std::string &_id)
 Remove an edge from the scene in the widget. More...
 
void RemoveNode (const std::string &_node)
 Remove a node from the scene in the widget. More...
 
void Reset ()
 Reset the widget and clear the scene. More...
 

Detailed Description

The parent widget of the CML editor.

Constructor & Destructor Documentation

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

Constructor.

Parameters
[in]_parentParent QWidget.
gazebo::gui::SchematicViewWidget::~SchematicViewWidget ( )
default

Destructor.

Member Function Documentation

void gazebo::gui::SchematicViewWidget::AddEdge ( const std::string &  _id,
const std::string &  _name,
const std::string &  _parent,
const std::string &  _child 
)

Add an edge to the scene in the widget.

Parameters
[in]_idUnique id of edge.
[in]_nameName of edge.
[in]_parentName of parent node.
[in]_childName of child node.
void gazebo::gui::SchematicViewWidget::AddNode ( const std::string &  _node)

Add a node to the scene in the widget.

Parameters
[in]_nodeName of node.
void gazebo::gui::SchematicViewWidget::FitInView ( )

Scales the view to ensure the items of the scene are visible.

unsigned int gazebo::gui::SchematicViewWidget::GetEdgeCount ( ) const

Get number of edges in the scene.

Returns
Number of edges.
unsigned int gazebo::gui::SchematicViewWidget::GetNodeCount ( ) const

Get number of nodes in the scene.

Returns
Number of nodes.
bool gazebo::gui::SchematicViewWidget::HasNode ( const std::string &  _name) const

Check if a node exists in the scene in the widget.

Parameters
[in]_nameName of the name.
Returns
True if the node exists.
void gazebo::gui::SchematicViewWidget::Init ( )

Initialize the widget to listen to events/topics.

void gazebo::gui::SchematicViewWidget::RemoveEdge ( const std::string &  _id)

Remove an edge from the scene in the widget.

Parameters
[in]_idUnique id of edge.
void gazebo::gui::SchematicViewWidget::RemoveNode ( const std::string &  _node)

Remove a node from the scene in the widget.

Parameters
[in]_nodeName of node.
void gazebo::gui::SchematicViewWidget::Reset ( )

Reset the widget and clear the scene.


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