25 throw std::runtime_error(
"Error in ModelListenerBase: no model defined");
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 setOnModelDestroyed(Callbacks::model_t f, Callbacks::slot_t client={}) override
Sets the callback for notifications on model destruction.
void unsubscribe(Callbacks::slot_t client={}) override
Removes given client from all subscriptions.
void setOnAboutToRemoveItem(Callbacks::item_tagrow_t f, Callbacks::slot_t client={}) override
Sets callback to be notified when the item is about to be removed.
void setOnModelAboutToBeReset(Callbacks::model_t f, Callbacks::slot_t client={}) override
Sets the callback to be notified before model's full reset (root item recreated).
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).
ModelListenerBase(SessionModel *model)
~ModelListenerBase() override
void setOnModelAboutToBeReset(Callbacks::model_t f, Callbacks::slot_t client) override
Sets the callback to be notified just before the reset of the root item.
void setOnModelReset(Callbacks::model_t f, Callbacks::slot_t client) override
Sets the callback to be notified right after the root item recreation.
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 setOnModelDestroyed(Callbacks::model_t f, Callbacks::slot_t client) override
Sets the callback for notifications on model destruction.
void setOnDataChange(Callbacks::item_int_t f, Callbacks::slot_t client) override
Sets callback to be notified on item's data change.
void setOnAboutToRemoveItem(Callbacks::item_tagrow_t f, Callbacks::slot_t client) override
Sets callback to be notified when the item is about to be removed.
void unsubscribe(Callbacks::slot_t client) override
Removes given client from all subscriptions.
Main class to hold hierarchy of SessionItem objects.
ModelMapper * mapper()
Returns model mapper. Can be used to subscribe to various model's signal.
std::function< void(SessionModel *)> model_t
std::function< void(SessionItem *, TagRow)> item_tagrow_t
std::function< void(SessionItem *, int)> item_int_t
materialitems.h Collection of materials to populate MaterialModel.