BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ModelView::ItemListenerInterface Class Referenceabstract

Interface to subscribe to various events happening with specific SessionItem. More...

Inheritance diagram for ModelView::ItemListenerInterface:
[legend]

Public Member Functions

virtual ~ItemListenerInterface ()=default
 
virtual void setOnAboutToRemoveItem (Callbacks::item_tagrow_t f, Callbacks::slot_t owner)=0
 Sets callback to be notified when row is about to be removed. More...
 
virtual void setOnChildPropertyChange (Callbacks::item_str_t f, Callbacks::slot_t owner)=0
 Sets callback to be notified on item's children property change. More...
 
virtual void setOnDataChange (Callbacks::item_int_t f, Callbacks::slot_t owner)=0
 Sets callback to be notified on item's data change. More...
 
virtual void setOnItemDestroy (Callbacks::item_t f, Callbacks::slot_t owner)=0
 
virtual void setOnItemInserted (Callbacks::item_tagrow_t f, Callbacks::slot_t owner)=0
 Sets callback to be notified on child insertion. More...
 
virtual void setOnItemRemoved (Callbacks::item_tagrow_t f, Callbacks::slot_t owner)=0
 Sets callback to be notified on child removal. More...
 
virtual void setOnPropertyChange (Callbacks::item_str_t f, Callbacks::slot_t owner)=0
 Sets callback to be notified on item's property change. More...
 
virtual void unsubscribe (Callbacks::slot_t client)=0
 Removes given client from all subscriptions. More...
 

Detailed Description

Interface to subscribe to various events happening with specific SessionItem.

Definition at line 24 of file itemlistenerinterface.h.

Constructor & Destructor Documentation

◆ ~ItemListenerInterface()

virtual ModelView::ItemListenerInterface::~ItemListenerInterface ( )
virtualdefault

Member Function Documentation

◆ setOnAboutToRemoveItem()

virtual void ModelView::ItemListenerInterface::setOnAboutToRemoveItem ( Callbacks::item_tagrow_t  f,
Callbacks::slot_t  owner 
)
pure virtual

Sets callback to be notified when row is about to be removed.

Callback will be called with (compound_item, tagrow). For MultiLayer containing the T_LAYERS tag, the signal will be triggered on layer deletion with (multilayer*, {T_LAYER, row}) as callback parameters.

Implemented in ModelView::ItemMapper.

◆ setOnChildPropertyChange()

virtual void ModelView::ItemListenerInterface::setOnChildPropertyChange ( Callbacks::item_str_t  f,
Callbacks::slot_t  owner 
)
pure virtual

Sets callback to be notified on item's children property change.

Callback will be called with (compound_item, property_name). For MultiLayer containing the layer with "thickness" property, the signal will be triggered on thickness change using (layeritem*, "thickness") as callback parameters.

Implemented in ModelView::ItemMapper.

◆ setOnDataChange()

virtual void ModelView::ItemListenerInterface::setOnDataChange ( Callbacks::item_int_t  f,
Callbacks::slot_t  owner 
)
pure virtual

Sets callback to be notified on item's data change.

Callback will be called with (SessionItem*, data_role).

Implemented in ModelView::ItemMapper.

◆ setOnItemDestroy()

virtual void ModelView::ItemListenerInterface::setOnItemDestroy ( Callbacks::item_t  f,
Callbacks::slot_t  owner 
)
pure virtual

Implemented in ModelView::ItemMapper.

◆ setOnItemInserted()

virtual void ModelView::ItemListenerInterface::setOnItemInserted ( Callbacks::item_tagrow_t  f,
Callbacks::slot_t  owner 
)
pure virtual

Sets callback to be notified on child insertion.

Callback will be called with (compound_item, tag, row). For MultiLayer containing the T_LAYERS tag, the signal will be triggered on layer insertion with (multilayer*, {T_LAYER, row}) as callback parameters.

Implemented in ModelView::ItemMapper.

◆ setOnItemRemoved()

virtual void ModelView::ItemListenerInterface::setOnItemRemoved ( Callbacks::item_tagrow_t  f,
Callbacks::slot_t  owner 
)
pure virtual

Sets callback to be notified on child removal.

Callback will be called with (compound_item, tag, row). For MultiLayer containing the T_LAYERS tag, the signal will be triggered on layer removal with (multilayer*, {T_LAYER, oldrow}) as callback parameters.

Implemented in ModelView::ItemMapper.

◆ setOnPropertyChange()

virtual void ModelView::ItemListenerInterface::setOnPropertyChange ( Callbacks::item_str_t  f,
Callbacks::slot_t  owner 
)
pure virtual

Sets callback to be notified on item's property change.

Callback will be called with (compound_item, property_name).

Implemented in ModelView::ItemMapper.

◆ unsubscribe()

virtual void ModelView::ItemListenerInterface::unsubscribe ( Callbacks::slot_t  client)
pure virtual

Removes given client from all subscriptions.

Implemented in ModelView::ItemMapper.


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