BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The RealDataPropertiesWidget class holds instrument selector to link with RealDataItem. Part of RealDataSelectorWidget, resides at lower left corner of ImportDataView.
Definition at line 27 of file RealDataPropertiesWidget.h.
Public Member Functions | |
RealDataPropertiesWidget (QWidget *parent, ProjectDocument *document) | |
QSize | minimumSizeHint () const override |
void | setItem (RealDataItem *item) |
Set current RealDataItem to display in instrument selector. More... | |
QSize | sizeHint () const override |
Private Member Functions | |
void | onInstrumentComboIndexChanged (int index) |
Processes user interaction with instrument selector combo. If there is realDataItem, it will be linked with selected instrument. More... | |
void | updateInstrumentComboEntries () |
Updates instrument selector for new instruments and their names. Current selection will be preserved. More... | |
void | updateInstrumentComboIndex () |
Sets instrument combo selector to the state corresponding to given instrument identifier. More... | |
Private Attributes | |
RealDataItem * | m_currentDataItem |
ProjectDocument * | m_document |
QComboBox * | m_instrumentCombo |
RealDataPropertiesWidget::RealDataPropertiesWidget | ( | QWidget * | parent, |
ProjectDocument * | document | ||
) |
Definition at line 26 of file RealDataPropertiesWidget.cpp.
References InstrumentsEditController::instrumentAddedOrRemoved(), InstrumentsEditController::instrumentNameChanged(), ProjectDocument::instrumentsEditController(), ProjectDocument::linkInstrumentManager(), LinkInstrumentManager::linkToInstrumentChanged(), m_document, m_instrumentCombo, onInstrumentComboIndexChanged(), updateInstrumentComboEntries(), and updateInstrumentComboIndex().
|
inlineoverride |
Definition at line 33 of file RealDataPropertiesWidget.h.
|
private |
Processes user interaction with instrument selector combo. If there is realDataItem, it will be linked with selected instrument.
Definition at line 73 of file RealDataPropertiesWidget.cpp.
References LinkInstrumentManager::canLinkDataToInstrument(), ProjectDocument::collectedItems(), InstrumentCollection::findInstrumentById(), RealDataItem::instrumentId(), ProjectDocument::linkInstrumentManager(), RealDataItem::linkToInstrument(), m_currentDataItem, m_document, m_instrumentCombo, GUI::Global::mainWindow, and updateInstrumentComboIndex().
Referenced by RealDataPropertiesWidget().
void RealDataPropertiesWidget::setItem | ( | RealDataItem * | item | ) |
Set current RealDataItem to display in instrument selector.
Definition at line 66 of file RealDataPropertiesWidget.cpp.
References m_currentDataItem, and updateInstrumentComboIndex().
Referenced by RealDataSelectorWidget::onSelectionChanged().
|
inlineoverride |
Definition at line 32 of file RealDataPropertiesWidget.h.
|
private |
Updates instrument selector for new instruments and their names. Current selection will be preserved.
Definition at line 96 of file RealDataPropertiesWidget.cpp.
References InstrumentCollection::collectedItems(), ProjectDocument::collectedItems(), m_document, m_instrumentCombo, and updateInstrumentComboIndex().
Referenced by RealDataPropertiesWidget().
|
private |
Sets instrument combo selector to the state corresponding to given instrument identifier.
Definition at line 112 of file RealDataPropertiesWidget.cpp.
References RealDataItem::instrumentId(), m_currentDataItem, and m_instrumentCombo.
Referenced by RealDataPropertiesWidget(), onInstrumentComboIndexChanged(), setItem(), and updateInstrumentComboEntries().
|
private |
Definition at line 47 of file RealDataPropertiesWidget.h.
Referenced by onInstrumentComboIndexChanged(), setItem(), and updateInstrumentComboIndex().
|
private |
Definition at line 48 of file RealDataPropertiesWidget.h.
Referenced by RealDataPropertiesWidget(), onInstrumentComboIndexChanged(), and updateInstrumentComboEntries().
|
private |
Definition at line 46 of file RealDataPropertiesWidget.h.
Referenced by RealDataPropertiesWidget(), onInstrumentComboIndexChanged(), updateInstrumentComboEntries(), and updateInstrumentComboIndex().