16 #include "Device/Coord/ICoordSystem.h"
27 auto* job_item = view_item->
jobItem();
28 ASSERT(job_item->instrumentItem());
30 return job_item->instrumentItem()->createCoordSystem();
44 std::unique_ptr<ICoordSystem> converter{getConverter(view_item)};
47 auto current_units = selectedUnits(view_item);
48 view_item->
setXaxisTitle(QString::fromStdString(converter->axisName(0, current_units)));
49 if (converter->rank() > 1)
50 view_item->
setYaxisTitle(QString::fromStdString(converter->axisName(1, current_units)));
59 auto* converter = getConverter(view_item);
60 auto current_units = selectedUnits(view_item);
62 auto result = std::make_unique<Datafield>(converter->convertedAxes(current_units));
64 result->setVector(data_item->
getDatafield()->flatVector());
Defines namespace GUI::Util::CoordName.
Defines class Data1DViewItem.
Defines namespace GUI::Model::DataViewUtils.
Defines class InstrumentItem and all its children.
View model for 1D DataItem. Can represent several items at once. In current implementation the first ...
JobItem * jobItem()
Returns either parenting JobItem or job item set with DataItem1DView::setJobItem.
void setXaxisTitle(const QString &title)
void setYaxisTitle(const QString &title)
ComboProperty axesUnits() const
Abstract base class for IntensityDataItem and SpecularDataItem. Owns one simulated data set of type D...
Datafield * getDatafield()
std::unique_ptr< Datafield > getTranslatedData(Data1DViewItem *view_item, DataItem *data_item)
void updateAxesTitle(Data1DViewItem *view_item)
Coords coordFromName(const QString &name)
Returns domain axes units type from their GUI name.