BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Abstract base class for instrument-specific item classes.
Definition at line 41 of file InstrumentItems.h.
Public Member Functions | |
InstrumentItem () | |
virtual | ~InstrumentItem ()=default |
virtual bool | alignedWith (const RealDataItem *item) const |
BackgroundItem * | backgroundItem () const |
SelectionDescriptor< BackgroundItem * > | backgroundSelection () const |
virtual BeamItem * | beamItem () const |
virtual ICoordSystem * | createCoordSystem () const =0 |
InstrumentItem * | createCopy () const |
Creates an exact copy; also ID is the same! More... | |
virtual QString | defaultName () const =0 |
The default user visible name when creating an instrument. More... | |
QString | description () const |
DOUBLE_PROPERTY (analyzerTotalTransmission, AnalyzerTotalTransmission) | |
QString | id () const |
virtual void | importMasks (const MaskContainerItem *) |
QString | instrumentName () const |
virtual QString | instrumentType () const =0 |
The type as how to show it on the UI. Do not use for type checking or similar! More... | |
template<typename T > | |
bool | is () const |
virtual void | serialize (Streamer &s) |
template<typename T > | |
T * | setBackgroundType () |
void | setDescription (const QString &description) |
void | setId (const QString &id) |
void | setInstrumentName (const QString &instrumentName) |
void | setWithPolarizerAnalyzer (bool with) |
virtual std::vector< int > | shape () const =0 |
virtual void | updateToRealData (const RealDataItem *item)=0 |
VECTOR_PROPERTY (analyzerDirection, AnalyzerDirection) | |
VECTOR_PROPERTY (polarization, Polarization) | |
bool | withPolarizerAnalyzer () const |
Protected Member Functions | |
InstrumentItem (const QString &modelType) | |
template<typename T > | |
T * | beam () const |
Protected Attributes | |
SelectionProperty< BackgroundItem * > | m_backgroundItem |
std::unique_ptr< BeamItem > | m_beamItem |
QString | m_description |
QString | m_id |
QString | m_name |
bool | m_withPolarizerAnalyzer |
InstrumentItem::InstrumentItem | ( | ) |
Definition at line 59 of file InstrumentItems.cpp.
References SelectionProperty< T >::init(), m_backgroundItem, m_id, and unitless.
|
virtualdefault |
|
explicitprotected |
|
virtual |
Reimplemented in SpecularInstrumentItem.
Definition at line 129 of file InstrumentItems.cpp.
References RealDataItem::shape(), and shape().
Referenced by LinkInstrumentManager::onInstrumentChanged(), and SimulationView::validateSimulationSetup().
BackgroundItem * InstrumentItem::backgroundItem | ( | ) | const |
Definition at line 119 of file InstrumentItems.cpp.
References SelectionProperty< T >::get(), and m_backgroundItem.
SelectionDescriptor< BackgroundItem * > InstrumentItem::backgroundSelection | ( | ) | const |
Definition at line 124 of file InstrumentItems.cpp.
References m_backgroundItem.
Referenced by EnvironmentEditor::EnvironmentEditor(), and EnvironmentEditor::createBackgroundWidgets().
|
protected |
Definition at line 145 of file InstrumentItems.cpp.
References m_beamItem.
Referenced by SpecularInstrumentItem::createCoordSystem(), Instrument2DItem::createInstrument(), Instrument2DItem::createOffspecSimulation(), and Instrument2DItem::createScatteringSimulation().
|
virtual |
Reimplemented in DepthProbeInstrumentItem, and SpecularInstrumentItem.
Definition at line 114 of file InstrumentItems.cpp.
References m_beamItem.
Referenced by GISASInstrumentEditor::GISASInstrumentEditor(), OffspecBeamEditor::OffspecBeamEditor(), OffspecInstrumentItem::OffspecInstrumentItem(), Instrument2DItem::createInstrument(), Instrument2DItem::createOffspecSimulation(), Instrument2DItem::createScatteringSimulation(), InstrumentEditController::notifyInclinationAxisChanged(), and InstrumentEditController::notifyWavelengthDistributionChanged().
|
pure virtual |
Implemented in OffspecInstrumentItem, GISASInstrumentItem, DepthProbeInstrumentItem, and SpecularInstrumentItem.
Referenced by GUI::Model::JobItemUtils::createDefaultDetectorMap(), GUI::Model::JobFunctions::initDataView(), GUI::Model::JobItemUtils::setIntensityItemCoords(), and GUI::Model::JobItemUtils::updateDataAxes().
InstrumentItem * InstrumentItem::createCopy | ( | ) | const |
Creates an exact copy; also ID is the same!
Definition at line 76 of file InstrumentItems.cpp.
References GUI::Util::copyContents(), InstrumentItemCatalog::create(), and InstrumentItemCatalog::type().
Referenced by JobItem::copyInstrumentIntoJob(), and InstrumentCollection::insertCopy().
|
pure virtual |
The default user visible name when creating an instrument.
Implemented in OffspecInstrumentItem, GISASInstrumentItem, DepthProbeInstrumentItem, and SpecularInstrumentItem.
QString InstrumentItem::description | ( | ) | const |
Definition at line 104 of file InstrumentItems.cpp.
References m_description.
Referenced by setDescription().
InstrumentItem::DOUBLE_PROPERTY | ( | analyzerTotalTransmission | , |
AnalyzerTotalTransmission | |||
) |
QString InstrumentItem::id | ( | ) | const |
Definition at line 84 of file InstrumentItems.cpp.
References m_id.
Referenced by RealDataItem::linkToInstrument(), LinkInstrumentManager::onInstrumentChanged(), and setId().
|
inlinevirtual |
QString InstrumentItem::instrumentName | ( | ) | const |
Definition at line 99 of file InstrumentItems.cpp.
References m_name.
Referenced by InstrumentListModel::copyInstrument(), InstrumentListModel::data(), InstrumentLibraryEditor::execAdd(), setInstrumentName(), InstrumentsEditController::setInstrumentName(), and GUI::Model::JobFunctions::setupJobItemInstrument().
|
pure virtual |
The type as how to show it on the UI. Do not use for type checking or similar!
Implemented in OffspecInstrumentItem, GISASInstrumentItem, DepthProbeInstrumentItem, and SpecularInstrumentItem.
|
inline |
Definition at line 61 of file InstrumentItems.h.
Referenced by JobResultsPresenter::defaultActivePresentationsOfInstrument(), JobResultsPresenter::defaultPresentationOfInstrument(), JobResultsPresenter::fitPresentationOfInstrument(), GUI::Model::JobFunctions::initDataView(), InstrumentsTreeModel::instrumentType(), JobItem::isSpecularJob(), GUI::Model::JobFunctions::setupJobItemForFit(), and GUI::Model::JobFunctions::setupJobItemOutput().
|
virtual |
Reimplemented in OffspecInstrumentItem, Instrument2DItem, and DepthProbeInstrumentItem.
Definition at line 150 of file InstrumentItems.cpp.
References Streamer::assertVersion(), m_backgroundItem, m_beamItem, m_description, m_id, m_name, m_withPolarizerAnalyzer, Serialize::rwClass(), Serialize::rwProperty(), and Serialize::rwValue().
T * InstrumentItem::setBackgroundType |
Definition at line 205 of file InstrumentItems.h.
References SelectionProperty< T >::get(), m_backgroundItem, and SelectionProperty< T >::set().
void InstrumentItem::setDescription | ( | const QString & | description | ) |
Definition at line 109 of file InstrumentItems.cpp.
References description(), and m_description.
Referenced by InstrumentView::onInstrumentdescriptionEdited(), and InstrumentsTreeModel::setData().
void InstrumentItem::setId | ( | const QString & | id | ) |
Definition at line 89 of file InstrumentItems.cpp.
Referenced by InstrumentCollection::insertCopy().
void InstrumentItem::setInstrumentName | ( | const QString & | instrumentName | ) |
Definition at line 94 of file InstrumentItems.cpp.
References instrumentName(), and m_name.
Referenced by InstrumentsEditController::addCopy(), InstrumentsTreeModel::setData(), InstrumentsEditController::setInstrumentName(), and GUI::Model::JobFunctions::setupJobItemInstrument().
void InstrumentItem::setWithPolarizerAnalyzer | ( | bool | with | ) |
Definition at line 139 of file InstrumentItems.cpp.
References m_withPolarizerAnalyzer.
Referenced by PolarizationAnalysisEditor::PolarizationAnalysisEditor().
|
pure virtual |
Implemented in OffspecInstrumentItem, GISASInstrumentItem, DepthProbeInstrumentItem, and SpecularInstrumentItem.
Referenced by alignedWith().
|
pure virtual |
Implemented in OffspecInstrumentItem, GISASInstrumentItem, DepthProbeInstrumentItem, and SpecularInstrumentItem.
Referenced by InstrumentsEditController::updateInstrumentToRealDataItem().
InstrumentItem::VECTOR_PROPERTY | ( | analyzerDirection | , |
AnalyzerDirection | |||
) |
InstrumentItem::VECTOR_PROPERTY | ( | polarization | , |
Polarization | |||
) |
bool InstrumentItem::withPolarizerAnalyzer | ( | ) | const |
Definition at line 134 of file InstrumentItems.cpp.
References m_withPolarizerAnalyzer.
Referenced by PolarizationAnalysisEditor::PolarizationAnalysisEditor(), and ParameterTreeBuilder::addPolarization().
|
protected |
Definition at line 106 of file InstrumentItems.h.
Referenced by InstrumentItem(), backgroundItem(), backgroundSelection(), serialize(), and setBackgroundType().
|
protected |
Definition at line 107 of file InstrumentItems.h.
Referenced by DepthProbeInstrumentItem::DepthProbeInstrumentItem(), Instrument2DItem::Instrument2DItem(), SpecularInstrumentItem::SpecularInstrumentItem(), beam(), beamItem(), and serialize().
|
protected |
Definition at line 104 of file InstrumentItems.h.
Referenced by description(), serialize(), and setDescription().
|
protected |
Definition at line 102 of file InstrumentItems.h.
Referenced by InstrumentItem(), id(), serialize(), and setId().
|
protected |
Definition at line 103 of file InstrumentItems.h.
Referenced by instrumentName(), serialize(), and setInstrumentName().
|
protected |
Definition at line 105 of file InstrumentItems.h.
Referenced by serialize(), setWithPolarizerAnalyzer(), and withPolarizerAnalyzer().