15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_MODEL_COMPOUNDITEM_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_MODEL_COMPOUNDITEM_H
33 template <
typename T = PropertyItem> T* addProperty(
const std::string&
name);
35 template <
typename V>
PropertyItem* addProperty(
const std::string&
name,
const V& value);
40 std::string displayName()
const override;
47 property->setDisplayName(
name);
62 property->setDisplayName(
name);
63 property->setData(value);
65 if constexpr (std::is_floating_point_v<V>)
Complex item holding mixed SessionItem types (single properties and other CompountItems).
T * addProperty(const std::string &name)
Adds property item of given type.
Item to carry concrete editable entity (e.g.
static RealLimits limitless()
Creates an object withoud bounds (default)
The main object representing an editable/displayable/serializable entity.
void registerTag(const TagInfo &tagInfo, bool set_as_default=false)
Registers tag to hold items under given name.
T property(const std::string &tag) const
Returns data stored in property item.
bool insertItem(SessionItem *item, const TagRow &tagrow)
Insert item into given tag under the given row.
static TagInfo propertyTag(std::string name, std::string model_type)
Constructs tag intended for single property.
const model_type CompoundItemType
const int LIMITS
possibly limits on item's data
materialitems.h Collection of materials to populate MaterialModel.
QString const & name(EShape k)