| 175 | } |
| 176 | |
| 177 | void WorkbookView::handleAspectAdded(const AbstractAspect* aspect) { |
| 178 | const auto* part = dynamic_cast<const AbstractPart*>(aspect); |
| 179 | if (!part) |
| 180 | return; |
| 181 | |
| 182 | int index = m_workbook->indexOfChild<AbstractAspect>(aspect); |
| 183 | if (index < 0) |
| 184 | return; |
| 185 | m_tabWidget->insertTab(index, part->view(), aspect->name()); |
| 186 | m_tabWidget->setCurrentIndex(index); |
| 187 | m_tabWidget->setTabIcon(m_tabWidget->count(), aspect->icon()); |
| 188 | this->tabChanged(index); |
| 189 | } |
| 190 | |
| 191 | void WorkbookView::handleAspectAboutToBeRemoved(const AbstractAspect* aspect) { |
| 192 | int index = m_workbook->indexOfChild<AbstractAspect>(aspect); |
nothing calls this directly
no test coverage detected