BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Instrument selector on the left side of InstrumentView.
Definition at line 29 of file InstrumentListView.h.
Signals | |
void | instrumentSelected (InstrumentItem *instrument) |
Public Member Functions | |
InstrumentListView (ProjectDocument *document, QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags()) | |
InstrumentItem * | currentInstrument () const |
QSize | minimumSizeHint () const override |
QSize | sizeHint () const override |
QList< QAction * > | toolbarActions () const |
Private Slots | |
void | onCopy () |
Makes a copy of the currently selected instrument. More... | |
void | onItemSelectionChanged () |
void | onLoadFromLibrary () |
void | onNewDepthProbe () |
void | onNewGisas () |
void | onNewOffspec () |
void | onNewSpecular () |
void | onRemove () |
Removes currently selected instrument. More... | |
void | onStoreInLibrary () |
Private Member Functions | |
void | ensureItemSelected () |
void | updateActions () |
void | updateFunctionalityNarrowing () |
Show/hide UI elements according to settings in current project. More... | |
Private Attributes | |
QAction * | m_copyAction |
ProjectDocument * | m_document |
QListView * | m_listView |
QAction * | m_loadFromLibraryAction |
InstrumentListModel * | m_model |
QAction * | m_newDepthProbeAction |
QAction * | m_newGisasAction |
QAction * | m_newOffspecAction |
QAction * | m_newSpecularAction |
QAction * | m_removeAction |
QAction * | m_separatorAction1 |
QAction * | m_separatorAction2 |
QAction * | m_storeInLibraryAction |
InstrumentListView::InstrumentListView | ( | ProjectDocument * | document, |
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | f = Qt::WindowFlags() |
||
) |
Definition at line 27 of file InstrumentListView.cpp.
References ensureItemSelected(), ProjectDocument::instrumentsEditController(), m_copyAction, m_document, m_listView, m_loadFromLibraryAction, m_model, m_newDepthProbeAction, m_newGisasAction, m_newOffspecAction, m_newSpecularAction, m_removeAction, m_separatorAction1, m_separatorAction2, m_storeInLibraryAction, ProjectDocument::modified(), onCopy(), onItemSelectionChanged(), onLoadFromLibrary(), onNewDepthProbe(), onNewGisas(), onNewOffspec(), onNewSpecular(), onRemove(), onStoreInLibrary(), updateActions(), and updateFunctionalityNarrowing().
InstrumentItem * InstrumentListView::currentInstrument | ( | ) | const |
Definition at line 148 of file InstrumentListView.cpp.
References InstrumentListModel::instrumentForIndex(), m_listView, and m_model.
Referenced by InstrumentView::createWidgetsForCurrentInstrument(), InstrumentView::onInstrumentChangedByEditor(), InstrumentView::onInstrumentChangedFromExternal(), InstrumentView::onInstrumentdescriptionEdited(), and InstrumentView::onInstrumentNameEdited().
|
private |
Definition at line 269 of file InstrumentListView.cpp.
References m_listView, m_model, and InstrumentListModel::rowCount().
Referenced by InstrumentListView(), and onRemove().
|
signal |
Referenced by InstrumentView::InstrumentView(), and onItemSelectionChanged().
|
override |
Definition at line 135 of file InstrumentListView.cpp.
|
privateslot |
Makes a copy of the currently selected instrument.
Definition at line 203 of file InstrumentListView.cpp.
References InstrumentListModel::copyInstrument(), m_listView, and m_model.
Referenced by InstrumentListView().
|
privateslot |
Definition at line 156 of file InstrumentListView.cpp.
References InstrumentListModel::instrumentForIndex(), instrumentSelected(), m_listView, m_model, and updateActions().
Referenced by InstrumentListView().
|
privateslot |
Definition at line 228 of file InstrumentListView.cpp.
References InstrumentListModel::copyInstrument(), ProjectDocument::DepthProbe, InstrumentLibraryEditor::execChoose(), ProjectDocument::functionalities(), ProjectDocument::Gisas, gSessionData, GUI::View::Helpers::information(), SessionData::instrumentLibrary, InstrumentLibrary::isEmpty(), m_document, m_listView, m_model, GUI::Global::mainWindow, ProjectDocument::Offspec, InstrumentLibraryEditor::setDepthProbeEnabled(), InstrumentLibraryEditor::setGisasEnabled(), InstrumentLibraryEditor::setOffspecEnabled(), InstrumentLibraryEditor::setSpecularEnabled(), and ProjectDocument::Specular.
Referenced by InstrumentListView().
|
privateslot |
Definition at line 185 of file InstrumentListView.cpp.
References InstrumentListModel::addNewDepthProbeInstrument(), m_listView, and m_model.
Referenced by InstrumentListView().
|
privateslot |
Definition at line 167 of file InstrumentListView.cpp.
References InstrumentListModel::addNewGISASInstrument(), m_listView, and m_model.
Referenced by InstrumentListView().
|
privateslot |
Definition at line 173 of file InstrumentListView.cpp.
References InstrumentListModel::addNewOffspecInstrument(), m_listView, and m_model.
Referenced by InstrumentListView().
|
privateslot |
Definition at line 179 of file InstrumentListView.cpp.
References InstrumentListModel::addNewSpecularInstrument(), m_listView, and m_model.
Referenced by InstrumentListView().
|
privateslot |
Removes currently selected instrument.
Definition at line 192 of file InstrumentListView.cpp.
References ensureItemSelected(), m_listView, m_model, and InstrumentListModel::removeInstrument().
Referenced by InstrumentListView().
|
privateslot |
Definition at line 212 of file InstrumentListView.cpp.
References ProjectDocument::DepthProbe, InstrumentLibraryEditor::execAdd(), ProjectDocument::functionalities(), ProjectDocument::Gisas, InstrumentListModel::instrumentForIndex(), m_document, m_listView, m_model, GUI::Global::mainWindow, ProjectDocument::Offspec, InstrumentLibraryEditor::setDepthProbeEnabled(), InstrumentLibraryEditor::setGisasEnabled(), InstrumentLibraryEditor::setOffspecEnabled(), InstrumentLibraryEditor::setSpecularEnabled(), and ProjectDocument::Specular.
Referenced by InstrumentListView().
|
override |
Definition at line 130 of file InstrumentListView.cpp.
QList< QAction * > InstrumentListView::toolbarActions | ( | ) | const |
Definition at line 140 of file InstrumentListView.cpp.
References m_copyAction, m_loadFromLibraryAction, m_newDepthProbeAction, m_newGisasAction, m_newOffspecAction, m_newSpecularAction, m_removeAction, m_separatorAction1, m_separatorAction2, and m_storeInLibraryAction.
Referenced by InstrumentView::InstrumentView().
|
private |
Definition at line 261 of file InstrumentListView.cpp.
References m_copyAction, m_listView, m_removeAction, and m_storeInLibraryAction.
Referenced by InstrumentListView(), and onItemSelectionChanged().
|
private |
Show/hide UI elements according to settings in current project.
Definition at line 250 of file InstrumentListView.cpp.
References ProjectDocument::DepthProbe, ProjectDocument::functionalities(), ProjectDocument::Gisas, m_copyAction, m_document, m_newDepthProbeAction, m_newGisasAction, m_newOffspecAction, m_newSpecularAction, ProjectDocument::Offspec, ProjectDocument::singleInstrumentMode(), and ProjectDocument::Specular.
Referenced by InstrumentListView().
|
private |
Definition at line 76 of file InstrumentListView.h.
Referenced by InstrumentListView(), toolbarActions(), updateActions(), and updateFunctionalityNarrowing().
|
private |
Definition at line 67 of file InstrumentListView.h.
Referenced by InstrumentListView(), onLoadFromLibrary(), onStoreInLibrary(), and updateFunctionalityNarrowing().
|
private |
Definition at line 68 of file InstrumentListView.h.
Referenced by InstrumentListView(), currentInstrument(), ensureItemSelected(), onCopy(), onItemSelectionChanged(), onLoadFromLibrary(), onNewDepthProbe(), onNewGisas(), onNewOffspec(), onNewSpecular(), onRemove(), onStoreInLibrary(), and updateActions().
|
private |
Definition at line 79 of file InstrumentListView.h.
Referenced by InstrumentListView(), and toolbarActions().
|
private |
Definition at line 69 of file InstrumentListView.h.
Referenced by InstrumentListView(), currentInstrument(), ensureItemSelected(), onCopy(), onItemSelectionChanged(), onLoadFromLibrary(), onNewDepthProbe(), onNewGisas(), onNewOffspec(), onNewSpecular(), onRemove(), and onStoreInLibrary().
|
private |
Definition at line 73 of file InstrumentListView.h.
Referenced by InstrumentListView(), toolbarActions(), and updateFunctionalityNarrowing().
|
private |
Definition at line 70 of file InstrumentListView.h.
Referenced by InstrumentListView(), toolbarActions(), and updateFunctionalityNarrowing().
|
private |
Definition at line 71 of file InstrumentListView.h.
Referenced by InstrumentListView(), toolbarActions(), and updateFunctionalityNarrowing().
|
private |
Definition at line 72 of file InstrumentListView.h.
Referenced by InstrumentListView(), toolbarActions(), and updateFunctionalityNarrowing().
|
private |
Definition at line 75 of file InstrumentListView.h.
Referenced by InstrumentListView(), toolbarActions(), and updateActions().
|
private |
Definition at line 74 of file InstrumentListView.h.
Referenced by InstrumentListView(), and toolbarActions().
|
private |
Definition at line 77 of file InstrumentListView.h.
Referenced by InstrumentListView(), and toolbarActions().
|
private |
Definition at line 78 of file InstrumentListView.h.
Referenced by InstrumentListView(), toolbarActions(), and updateActions().