BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
GUI::Util::CoordName Namespace Reference

Functions

Coords coordFromName (const QString &name)
 Returns domain axes units type from their GUI name. More...
 
QString nameFromCoord (Coords units)
 Returns axes units names from their domain counterpart. More...
 

Function Documentation

◆ coordFromName()

Coords GUI::Util::CoordName::coordFromName ( const QString &  name)

Returns domain axes units type from their GUI name.

Correspondence of GUI axes units names to their domain counterpart.

Definition at line 46 of file CoordName.cpp.

47 {
48  return units_from_names.at(name);
49 }
QString const & name(EShape k)
Definition: particles.cpp:20

References GUI::RealSpace::Particles::name().

Referenced by SpecularInstrumentItem::createCoordSystem(), GUI::Model::JobItemUtils::setResults(), and GUI::Model::JobItemUtils::updateDataAxes().

Here is the call graph for this function:

◆ nameFromCoord()

QString GUI::Util::CoordName::nameFromCoord ( Coords  units)

Returns axes units names from their domain counterpart.

Correspondence of domain detector axes types to their GUI counterpart.

Definition at line 36 of file CoordName.cpp.

37 {
38  const auto it = names_from_coords.find(units);
39  if (it == names_from_coords.end())
40  return "";
41  return it->second;
42 }

Referenced by GUI::Model::JobItemUtils::availableUnits(), QREDataLoader::datafieldFromParsingResult(), and ImportDataInfo::unitsLabel().