23 template <
class DataItemType>
26 ASSERT(parent &&
"Assertion failed in GUI::Model::DataItemUtils::dataItem: nullptr passed.");
29 return dynamic_cast<DataItemType*
>(
dynamic_cast<JobItem*
>(parent)->dataItem());
30 if (
auto* real_data =
dynamic_cast<RealDataItem*
>(parent))
31 return dynamic_cast<DataItemType*
>(real_data->dataItem());
32 if (
auto*
self =
dynamic_cast<DataItemType*
>(parent))
41 return dataItem<IntensityDataItem>(parent);
46 return dataItem<SpecularDataItem>(parent);
Defines functions in namespace GUI::Model::DataItemUtils.
Defines class IntensityDataItem.
Defines class RealDataItem.
Defines class SpecularDataItem.
static constexpr auto M_TYPE
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
Base class for a GUI data item.
QString modelType() const
Get model type.
SpecularDataItem * specularDataItem(SessionItem *parent)
Returns SpecularDataItem contained as a child in givent parent.
IntensityDataItem * intensityDataItem(SessionItem *parent)
Returns IntensityDataItem contained as a child in givent parent.