void RackPresenter::on_slotRemoved(const SlotModel& slot_model) { auto& slot = m_slots.at(slot_model.id()); m_slots.remove(slot_model.id()); delete &slot; on_askUpdate(); }
void RackInspectorSection::on_slotRemoved(const SlotModel& slot) { auto ptr = slotmodelsSectionWidgets[slot.id()]; slotmodelsSectionWidgets.erase(slot.id()); if(ptr) { ptr->deleteLater(); } }
void RackInspectorSection::addSlotInspectorSection(const SlotModel& slot) { SlotInspectorSection* newSlot = new SlotInspectorSection { slot.metadata.name(), slot, this}; m_slotSection->addContent(newSlot); slotmodelsSectionWidgets[slot.id()] = newSlot; }