MCPcopy Create free account
hub / github.com/KDE/labplot / handleAspectAdded

Method handleAspectAdded

src/frontend/workbook/WorkbookView.cpp:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void 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
191void WorkbookView::handleAspectAboutToBeRemoved(const AbstractAspect* aspect) {
192 int index = m_workbook->indexOfChild<AbstractAspect>(aspect);

Callers

nothing calls this directly

Calls 7

tabChangedMethod · 0.95
insertTabMethod · 0.45
viewMethod · 0.45
nameMethod · 0.45
setCurrentIndexMethod · 0.45
countMethod · 0.45
iconMethod · 0.45

Tested by

no test coverage detected