15 #ifndef BORNAGAIN_GUI_MODEL_DEVICE_INSTRUMENTITEMS_H
16 #define BORNAGAIN_GUI_MODEL_DEVICE_INSTRUMENTITEMS_H
30 class DepthProbeSimulation;
36 class OffspecSimulation;
37 class ScatteringSimulation;
52 void setId(
const QString&
id);
63 return dynamic_cast<const T*
>(
this) !=
nullptr;
76 virtual std::vector<int>
shape()
const = 0;
117 std::vector<int>
shape()
const override;
134 std::vector<int>
shape()
const override;
141 DepthProbeSimulation* createSimulation(
const MultiLayer& sample)
const;
155 template <
typename T>
156 T* setDetectorType();
161 std::unique_ptr<Instrument> createInstrument()
const;
162 ScatteringSimulation* createScatteringSimulation(
const MultiLayer& sample)
const;
163 OffspecSimulation* createOffspecSimulation(
const MultiLayer& sample)
const;
176 std::vector<int>
shape()
const override;
190 std::vector<int>
shape()
const override;
204 template <
typename T>
211 template <
typename T>
214 m_detectorItem.set<T>();
215 return dynamic_cast<T*
>(m_detectorItem.get());
Defines class AxisProperty.
Defines BackgroundItem classes.
Defines BeamItem hierarchy.
Defines classes DetectorItems.
Defines class SelectionDescriptor.
Defines class SelectionProperty.
Defines class VectorProperty.
Abstract base class for IntensityDataItem and SpecularDataItem. Owns one simulated data set of type D...
static bool isDetectorPropertyName(const QString &name)
SelectionProperty< DetectorItem * > m_detectorItem
GroupItem * detectorGroup()
Abstract base class for instrument-specific item classes.
virtual void updateToRealData(const RealDataItem *item)=0
InstrumentItem * createCopy() const
Creates an exact copy; also ID is the same!
virtual QString defaultName() const =0
The default user visible name when creating an instrument.
QString instrumentName() const
bool withPolarizerAnalyzer() const
void setId(const QString &id)
VECTOR_PROPERTY(analyzerDirection, AnalyzerDirection)
virtual std::vector< int > shape() const =0
void setDescription(const QString &description)
virtual BeamItem * beamItem() const
std::unique_ptr< BeamItem > m_beamItem
virtual ICoordSystem * createCoordSystem() const =0
void setWithPolarizerAnalyzer(bool with)
virtual QString instrumentType() const =0
The type as how to show it on the UI. Do not use for type checking or similar!
DOUBLE_PROPERTY(analyzerTotalTransmission, AnalyzerTotalTransmission)
SelectionDescriptor< BackgroundItem * > backgroundSelection() const
VECTOR_PROPERTY(polarization, Polarization)
void setInstrumentName(const QString &instrumentName)
virtual void serialize(Streamer &s)
SelectionProperty< BackgroundItem * > m_backgroundItem
virtual bool alignedWith(const RealDataItem *item) const
BackgroundItem * backgroundItem() const
virtual void importMasks(const MaskContainerItem *)
bool m_withPolarizerAnalyzer
virtual ~InstrumentItem()=default
QString description() const
Assembles beam, detector and their relative positions with respect to the sample.
Container holding various masks as children.
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
Describes a selection (various possibilities and the current one).
Class for representing a selection, its attributes and its accessors.
void set(T t, bool callInitializer=false)
Directly set the new item.
T get() const
Direct access to the stored pointer.
Supports serialization to or deserialization from QXmlStream.
QString const & name(EShape k)