SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::gui::qt::SofaWindowDataGraph Class Reference

#include <SofaWindowDataGraph.h>

Inheritance diagram for sofa::gui::qt::SofaWindowDataGraph:

Detailed Description

This Class provide an interface with the library QtNodes to display Data Graph connection inside a QDialog. It will take a SOFA simulation scene and create Graph nodes for each Sofa component and display connections between Data.

Protected Attributes

QtNodes::FlowScene * m_graphScene
 Pointer to the graphScene used to store nodes. More...
 
QtNodes::FlowView * m_graphView
 Pointer to the view of the graph. More...
 
sofa::simulation::Nodem_rootNode
 Point to the root node of the current simulation. More...
 
std::vector< std::string > m_exceptions
 List of component name not to be display in the graph. More...
 
SReal m_scaleX
 Scale paramater to apply between nodes for display in abscissa.
More...
 
SReal m_scaleY
 Scale paramater to apply between nodes for display in ordinate. More...
 
int m_posX
 Increment position counter on abscissa for Node display. More...
 
int m_posY
 Increment position counter on ordinate for Node display. More...
 
bool debugNodeGraph
 parameter to activate graph logs. False by default. More...
 

Public Member Functions

 SofaWindowDataGraph (QWidget *parent, sofa::simulation::Node *scene)
 Default constructor of the Widget, given a QWidget as parent and a pointer to the current simulation scene. More...
 
 ~SofaWindowDataGraph ()
 
void resetNodeGraph (sofa::simulation::Node *scene)
 Method to be called when graph need to be recomputed (like reloading scene). Take a pointer to the root node of the scene. More...
 

Protected Member Functions

void parseSimulationNode (sofa::simulation::Node *node, int posX=0)
 Internal method to parse all Sofa component inside a Sofa simulation Node. Will call. More...
 
size_t addSimulationObject (sofa::core::objectmodel::BaseObject *bObject)
 Internal method to create a Node for this sofa BaseObject. More...
 
void connectNodeData ()
 Internal method to create all connection between component on the graph. More...
 
void clearNodeData ()
 Internal method to clear the graph structures. More...
 

Attribute details

◆ debugNodeGraph

bool sofa::gui::qt::SofaWindowDataGraph::debugNodeGraph
protected

parameter to activate graph logs. False by default.

◆ m_exceptions

std::vector<std::string> sofa::gui::qt::SofaWindowDataGraph::m_exceptions
protected

List of component name not to be display in the graph.

◆ m_graphScene

QtNodes::FlowScene* sofa::gui::qt::SofaWindowDataGraph::m_graphScene
protected

Pointer to the graphScene used to store nodes.

◆ m_graphView

QtNodes::FlowView* sofa::gui::qt::SofaWindowDataGraph::m_graphView
protected

Pointer to the view of the graph.

◆ m_posX

int sofa::gui::qt::SofaWindowDataGraph::m_posX
protected

Increment position counter on abscissa for Node display.

◆ m_posY

int sofa::gui::qt::SofaWindowDataGraph::m_posY
protected

Increment position counter on ordinate for Node display.

◆ m_rootNode

sofa::simulation::Node* sofa::gui::qt::SofaWindowDataGraph::m_rootNode
protected

Point to the root node of the current simulation.

◆ m_scaleX

SReal sofa::gui::qt::SofaWindowDataGraph::m_scaleX
protected

Scale paramater to apply between nodes for display in abscissa.

◆ m_scaleY

SReal sofa::gui::qt::SofaWindowDataGraph::m_scaleY
protected

Scale paramater to apply between nodes for display in ordinate.

Constructor details

◆ SofaWindowDataGraph()

sofa::gui::qt::SofaWindowDataGraph::SofaWindowDataGraph ( QWidget parent,
sofa::simulation::Node scene 
)

Default constructor of the Widget, given a QWidget as parent and a pointer to the current simulation scene.

◆ ~SofaWindowDataGraph()

sofa::gui::qt::SofaWindowDataGraph::~SofaWindowDataGraph ( )

Function details

◆ addSimulationObject()

size_t sofa::gui::qt::SofaWindowDataGraph::addSimulationObject ( sofa::core::objectmodel::BaseObject bObject)
protected

Internal method to create a Node for this sofa BaseObject.

◆ clearNodeData()

void sofa::gui::qt::SofaWindowDataGraph::clearNodeData ( )
protected

Internal method to clear the graph structures.

◆ connectNodeData()

void sofa::gui::qt::SofaWindowDataGraph::connectNodeData ( )
protected

Internal method to create all connection between component on the graph.

◆ parseSimulationNode()

void sofa::gui::qt::SofaWindowDataGraph::parseSimulationNode ( sofa::simulation::Node node,
int  posX = 0 
)
protected

Internal method to parse all Sofa component inside a Sofa simulation Node. Will call.

See also
addSimulationObject for each compoenent then will iterate on children nodes.

◆ resetNodeGraph()

void sofa::gui::qt::SofaWindowDataGraph::resetNodeGraph ( sofa::simulation::Node scene)

Method to be called when graph need to be recomputed (like reloading scene). Take a pointer to the root node of the scene.