SchematicViewWidget Class Reference

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

#include <SchematicViewWidget.hh>

Inherits QWidget.

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 &_type, 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 HasEdge (const std::string &_id) const
 Check if an edge exists in the scene in the widget. 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...
 
void UpdateEdge (const std::string &_id, const std::string &_name, const std::string &_type, const std::string &_parent, const std::string &_child)
 Update an edge in the scene. More...
 

Detailed Description

The parent widget of the CML editor.

Constructor & Destructor Documentation

SchematicViewWidget ( QWidget *  _parent = 0)

Constructor.

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

Destructor.

Member Function Documentation

void AddEdge ( const std::string &  _id,
const std::string &  _name,
const std::string &  _type,
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]_nameType of edge.
[in]_parentName of parent node.
[in]_childName of child node.
void AddNode ( const std::string &  _node)

Add a node to the scene in the widget.

Parameters
[in]_nodeName of node.
void FitInView ( )

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

unsigned int GetEdgeCount ( ) const

Get number of edges in the scene.

Returns
Number of edges.
unsigned int GetNodeCount ( ) const

Get number of nodes in the scene.

Returns
Number of nodes.
bool HasEdge ( const std::string &  _id) const

Check if an edge exists in the scene in the widget.

Parameters
[in]_idJoint Id.
Returns
True if the edge exists.
bool HasNode ( const std::string &  _name) const

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

Parameters
[in]_nameName of the node.
Returns
True if the node exists.
void Init ( )

Initialize the widget to listen to events/topics.

void RemoveEdge ( const std::string &  _id)

Remove an edge from the scene in the widget.

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

Remove a node from the scene in the widget.

Parameters
[in]_nodeName of node.
void Reset ( )

Reset the widget and clear the scene.

void UpdateEdge ( const std::string &  _id,
const std::string &  _name,
const std::string &  _type,
const std::string &  _parent,
const std::string &  _child 
)

Update an edge in the scene.

Parameters
[in]_idUnique id of edge.
[in]_nameName of edge.
[in]_typeType of edge.
[in]_parentName of parent node.
[in]_childName of child node.

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