BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Main widget of MaterialEditor. More...
Public Member Functions | |
MaterialEditor (MaterialModel *materialModel, QWidget *parent=nullptr) | |
bool | modelWasChanged () const |
MaterialItem * | selectedMaterial () |
QItemSelectionModel * | selectionModel () |
void | setInitialMaterialProperty (const ExternalProperty &matProperty) |
Sets selection corresponding to initial material property. More... | |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *event) |
Context menu reimplemented to supress default menu. More... | |
Private Slots | |
void | onDataChanged (const QModelIndex &, const QModelIndex &, const QVector< int > &) |
void | onRowsInserted (const QModelIndex &, int, int) |
void | onRowsRemoved (const QModelIndex &, int, int) |
void | onSelectionChanged (const QItemSelection &selected, const QItemSelection &) |
Private Member Functions | |
void | init_views () |
Private Attributes | |
ComponentEditor * | m_componentEditor |
QListView * | m_listView |
MaterialModel * | m_materialModel |
bool | m_model_was_modified |
QSplitter * | m_splitter |
MaterialEditorToolBar * | m_toolBar |
Main widget of MaterialEditor.
Definition at line 32 of file MaterialEditor.h.
MaterialEditor::MaterialEditor | ( | MaterialModel * | materialModel, |
QWidget * | parent = nullptr |
||
) |
Definition at line 26 of file MaterialEditor.cpp.
References init_views(), m_componentEditor, m_listView, m_splitter, and m_toolBar.
|
protected |
Context menu reimplemented to supress default menu.
Definition at line 113 of file MaterialEditor.cpp.
|
private |
Definition at line 118 of file MaterialEditor.cpp.
References SessionModel::index(), m_listView, m_materialModel, m_toolBar, MaterialEditorToolBar::onCustomContextMenuRequested(), onDataChanged(), onRowsInserted(), onRowsRemoved(), onSelectionChanged(), selectionModel(), and MaterialEditorToolBar::setSelectionModel().
Referenced by MaterialEditor().
bool MaterialEditor::modelWasChanged | ( | ) | const |
Definition at line 80 of file MaterialEditor.cpp.
References m_model_was_modified.
Referenced by MaterialEditorDialog::onOKButton().
|
privateslot |
Definition at line 97 of file MaterialEditor.cpp.
References m_model_was_modified.
Referenced by init_views().
|
privateslot |
Definition at line 102 of file MaterialEditor.cpp.
References m_model_was_modified.
Referenced by init_views().
|
privateslot |
Definition at line 107 of file MaterialEditor.cpp.
References m_model_was_modified.
Referenced by init_views().
|
privateslot |
Definition at line 85 of file MaterialEditor.cpp.
References SessionModel::itemForIndex(), m_componentEditor, m_materialModel, and ComponentEditor::setItem().
Referenced by init_views().
MaterialItem * MaterialEditor::selectedMaterial | ( | ) |
Definition at line 62 of file MaterialEditor.cpp.
References m_materialModel, MaterialModel::materialFromIndex(), and selectionModel().
Referenced by MaterialEditorDialog::selectedMaterialProperty().
QItemSelectionModel * MaterialEditor::selectionModel | ( | ) |
Definition at line 56 of file MaterialEditor.cpp.
References ASSERT, and m_listView.
Referenced by init_views(), selectedMaterial(), and setInitialMaterialProperty().
void MaterialEditor::setInitialMaterialProperty | ( | const ExternalProperty & | matProperty | ) |
Sets selection corresponding to initial material property.
Definition at line 69 of file MaterialEditor.cpp.
References ExternalProperty::identifier(), SessionModel::indexOfItem(), m_materialModel, MaterialModel::materialFromIdentifier(), and selectionModel().
Referenced by MaterialEditorDialog::setMaterialProperty().
|
private |
Definition at line 62 of file MaterialEditor.h.
Referenced by MaterialEditor(), and onSelectionChanged().
|
private |
Definition at line 61 of file MaterialEditor.h.
Referenced by MaterialEditor(), init_views(), and selectionModel().
|
private |
Definition at line 58 of file MaterialEditor.h.
Referenced by init_views(), onSelectionChanged(), selectedMaterial(), and setInitialMaterialProperty().
|
private |
Definition at line 63 of file MaterialEditor.h.
Referenced by modelWasChanged(), onDataChanged(), onRowsInserted(), and onRowsRemoved().
|
private |
Definition at line 60 of file MaterialEditor.h.
Referenced by MaterialEditor().
|
private |
Definition at line 59 of file MaterialEditor.h.
Referenced by MaterialEditor(), and init_views().