BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Dialog to hold MaterialEditor. More...
Public Slots | |
void | onCancelButton () |
void | onOKButton () |
replaces original material model with the model modified by MaterialEditor More... | |
Public Member Functions | |
MaterialEditorDialog (MaterialModel *materialModel, QWidget *parent=nullptr) | |
ExternalProperty | selectedMaterialProperty () |
void | setMaterialProperty (const ExternalProperty &matProperty) |
Private Member Functions | |
QBoxLayout * | createButtonLayout () |
void | init_material_editor () |
void | readSettings () |
void | writeSettings () |
Private Attributes | |
MaterialEditor * | m_materialEditor |
MaterialModel * | m_origMaterialModel |
std::unique_ptr< MaterialModel > | m_tmpMaterialModel |
Dialog to hold MaterialEditor.
It's main function is to return MaterialModel to original state, if user decided to cancel changes.
Definition at line 30 of file MaterialEditorDialog.h.
MaterialEditorDialog::MaterialEditorDialog | ( | MaterialModel * | materialModel, |
QWidget * | parent = nullptr |
||
) |
Definition at line 30 of file MaterialEditorDialog.cpp.
References createButtonLayout(), init_material_editor(), m_materialEditor, and StyleUtils::setResizable().
|
private |
Definition at line 66 of file MaterialEditorDialog.cpp.
References onCancelButton(), and onOKButton().
Referenced by MaterialEditorDialog().
|
private |
Definition at line 84 of file MaterialEditorDialog.cpp.
References ASSERT, MaterialModel::createCopy(), m_materialEditor, m_origMaterialModel, m_tmpMaterialModel, and readSettings().
Referenced by MaterialEditorDialog().
|
slot |
Definition at line 60 of file MaterialEditorDialog.cpp.
References writeSettings().
Referenced by createButtonLayout().
|
slot |
replaces original material model with the model modified by MaterialEditor
Definition at line 50 of file MaterialEditorDialog.cpp.
References SessionModel::clear(), SessionModel::initFrom(), m_materialEditor, m_origMaterialModel, m_tmpMaterialModel, MaterialEditor::modelWasChanged(), and writeSettings().
Referenced by createButtonLayout().
|
private |
Definition at line 92 of file MaterialEditorDialog.cpp.
References Constants::S_MATERIALEDITOR, Constants::S_WINDOWPOSITION, and Constants::S_WINDOWSIZE.
Referenced by init_material_editor().
ExternalProperty MaterialEditorDialog::selectedMaterialProperty | ( | ) |
Definition at line 115 of file MaterialEditorDialog.cpp.
References m_materialEditor, MaterialItemUtils::materialProperty(), and MaterialEditor::selectedMaterial().
Referenced by MaterialItemUtils::selectMaterialProperty().
void MaterialEditorDialog::setMaterialProperty | ( | const ExternalProperty & | matProperty | ) |
Definition at line 124 of file MaterialEditorDialog.cpp.
References ASSERT, m_materialEditor, and MaterialEditor::setInitialMaterialProperty().
Referenced by MaterialItemUtils::selectMaterialProperty().
|
private |
Definition at line 106 of file MaterialEditorDialog.cpp.
References Constants::S_MATERIALEDITOR, Constants::S_WINDOWPOSITION, and Constants::S_WINDOWSIZE.
Referenced by onCancelButton(), and onOKButton().
|
private |
Definition at line 53 of file MaterialEditorDialog.h.
Referenced by MaterialEditorDialog(), init_material_editor(), onOKButton(), selectedMaterialProperty(), and setMaterialProperty().
|
private |
Definition at line 51 of file MaterialEditorDialog.h.
Referenced by init_material_editor(), and onOKButton().
|
private |
Definition at line 52 of file MaterialEditorDialog.h.
Referenced by init_material_editor(), and onOKButton().