BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Sample editor with layer oriented presentation of a sample.
Definition at line 31 of file LayerOrientedSampleEditor.h.
Signals | |
void | aboutToRemoveItem (SampleItem item) |
void | modified () |
void | requestCreateNewSample () |
void | requestViewInRealSpace (SampleItem itemToShow) |
Public Member Functions | |
LayerOrientedSampleEditor (QWidget *parent, ProjectDocument *document) | |
~LayerOrientedSampleEditor () override | |
void | setCurrentSample (MultiLayerItem *sampleItem) |
Private Member Functions | |
QWidget * | createEmptyWidget () |
Create empty widget with a button for sample creation. More... | |
void | createLayerColors () |
void | onShowInlineEditButtonsToggled (bool checked) |
void | onUnitActionToggled () |
void | updateActionEnabling () |
Private Attributes | |
QAction * | m_asAngstromAction |
MultiLayerItem * | m_currentMultiLayerItem = nullptr |
MultiLayerForm * | m_currentMultiLayerWidget |
ProjectDocument * | m_document |
QMap< MultiLayerItem *, SampleEditorController * > | m_editControllers |
QAction * | m_redoAction |
QScrollArea * | m_scrollArea |
QAction * | m_showInlineEditButtonsAction |
QToolBar * | m_toolbar |
QAction * | m_undoAction |
LayerOrientedSampleEditor::LayerOrientedSampleEditor | ( | QWidget * | parent, |
ProjectDocument * | document | ||
) |
Definition at line 28 of file LayerOrientedSampleEditor.cpp.
References appSettings, createEmptyWidget(), ApplicationSettings::defaultUnitIsAngstrom(), m_asAngstromAction, m_scrollArea, m_showInlineEditButtonsAction, m_toolbar, onShowInlineEditButtonsToggled(), and onUnitActionToggled().
|
override |
Definition at line 86 of file LayerOrientedSampleEditor.cpp.
References m_editControllers.
|
signal |
Referenced by SampleView::SampleView(), and setCurrentSample().
|
private |
Create empty widget with a button for sample creation.
Definition at line 180 of file LayerOrientedSampleEditor.cpp.
References requestCreateNewSample().
Referenced by LayerOrientedSampleEditor(), and setCurrentSample().
|
private |
Definition at line 163 of file LayerOrientedSampleEditor.cpp.
References MultiLayerItem::layers(), m_currentMultiLayerItem, and LayerEditorUtils::predefinedLayerColors().
Referenced by setCurrentSample().
|
signal |
Referenced by SampleView::SampleView(), and setCurrentSample().
|
private |
Definition at line 151 of file LayerOrientedSampleEditor.cpp.
References m_currentMultiLayerWidget, and MultiLayerForm::showInlineEditButtons().
Referenced by LayerOrientedSampleEditor().
|
private |
Definition at line 157 of file LayerOrientedSampleEditor.cpp.
References m_asAngstromAction, m_currentMultiLayerWidget, and MultiLayerForm::setUseAngstrom().
Referenced by LayerOrientedSampleEditor().
|
signal |
Referenced by SampleView::SampleView(), and createEmptyWidget().
|
signal |
Referenced by SampleView::SampleView(), and setCurrentSample().
void LayerOrientedSampleEditor::setCurrentSample | ( | MultiLayerItem * | sampleItem | ) |
Definition at line 91 of file LayerOrientedSampleEditor.cpp.
References aboutToRemoveItem(), SampleEditorController::aboutToRemoveItem(), createEmptyWidget(), createLayerColors(), m_asAngstromAction, m_currentMultiLayerItem, m_currentMultiLayerWidget, m_document, m_editControllers, m_redoAction, m_scrollArea, m_showInlineEditButtonsAction, m_toolbar, m_undoAction, modified(), SampleEditorController::modified(), SampleEditorController::requestViewInRealSpace(), requestViewInRealSpace(), MultiLayerForm::setUseAngstrom(), MultiLayerForm::showInlineEditButtons(), and updateActionEnabling().
Referenced by SampleView::SampleView().
|
private |
Definition at line 142 of file LayerOrientedSampleEditor.cpp.
References m_redoAction, and m_undoAction.
Referenced by setCurrentSample().
|
private |
Definition at line 62 of file LayerOrientedSampleEditor.h.
Referenced by LayerOrientedSampleEditor(), onUnitActionToggled(), and setCurrentSample().
|
private |
Definition at line 63 of file LayerOrientedSampleEditor.h.
Referenced by createLayerColors(), and setCurrentSample().
|
private |
Definition at line 56 of file LayerOrientedSampleEditor.h.
Referenced by onShowInlineEditButtonsToggled(), onUnitActionToggled(), and setCurrentSample().
|
private |
Definition at line 65 of file LayerOrientedSampleEditor.h.
Referenced by setCurrentSample().
|
private |
Definition at line 64 of file LayerOrientedSampleEditor.h.
Referenced by ~LayerOrientedSampleEditor(), and setCurrentSample().
|
private |
Definition at line 60 of file LayerOrientedSampleEditor.h.
Referenced by setCurrentSample(), and updateActionEnabling().
|
private |
Definition at line 57 of file LayerOrientedSampleEditor.h.
Referenced by LayerOrientedSampleEditor(), and setCurrentSample().
|
private |
Definition at line 61 of file LayerOrientedSampleEditor.h.
Referenced by LayerOrientedSampleEditor(), and setCurrentSample().
|
private |
Definition at line 58 of file LayerOrientedSampleEditor.h.
Referenced by LayerOrientedSampleEditor(), and setCurrentSample().
|
private |
Definition at line 59 of file LayerOrientedSampleEditor.h.
Referenced by setCurrentSample(), and updateActionEnabling().