BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Definition at line 28 of file InstrumentLibraryEditor.h.
Classes | |
class | TreeModel |
A model extension for InstrumentsTreeModel which. More... | |
Public Member Functions | |
InstrumentLibraryEditor (QWidget *parent) | |
~InstrumentLibraryEditor () override | |
void | execAdd (const InstrumentItem &instrumentToAdd) |
Execute the dialog to add an instrument to the library. More... | |
InstrumentItem * | execChoose () |
Execute the dialog for choosing an instrument from the library. Returns nullptr if canceled. More... | |
void | setDepthProbeEnabled (bool b) |
void | setGisasEnabled (bool b) |
void | setOffspecEnabled (bool b) |
void | setSpecularEnabled (bool b) |
Private Member Functions | |
void | createWidgetsForCurrentInstrument () |
QList< QAction * > | getOverlayActions (const QModelIndex &index, bool asHover) |
void | onCurrentChangedForChoose () |
void | onInstrumentChangedByEditor () |
void | onInstrumentDescriptionEdited (const QString &t) |
void | onInstrumentNameEdited (const QString &newName) |
void | onItemDoubleClickedForChoose (const QModelIndex &index) |
Private Attributes | |
InstrumentItem * | m_chosenItem |
TreeModel * | m_treeModel |
Ui::InstrumentLibraryEditor * | m_ui |
InstrumentLibraryEditor::InstrumentLibraryEditor | ( | QWidget * | parent | ) |
Definition at line 36 of file InstrumentLibraryEditor.cpp.
References appSettings, InstrumentsTreeModel::enableEmptyHeadlines(), ApplicationSettings::loadWindowSizeAndPos(), m_treeModel, m_ui, and GUI::Util::Style::setResizable().
|
override |
Definition at line 71 of file InstrumentLibraryEditor.cpp.
References appSettings, and ApplicationSettings::saveWindowSizeAndPos().
|
private |
Definition at line 182 of file InstrumentLibraryEditor.cpp.
References DepthProbeInstrumentEditor::dataChanged(), GISASInstrumentEditor::dataChanged(), OffspecInstrumentEditor::dataChanged(), SpecularInstrumentEditor::dataChanged(), InstrumentLibrary::editController(), gSessionData, GroupBoxCollapser::installIntoGroupBox(), SessionData::instrumentLibrary, InstrumentsTreeModel::itemForIndex(), m_treeModel, m_ui, onInstrumentChangedByEditor(), onInstrumentDescriptionEdited(), and onInstrumentNameEdited().
Referenced by execAdd(), and onCurrentChangedForChoose().
void InstrumentLibraryEditor::execAdd | ( | const InstrumentItem & | instrumentToAdd | ) |
Execute the dialog to add an instrument to the library.
Definition at line 116 of file InstrumentLibraryEditor.cpp.
References InstrumentLibrary::add(), createWidgetsForCurrentInstrument(), gSessionData, InstrumentsTreeModel::indexForItem(), ItemViewOverlayButtons::install(), SessionData::instrumentLibrary, InstrumentItem::instrumentName(), InstrumentsTreeModel::instrumentType(), m_treeModel, m_ui, InstrumentLibraryEditor::TreeModel::setNewInstrument(), InstrumentsTreeModel::setTypeEnabled(), and InstrumentLibrary::suggestName().
Referenced by InstrumentListView::onStoreInLibrary().
InstrumentItem * InstrumentLibraryEditor::execChoose | ( | ) |
Execute the dialog for choosing an instrument from the library. Returns nullptr if canceled.
Definition at line 96 of file InstrumentLibraryEditor.cpp.
References ItemViewOverlayButtons::install(), m_chosenItem, m_ui, onCurrentChangedForChoose(), and onItemDoubleClickedForChoose().
Referenced by InstrumentListView::onLoadFromLibrary().
|
private |
Definition at line 159 of file InstrumentLibraryEditor.cpp.
References InstrumentsTreeModel::isHeadline(), InstrumentsTreeModel::itemForIndex(), m_treeModel, and InstrumentsTreeModel::removeItem().
|
private |
Definition at line 152 of file InstrumentLibraryEditor.cpp.
References createWidgetsForCurrentInstrument(), InstrumentsTreeModel::itemForIndex(), m_chosenItem, m_treeModel, and m_ui.
Referenced by execChoose().
|
private |
Definition at line 261 of file InstrumentLibraryEditor.cpp.
References InstrumentLibrary::editController(), gSessionData, SessionData::instrumentLibrary, InstrumentsTreeModel::itemForIndex(), m_treeModel, m_ui, and InstrumentsEditController::notifyInstrumentChanged().
Referenced by createWidgetsForCurrentInstrument().
|
private |
Definition at line 255 of file InstrumentLibraryEditor.cpp.
References m_treeModel, m_ui, and InstrumentsTreeModel::setData().
Referenced by createWidgetsForCurrentInstrument().
|
private |
Definition at line 249 of file InstrumentLibraryEditor.cpp.
References m_treeModel, m_ui, and InstrumentsTreeModel::setData().
Referenced by createWidgetsForCurrentInstrument().
|
private |
Definition at line 145 of file InstrumentLibraryEditor.cpp.
References InstrumentsTreeModel::itemForIndex(), m_chosenItem, and m_treeModel.
Referenced by execChoose().
void InstrumentLibraryEditor::setDepthProbeEnabled | ( | bool | b | ) |
Definition at line 91 of file InstrumentLibraryEditor.cpp.
References InstrumentsTreeModel::DepthProbe, m_treeModel, and InstrumentsTreeModel::setTypeEnabled().
Referenced by InstrumentListView::onLoadFromLibrary(), and InstrumentListView::onStoreInLibrary().
void InstrumentLibraryEditor::setGisasEnabled | ( | bool | b | ) |
Definition at line 76 of file InstrumentLibraryEditor.cpp.
References InstrumentsTreeModel::Gisas, m_treeModel, and InstrumentsTreeModel::setTypeEnabled().
Referenced by InstrumentListView::onLoadFromLibrary(), and InstrumentListView::onStoreInLibrary().
void InstrumentLibraryEditor::setOffspecEnabled | ( | bool | b | ) |
Definition at line 81 of file InstrumentLibraryEditor.cpp.
References m_treeModel, InstrumentsTreeModel::Offspec, and InstrumentsTreeModel::setTypeEnabled().
Referenced by InstrumentListView::onLoadFromLibrary(), and InstrumentListView::onStoreInLibrary().
void InstrumentLibraryEditor::setSpecularEnabled | ( | bool | b | ) |
Definition at line 86 of file InstrumentLibraryEditor.cpp.
References m_treeModel, InstrumentsTreeModel::setTypeEnabled(), and InstrumentsTreeModel::Specular.
Referenced by InstrumentListView::onLoadFromLibrary(), and InstrumentListView::onStoreInLibrary().
|
private |
Definition at line 76 of file InstrumentLibraryEditor.h.
Referenced by execChoose(), onCurrentChangedForChoose(), and onItemDoubleClickedForChoose().
|
private |
Definition at line 75 of file InstrumentLibraryEditor.h.
Referenced by InstrumentLibraryEditor(), createWidgetsForCurrentInstrument(), execAdd(), getOverlayActions(), onCurrentChangedForChoose(), onInstrumentChangedByEditor(), onInstrumentDescriptionEdited(), onInstrumentNameEdited(), onItemDoubleClickedForChoose(), setDepthProbeEnabled(), setGisasEnabled(), setOffspecEnabled(), and setSpecularEnabled().
|
private |
Definition at line 74 of file InstrumentLibraryEditor.h.
Referenced by InstrumentLibraryEditor(), createWidgetsForCurrentInstrument(), execAdd(), execChoose(), onCurrentChangedForChoose(), onInstrumentChangedByEditor(), onInstrumentDescriptionEdited(), and onInstrumentNameEdited().