44 auto updated =
model()->material_property(property.identifier());
45 if (property != updated)
MaterialPropertyController(QObject *parent=nullptr)
Property to carry text, color and identifier.
void setOnItemRemoved(Callbacks::item_tagrow_t f, Callbacks::slot_t client={}) override
Sets callback to be notified on item remove.
void setOnItemInserted(Callbacks::item_tagrow_t f, Callbacks::slot_t client={}) override
Sets callback to be notified on item insert.
void setOnDataChange(Callbacks::item_int_t f, Callbacks::slot_t client={}) override
Sets callback to be notified on item's data change.
void setOnModelReset(Callbacks::model_t f, Callbacks::slot_t client={}) override
Sets the callback to be notified after model was fully reset (root item recreated).
Templated class for all objects willing to listen for changes in concrete SessionModel.
MaterialModel * model() const
static const std::string P_MATERIAL
Model to hold MaterialItems.
void update_all()
Updates all material properties in LayerItems to get new material colors and labels.
SampleModel * m_sample_model
Model to hold layers and multi-layers.
materialitems.h Collection of materials to populate MaterialModel.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.