16 #include "Device/Histo/SimulationResult.h"
26 intensityItem->
setXaxisTitle(QString::fromStdString(converter.axisName(0, units)));
27 if (converter.rank() > 1)
28 intensityItem->
setYaxisTitle(QString::fromStdString(converter.axisName(1, units)));
40 ASSERT(intensityItem);
42 if (!instrumentItem) {
55 auto newData = std::make_unique<Datafield>(converter->convertedAxes(requested_units));
57 newData->setVector(intensityItem->
getDatafield()->flatVector());
76 const ICoordSystem& converter)
86 auto output_data = std::make_unique<Datafield>(converter->defaultAxes());
95 const auto& converter = result.converter();
100 intensityItem->
setDatafield(result.datafield(selected_units));
106 for (
auto units : converter.availableUnits()) {
108 if (!unit_name.isEmpty())
Defines namespace GUI::Util::CoordName.
Defines class InstrumentItem and all its children.
Defines namespace GUI::Model::JobItemUtils.
Custom property to define list of string values with multiple selections. Intended for QVariant.
void setValue(const QString &name)
Abstract base class for IntensityDataItem and SpecularDataItem. Owns one simulated data set of type D...
virtual void setAxesRangeToData()=0
virtual void setDatafield(Datafield *data)=0
The given pointer becomes owned by this class!!
virtual void setXaxisTitle(const QString &title)=0
Datafield * getDatafield()
QString selectedCoords() const
void setAxesUnits(const ComboProperty &units)
virtual void setYaxisTitle(const QString &title)=0
Abstract base class for instrument-specific item classes.
virtual ICoordSystem * createCoordSystem() const =0
void updateAxesTitle(Data1DViewItem *view_item)
void createDefaultDetectorMap(DataItem *intensityItem, const Instrument2DItem *instrumentItem)
void setResults(DataItem *intensityItem, const SimulationResult &result)
Sets simulation results into the DataItem.
ComboProperty availableUnits(const ICoordSystem &converter)
void setIntensityItemCoords(DataItem *intensityItem, const InstrumentItem *instrumentItem)
Sets axes units suitable for given instrument.
void updateDataAxes(DataItem *intensityItem, const InstrumentItem *instrumentItem)
updates axes of Datafield in IntensityData item
Coords coordFromName(const QString &name)
Returns domain axes units type from their GUI name.
QString nameFromCoord(Coords units)
Returns axes units names from their domain counterpart.