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()

SchematicViewWidget ( QWidget *  _parent = 0)
explicit

Constructor.

Parameters
[in]_parentParent QWidget.

◆ ~SchematicViewWidget()

~SchematicViewWidget ( )
default

Destructor.

Member Function Documentation

◆ AddEdge()

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.

◆ AddNode()

void AddNode ( const std::string &  _node)

Add a node to the scene in the widget.

Parameters
[in]_nodeName of node.

◆ FitInView()

void FitInView ( )

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

◆ GetEdgeCount()

unsigned int GetEdgeCount ( ) const

Get number of edges in the scene.

Returns
Number of edges.

◆ GetNodeCount()

unsigned int GetNodeCount ( ) const

Get number of nodes in the scene.

Returns
Number of nodes.

◆ HasEdge()

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.

◆ HasNode()

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.

◆ Init()

void Init ( )

Initialize the widget to listen to events/topics.

◆ RemoveEdge()

void RemoveEdge ( const std::string &  _id)

Remove an edge from the scene in the widget.

Parameters
[in]_idUnique id of edge.

◆ RemoveNode()

void RemoveNode ( const std::string &  _node)

Remove a node from the scene in the widget.

Parameters
[in]_nodeName of node.

◆ Reset()

void Reset ( )

Reset the widget and clear the scene.

◆ UpdateEdge()

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: