20 , m_block_repeater(false)
21 , m_repeat_child_properties(repeat_child_properties)
28 item->mapper()->unsubscribe(
this);
33 if (!sessionItem ||
m_dataItems.contains(sessionItem))
55 item->mapper()->unsubscribe(
this);
74 target->setItemValue(propertyName, value);
89 target->getItem(tag)->setItemValue(propertyName, value);
98 result.removeAll(sourceItem);
Defines class IntensityDataItem.
Defines class PropertyRepeater.
void setOnItemDestroy(std::function< void(SessionItem *)> f, const void *caller=nullptr)
void setOnPropertyChange(std::function< void(QString)> f, const void *caller=nullptr)
void setOnChildPropertyChange(std::function< void(SessionItem *, QString)> f, const void *caller=nullptr)
Calls back on child property change, report childItem and property name.
bool m_repeat_child_properties
~PropertyRepeater() override
void setActive(bool isActive)
QVector< SessionItem * > m_dataItems
void setOnChildPropertyChange(SessionItem *item, const QString &propertyName)
QVector< SessionItem * > targetItems(SessionItem *sourceItem)
Returns list of target items to update their properties.
void onPropertyChanged(SessionItem *item, const QString &propertyName)
PropertyRepeater(QObject *parent=nullptr, bool repeat_child_properties=false)
void addItem(SessionItem *sessionItem)
Base class for a GUI data item.
QVariant getItemValue(const QString &tag) const
Directly access value of item under given tag.
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
SessionItem * parentItem() const
Returns parent of this item.
QString tagFromItem(const SessionItem *item) const
Returns the tag name of given item when existing.
QString const & name(EShape k)