SOFA API  d36dcf8a
Open source framework for multi-physics simuation
sofa::gui::qt::ObjectStateListener Class Reference

#include <GraphListenerQListView.h>

Inheritance diagram for sofa::gui::qt::ObjectStateListener:

Detailed Description

A listener to connect changes on the component state with its graphical view. The listener is added to the ComponentState of an object to track changes to and update the icon/treewidgetitem when this happens.

Public Attributes

QTreeWidgetItem * item
 
sofa::core::objectmodel::Base::SPtr object
 

Public Member Functions

 ObjectStateListener (QTreeWidgetItem *item_, sofa::core::objectmodel::Base *object_)
 
 ~ObjectStateListener () override
 
void update () override
 Update this value. More...
 
void notifyEndEdit () override
 Notify links that the DGNode has been modified. More...
 
- Public Member Functions inherited from sofa::core::objectmodel::DDGNode
 DDGNode ()
 Constructor. More...
 
virtual ~DDGNode ()
 Destructor. Automatically remove remaining links. More...
 
void addInput (DDGNode *n)
 Add a new input to this node. More...
 
void delInput (DDGNode *n)
 Remove an input from this node. More...
 
void addOutput (DDGNode *n)
 Add a new output to this node. More...
 
void delOutput (DDGNode *n)
 Remove an output from this node. More...
 
const DDGLinkContainergetInputs ()
 Get the list of inputs for this DDGNode. More...
 
const DDGLinkContainergetOutputs ()
 Get the list of outputs for this DDGNode. More...
 
bool isDirty () const
 Returns true if the DDGNode needs to be updated. More...
 
virtual void setDirtyValue ()
 Indicate the value needs to be updated. More...
 
virtual void setDirtyOutputs ()
 Indicate the outputs needs to be updated. This method must be called after changing the value of this node. More...
 
void cleanDirty ()
 Set dirty flag to false. More...
 
void updateIfDirty () const
 Utility method to call update if necessary. This method should be called before reading of writing the value of this node. More...
 

Additional Inherited Members

- Protected Attributes inherited from sofa::core::objectmodel::DDGNode
DDGLinkContainer inputs
 
DDGLinkContainer outputs
 
- Protected Member Functions inherited from sofa::core::objectmodel::DDGNode
virtual void doAddInput (DDGNode *n)
 
virtual void doDelInput (DDGNode *n)
 
virtual void doAddOutput (DDGNode *n)
 
virtual void doDelOutput (DDGNode *n)
 
void cleanDirtyOutputsOfInputs ()
 the dirtyOutputs flags of all the inputs will be set to false More...
 

Attribute details

◆ item

QTreeWidgetItem* sofa::gui::qt::ObjectStateListener::item

◆ object

sofa::core::objectmodel::Base::SPtr sofa::gui::qt::ObjectStateListener::object

Constructor details

◆ ObjectStateListener()

sofa::gui::qt::ObjectStateListener::ObjectStateListener ( QTreeWidgetItem *  item_,
sofa::core::objectmodel::Base object_ 
)

◆ ~ObjectStateListener()

sofa::gui::qt::ObjectStateListener::~ObjectStateListener ( )
override

Function details

◆ notifyEndEdit()

void sofa::gui::qt::ObjectStateListener::notifyEndEdit ( )
overridevirtual

Notify links that the DGNode has been modified.

Reimplemented from sofa::core::objectmodel::DDGNode.

◆ update()

void sofa::gui::qt::ObjectStateListener::update ( )
overridevirtual

Update this value.

Implements sofa::core::objectmodel::DDGNode.