BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Contains convenience methods to trasfer data from domain simulation to IntensityDataItem. Used to modify Datafield's axes units as requested by IntensityDataItem.
Functions | |
ComboProperty | availableUnits (const ICoordSystem &converter) |
void | createDefaultDetectorMap (DataItem *intensityItem, const Instrument2DItem *instrumentItem) |
void | setIntensityItemCoords (DataItem *intensityItem, const ICoordSystem &converter) |
void | setIntensityItemCoords (DataItem *intensityItem, const InstrumentItem *instrumentItem) |
Sets axes units suitable for given instrument. More... | |
void | setResults (DataItem *intensityItem, const SimulationResult &result) |
Sets simulation results into the DataItem. More... | |
void | updateDataAxes (DataItem *intensityItem, const InstrumentItem *instrumentItem) |
updates axes of Datafield in IntensityData item More... | |
ComboProperty GUI::Model::JobItemUtils::availableUnits | ( | const ICoordSystem & | converter | ) |
Definition at line 103 of file JobItemUtils.cpp.
References GUI::Util::CoordName::nameFromCoord(), and ComboProperty::setValue().
Referenced by GUI::Model::JobFunctions::initDataView(), and setIntensityItemCoords().
void GUI::Model::JobItemUtils::createDefaultDetectorMap | ( | DataItem * | intensityItem, |
const Instrument2DItem * | instrumentItem | ||
) |
Definition at line 82 of file JobItemUtils.cpp.
References InstrumentItem::createCoordSystem(), DataItem::setDatafield(), setIntensityItemCoords(), and GUI::Model::DataViewUtils::updateAxesTitle().
void GUI::Model::JobItemUtils::setIntensityItemCoords | ( | DataItem * | intensityItem, |
const ICoordSystem & | converter | ||
) |
Definition at line 75 of file JobItemUtils.cpp.
References availableUnits(), and DataItem::setAxesUnits().
void GUI::Model::JobItemUtils::setIntensityItemCoords | ( | DataItem * | intensityItem, |
const InstrumentItem * | instrumentItem | ||
) |
Sets axes units suitable for given instrument.
Definition at line 66 of file JobItemUtils.cpp.
References InstrumentItem::createCoordSystem().
Referenced by createDefaultDetectorMap(), setResults(), and RealDataItem::updateToInstrument().
void GUI::Model::JobItemUtils::setResults | ( | DataItem * | intensityItem, |
const SimulationResult & | result | ||
) |
Sets simulation results into the DataItem.
Definition at line 92 of file JobItemUtils.cpp.
References GUI::Util::CoordName::coordFromName(), DataItem::getDatafield(), DataItem::selectedCoords(), DataItem::setDatafield(), setIntensityItemCoords(), and GUI::Model::DataViewUtils::updateAxesTitle().
Referenced by JobItem::setResults().
void GUI::Model::JobItemUtils::updateDataAxes | ( | DataItem * | intensityItem, |
const InstrumentItem * | instrumentItem | ||
) |
updates axes of Datafield in IntensityData item
Updates axes of Datafield in IntensityData item to correspond with ::P_AXES_UNITS selection. InstrumentItem is used to get domain's detector map for given units.
Definition at line 37 of file JobItemUtils.cpp.
References GUI::Util::CoordName::coordFromName(), InstrumentItem::createCoordSystem(), DataItem::getDatafield(), DataItem::selectedCoords(), DataItem::setAxesRangeToData(), DataItem::setDatafield(), and GUI::Model::DataViewUtils::updateAxesTitle().
Referenced by IntensityDataItem::updateCoords(), and SpecularDataItem::updateCoords().