BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
gui2::MaterialEditor Class Reference

Material editor. More...

Inheritance diagram for gui2::MaterialEditor:
[legend]
Collaboration diagram for gui2::MaterialEditor:
[legend]

Public Member Functions

 MaterialEditor (QWidget *parent=nullptr)
 
 ~MaterialEditor ()
 
QSize minimumSizeHint () const override
 
void setModels (ApplicationModels *models)
 Set the mododel for the different items. More...
 
QSize sizeHint () const override
 

Private Attributes

MaterialEditorActionsm_actions {nullptr}
 
MaterialEditorWidgetm_editorWidget {nullptr}
 
MaterialEditorToolBarm_toolBar {nullptr}
 

Detailed Description

Material editor.

Definition at line 30 of file materialeditor.h.

Constructor & Destructor Documentation

◆ MaterialEditor()

MaterialEditor::MaterialEditor ( QWidget *  parent = nullptr)

Definition at line 26 of file materialeditor.cpp.

27  : QWidget(parent)
28  , m_actions(new MaterialEditorActions(this))
29  , m_editorWidget(new MaterialEditorWidget)
31 {
32  setWindowTitle("Material editor");
33  auto layout = new QVBoxLayout;
34  layout->addWidget(m_toolBar);
35  layout->addWidget(m_editorWidget);
36  setLayout(layout);
37  layout->setContentsMargins(0, 0, 0, 0);
38  layout->setSpacing(0);
39 }
Toolbar for MaterialEditor.
MaterialEditorToolBar * m_toolBar
MaterialEditorWidget * m_editorWidget
MaterialEditorActions * m_actions

References m_editorWidget, and m_toolBar.

◆ ~MaterialEditor()

MaterialEditor::~MaterialEditor ( )
default

Member Function Documentation

◆ minimumSizeHint()

QSize MaterialEditor::minimumSizeHint ( ) const
override

Definition at line 54 of file materialeditor.cpp.

55 {
57 }
DAREFLCORE_EXPORT QSize DockMinimumSizeHint()
Hint on minimum size of docks on main reflectometry window.
Definition: styleutils.cpp:34

References gui2::StyleUtils::DockMinimumSizeHint().

Here is the call graph for this function:

◆ setModels()

void MaterialEditor::setModels ( ApplicationModels models)

Set the mododel for the different items.

Definition at line 42 of file materialeditor.cpp.

43 {
44  m_editorWidget->setModels(models);
45  m_actions->setModel(models->materialModel());
47 }
MaterialModel * materialModel()
void setMaterialSelectionModel(MaterialSelectionModel *selection_model)
void setModel(MaterialModel *model)
MaterialSelectionModel * selectionModel() const
void setModels(ApplicationModels *models)

References m_actions, m_editorWidget, gui2::ApplicationModels::materialModel(), gui2::MaterialEditorWidget::selectionModel(), gui2::MaterialEditorActions::setMaterialSelectionModel(), gui2::MaterialEditorActions::setModel(), and gui2::MaterialEditorWidget::setModels().

Here is the call graph for this function:

◆ sizeHint()

QSize MaterialEditor::sizeHint ( ) const
override

Definition at line 49 of file materialeditor.cpp.

50 {
51  return StyleUtils::DockSizeHint();
52 }
DAREFLCORE_EXPORT QSize DockSizeHint()
Hint on size of docks on main reflectometry window.
Definition: styleutils.cpp:29

References gui2::StyleUtils::DockSizeHint().

Here is the call graph for this function:

Member Data Documentation

◆ m_actions

MaterialEditorActions* gui2::MaterialEditor::m_actions {nullptr}
private

Definition at line 43 of file materialeditor.h.

Referenced by setModels().

◆ m_editorWidget

MaterialEditorWidget* gui2::MaterialEditor::m_editorWidget {nullptr}
private

Definition at line 44 of file materialeditor.h.

Referenced by MaterialEditor(), and setModels().

◆ m_toolBar

MaterialEditorToolBar* gui2::MaterialEditor::m_toolBar {nullptr}
private

Definition at line 45 of file materialeditor.h.

Referenced by MaterialEditor().


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