BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The LinkInstrumentManager class provides communication between InstrumentCollection and RealDataModel. Particularly, it notifies RealDataItem about changes in linked instruments to adjust axes of IntensityDataItem.
Definition at line 31 of file LinkInstrumentManager.h.
Signals | |
void | linkToInstrumentChanged (const RealDataItem *realDataItem) |
Public Member Functions | |
LinkInstrumentManager (ProjectDocument *document) | |
bool | canLinkDataToInstrument (const RealDataItem *realDataItem, const QString &identifier, QWidget *parent) |
Returns true if RealDataItem can be linked to the instrument (same number of bins). Also offers dialog to adjust instrument to match shape of real data. quiet defines whether a "not possible" message box is shown if link is not possible. Use this e.g. for unit tests. The question for adjusting the instrument is not suppressed by this flag. More... | |
Private Member Functions | |
void | onInstrumentAddedOrRemoved () |
void | onInstrumentChanged (const InstrumentItem *instrument) |
Private Attributes | |
ProjectDocument * | m_document |
LinkInstrumentManager::LinkInstrumentManager | ( | ProjectDocument * | document | ) |
Definition at line 68 of file LinkInstrumentManager.cpp.
References InstrumentsEditController::instrumentAddedOrRemoved(), InstrumentsEditController::instrumentChanged(), ProjectDocument::instrumentsEditController(), m_document, onInstrumentAddedOrRemoved(), and onInstrumentChanged().
bool LinkInstrumentManager::canLinkDataToInstrument | ( | const RealDataItem * | realDataItem, |
const QString & | identifier, | ||
QWidget * | parent | ||
) |
Returns true if RealDataItem can be linked to the instrument (same number of bins). Also offers dialog to adjust instrument to match shape of real data. quiet defines whether a "not possible" message box is shown if link is not possible. Use this e.g. for unit tests. The question for adjusting the instrument is not suppressed by this flag.
Definition at line 79 of file LinkInstrumentManager.cpp.
References ProjectDocument::collectedItems(), InstrumentCollection::findInstrumentById(), RealDataItem::hasNativeData(), RealDataItem::holdsDimensionalData(), ProjectDocument::instrumentsEditController(), RealDataItem::isSpecularData(), m_document, RealDataItem::shape(), InstrumentsEditController::updateInstrumentToRealDataItem(), and GUI::View::Helpers::warning().
Referenced by RealDataPropertiesWidget::onInstrumentComboIndexChanged().
|
signal |
Referenced by RealDataPropertiesWidget::RealDataPropertiesWidget(), and onInstrumentChanged().
|
private |
Definition at line 130 of file LinkInstrumentManager.cpp.
References ProjectDocument::collectedItems(), InstrumentCollection::instrumentExists(), m_document, RealDataModel::realDataItems(), and ProjectDocument::realDataModel().
Referenced by LinkInstrumentManager().
|
private |
Definition at line 116 of file LinkInstrumentManager.cpp.
References InstrumentItem::alignedWith(), InstrumentItem::id(), linkToInstrumentChanged(), m_document, RealDataModel::realDataItems(), and ProjectDocument::realDataModel().
Referenced by LinkInstrumentManager().
|
private |
Definition at line 53 of file LinkInstrumentManager.h.
Referenced by LinkInstrumentManager(), canLinkDataToInstrument(), onInstrumentAddedOrRemoved(), and onInstrumentChanged().