30 QVector<Data1DProperties*> result;
32 std::transform(source.begin(), source.end(), std::back_inserter(result),
33 [](
SessionItem*
item) { return dynamic_cast<Data1DProperties*>(item); });
43 ASSERT(property_item);
50 if (!basic_property_item)
52 return basic_property_item->dataItem();
58 throw Error(
"Error in DataPropertyContainer::addItem: hosting models are different");
66 property_item->setDataItem(data_item);
70 property_item->setScatterProperty(
"Disc");
71 property_item->setLineProperty(
"None");
73 property_item->setScatterProperty(
"None");
74 property_item->setLineProperty(
"Line");
80 std::vector<DataItem*> result;
82 std::transform(
items.begin(),
items.end(), std::back_inserter(result),
84 auto* data_item = item->dataItem();
Defines class DataProperties and its descendants.
Defines class DataPropertyContainer.
Defines class RealDataItem.
Holds data required for 1D DataItem representation.
static const QString & nextColorName(Data1DProperties *properties)
Returns the name of the color, which follows the color of passes property container....
static constexpr auto M_TYPE
Abstract base class for IntensityDataItem and SpecularDataItem. Owns one simulated data set of type D...
Data1DProperties * propertyItem(size_t i) const
void addItem(DataItem *data_item)
QVector< Data1DProperties * > propertyItems()
std::vector< DataItem * > dataItems()
DataItem * dataItem(size_t i) const
static constexpr auto T_CHILDREN
DataItem * basicDataItem() const
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
Base class for a GUI data item.
bool registerTag(const QString &name, int min=0, int max=-1, QStringList modelTypes={})
Add new tag to this item with given name, min, max and types. max = -1 -> unlimited,...
QVector< SessionItem * > getItems(const QString &tag="") const
Returns vector of all items of given tag.
void insertChild(int row, SessionItem *item, const QString &tag="")
Insert item into given tag into given row.
void setDefaultTag(const QString &tag)
Set default tag.
SessionModel * model() const
Returns model of this item.
T * item(const QString &tag) const
SessionItem * parentItem() const
Returns parent of this item.
QVector< T * > items(const QString &tag="") const
QVector< SessionItem * > children() const
Returns vector of all children.