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

Interface to subscribe to various signals generated by SessionModel. More...

Inheritance diagram for ModelView::ModelListenerInterface:
[legend]

Public Member Functions

virtual ~ModelListenerInterface ()=default
 
virtual void setOnAboutToRemoveItem (Callbacks::item_tagrow_t f, Callbacks::slot_t client)=0
 Sets callback to be notified when the item is about to be removed. More...
 
virtual void setOnDataChange (Callbacks::item_int_t f, Callbacks::slot_t client)=0
 Sets callback to be notified on item's data change. More...
 
virtual void setOnItemInserted (Callbacks::item_tagrow_t f, Callbacks::slot_t client)=0
 Sets callback to be notified on item insert. More...
 
virtual void setOnItemRemoved (Callbacks::item_tagrow_t f, Callbacks::slot_t client)=0
 Sets callback to be notified on item remove. More...
 
virtual void setOnModelAboutToBeReset (Callbacks::model_t f, Callbacks::slot_t client)=0
 Sets the callback to be notified just before the reset of the root item. More...
 
virtual void setOnModelDestroyed (Callbacks::model_t f, Callbacks::slot_t client)=0
 Sets the callback for notifications on model destruction. More...
 
virtual void setOnModelReset (Callbacks::model_t f, Callbacks::slot_t client)=0
 Sets the callback to be notified right after the root item recreation. More...
 
virtual void unsubscribe (Callbacks::slot_t client)=0
 Removes given client from all subscriptions. More...
 

Detailed Description

Interface to subscribe to various signals generated by SessionModel.

Definition at line 24 of file modellistenerinterface.h.

Constructor & Destructor Documentation

◆ ~ModelListenerInterface()

virtual ModelView::ModelListenerInterface::~ModelListenerInterface ( )
virtualdefault

Member Function Documentation

◆ setOnAboutToRemoveItem()

virtual void ModelView::ModelListenerInterface::setOnAboutToRemoveItem ( Callbacks::item_tagrow_t  f,
Callbacks::slot_t  client 
)
pure virtual

Sets callback to be notified when the item is about to be removed.

The callback will be called with (SessionItem* parent, tagrow), where 'tagrow' denotes child position being removed.

Implemented in ModelView::ItemMapper, ModelView::ModelListenerBase, and ModelView::ModelMapper.

◆ setOnDataChange()

virtual void ModelView::ModelListenerInterface::setOnDataChange ( Callbacks::item_int_t  f,
Callbacks::slot_t  client 
)
pure virtual

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

The callback will be called with (SessionItem*, data_role).

Implemented in ModelView::ItemMapper, ModelView::ModelListenerBase, and ModelView::ModelMapper.

◆ setOnItemInserted()

virtual void ModelView::ModelListenerInterface::setOnItemInserted ( Callbacks::item_tagrow_t  f,
Callbacks::slot_t  client 
)
pure virtual

Sets callback to be notified on item insert.

The callback will be called with (SessionItem* parent, tagrow), where 'tagrow' denotes inserted child position.

Implemented in ModelView::ItemMapper, ModelView::ModelListenerBase, and ModelView::ModelMapper.

◆ setOnItemRemoved()

virtual void ModelView::ModelListenerInterface::setOnItemRemoved ( Callbacks::item_tagrow_t  f,
Callbacks::slot_t  client 
)
pure virtual

Sets callback to be notified on item remove.

The callback will be called with (SessionItem* parent, tagrow), where 'tagrow' denotes child position before the removal.

Implemented in ModelView::ItemMapper, ModelView::ModelListenerBase, and ModelView::ModelMapper.

◆ setOnModelAboutToBeReset()

virtual void ModelView::ModelListenerInterface::setOnModelAboutToBeReset ( Callbacks::model_t  f,
Callbacks::slot_t  client 
)
pure virtual

Sets the callback to be notified just before the reset of the root item.

Implemented in ModelView::ModelListenerBase, and ModelView::ModelMapper.

◆ setOnModelDestroyed()

virtual void ModelView::ModelListenerInterface::setOnModelDestroyed ( Callbacks::model_t  f,
Callbacks::slot_t  client 
)
pure virtual

Sets the callback for notifications on model destruction.

Implemented in ModelView::ModelListenerBase, and ModelView::ModelMapper.

◆ setOnModelReset()

virtual void ModelView::ModelListenerInterface::setOnModelReset ( Callbacks::model_t  f,
Callbacks::slot_t  client 
)
pure virtual

Sets the callback to be notified right after the root item recreation.

Implemented in ModelView::ModelListenerBase, and ModelView::ModelMapper.

◆ unsubscribe()

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

Removes given client from all subscriptions.

Implemented in ModelView::ModelListenerBase, ModelView::ModelMapper, and ModelView::ItemMapper.


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