BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
List view to select one sample (left side of layer-oriented sample editor)
Definition at line 25 of file SampleListView.h.
Public Slots | |
void | onSampleModified () |
Signals | |
void | currentSampleChanged (MultiLayerItem *current) |
Public Member Functions | |
SampleListView (QWidget *parent, ProjectDocument *document) | |
QAction * | chooseFromLibraryAction () |
MultiLayerItem * | currentSample () |
QAction * | importSampleAction () |
QAction * | newSampleAction () |
void | selectFirstSample () |
Select first sample, if any sample exists. More... | |
void | setCurrentSample (MultiLayerItem *sample) |
QSize | sizeHint () const override |
Private Member Functions | |
void | createNewSample () |
QAction * | createRemoveAction (QObject *parent, MultiLayerItem *item) |
void | createSampleFromLibrary (const QString &classname, const QString &title, const QString &description) |
QList< QAction * > | getOverlayActions (const QModelIndex &index, bool asHover) |
void | importSampleFromPython () |
void | onCurrentChanged (const QModelIndex &index) |
void | removeSample (MultiLayerItem *item) |
void | showContextMenu (const QPoint &pos) |
Private Attributes | |
QAction * | m_chooseFromLibraryAction |
ProjectDocument * | m_document |
QAction * | m_importSampleAction |
SampleListModel * | m_model |
QAction * | m_newSampleAction |
SampleListView::SampleListView | ( | QWidget * | parent, |
ProjectDocument * | document | ||
) |
Definition at line 64 of file SampleListView.cpp.
References createNewSample(), createSampleFromLibrary(), GUI::ExamplesFactory::exampleInfo(), GUI::ExamplesFactory::exampleNames(), getOverlayActions(), importSampleFromPython(), ItemViewOverlayButtons::install(), m_chooseFromLibraryAction, m_importSampleAction, m_model, m_newSampleAction, onCurrentChanged(), ProjectDocument::sampleItems(), and showContextMenu().
QAction * SampleListView::chooseFromLibraryAction | ( | ) |
Definition at line 157 of file SampleListView.cpp.
References m_chooseFromLibraryAction.
Referenced by SampleView::SampleView().
|
private |
Definition at line 176 of file SampleListView.cpp.
References SampleListModel::createSample(), m_document, m_model, and ProjectDocument::setModified().
Referenced by SampleListView().
|
private |
Definition at line 227 of file SampleListView.cpp.
References removeSample().
Referenced by getOverlayActions(), and showContextMenu().
|
private |
Definition at line 183 of file SampleListView.cpp.
References SampleListModel::createSampleFromExamples(), m_document, m_model, and ProjectDocument::setModified().
Referenced by SampleListView().
MultiLayerItem * SampleListView::currentSample | ( | ) |
Definition at line 135 of file SampleListView.cpp.
References SampleListModel::itemForIndex(), and m_model.
Referenced by SampleView::onRequestViewInRealSpace(), and SampleView::showEvent().
|
signal |
Referenced by SampleView::SampleView(), and onCurrentChanged().
|
private |
Definition at line 204 of file SampleListView.cpp.
References createRemoveAction(), SampleListModel::itemForIndex(), and m_model.
Referenced by SampleListView().
QAction * SampleListView::importSampleAction | ( | ) |
Definition at line 152 of file SampleListView.cpp.
References m_importSampleAction.
Referenced by SampleView::SampleView().
|
private |
Definition at line 193 of file SampleListView.cpp.
References SampleListModel::createSampleFromPython(), m_document, m_model, and ProjectDocument::setModified().
Referenced by SampleListView().
QAction * SampleListView::newSampleAction | ( | ) |
Definition at line 147 of file SampleListView.cpp.
References m_newSampleAction.
Referenced by SampleView::SampleView().
|
private |
Definition at line 216 of file SampleListView.cpp.
References currentSampleChanged(), SampleListModel::itemForIndex(), and m_model.
Referenced by SampleListView().
|
slot |
|
private |
Definition at line 221 of file SampleListView.cpp.
References m_document, m_model, SampleListModel::removeSample(), and ProjectDocument::setModified().
Referenced by createRemoveAction().
void SampleListView::selectFirstSample | ( | ) |
Select first sample, if any sample exists.
Definition at line 140 of file SampleListView.cpp.
References m_document, ProjectDocument::sampleItems(), MultiLayerItems::sampleItems(), and setCurrentSample().
Referenced by SampleView::showEvent().
void SampleListView::setCurrentSample | ( | MultiLayerItem * | sample | ) |
Definition at line 130 of file SampleListView.cpp.
References SampleListModel::indexForItem(), and m_model.
Referenced by selectFirstSample().
|
private |
Definition at line 239 of file SampleListView.cpp.
References createRemoveAction(), SampleListModel::itemForIndex(), m_chooseFromLibraryAction, m_model, and m_newSampleAction.
Referenced by SampleListView().
|
override |
Definition at line 162 of file SampleListView.cpp.
|
private |
Definition at line 66 of file SampleListView.h.
Referenced by SampleListView(), chooseFromLibraryAction(), and showContextMenu().
|
private |
Definition at line 63 of file SampleListView.h.
Referenced by createNewSample(), createSampleFromLibrary(), importSampleFromPython(), removeSample(), and selectFirstSample().
|
private |
Definition at line 65 of file SampleListView.h.
Referenced by SampleListView(), and importSampleAction().
|
private |
Definition at line 62 of file SampleListView.h.
Referenced by SampleListView(), createNewSample(), createSampleFromLibrary(), currentSample(), getOverlayActions(), importSampleFromPython(), onCurrentChanged(), removeSample(), setCurrentSample(), and showContextMenu().
|
private |
Definition at line 64 of file SampleListView.h.
Referenced by SampleListView(), newSampleAction(), and showContextMenu().