15 #ifndef BORNAGAIN_GUI_COREGUI_MODELS_MATERIALPROPERTYCONTROLLER_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_MATERIALPROPERTYCONTROLLER_H
Listens MaterialModel for changes in MaterialItems and then updates MaterialProperties in all related...
SampleModel * m_sampleModel
void setModels(MaterialModel *materialModel, SampleModel *sampleModel)
QVector< SessionItem * > relatedSampleItems()
Returns vector of SessionItems having MaterialProperty on board.
void onMaterialDataChanged(const QModelIndex &topLeft, const QModelIndex &, const QVector< int > &)
On MaterialItem change: updates corresponding MaterialProperty in sample items.
MaterialModel * m_materialModel
MaterialPropertyController(QObject *parent=nullptr)
void onMaterialRowsAboutToBeRemoved(const QModelIndex &parent, int first, int last)
On MaterialItem removal: updates corresponding MaterialProperty in sample items.
void onMaterialModelLoad()
Special case when original MaterialModel was fully rebuild from MaterialEditor.
Main model to hold sample items.