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

Method showTabContextMenu

src/frontend/workbook/WorkbookView.cpp:143–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void WorkbookView::showTabContextMenu(QPoint point) {
144 QMenu* menu = nullptr;
145 auto* aspect = m_workbook->child<AbstractAspect>(m_tabWidget->currentIndex());
146 auto* spreadsheet = dynamic_cast<Spreadsheet*>(aspect);
147 if (spreadsheet) {
148 menu = spreadsheet->createContextMenu();
149 } else {
150 Matrix* matrix = dynamic_cast<Matrix*>(aspect);
151 if (matrix)
152 menu = matrix->createContextMenu();
153 }
154
155 if (menu)
156 menu->exec(m_tabWidget->mapToGlobal(point));
157}
158
159void WorkbookView::addMatrix() {
160 Matrix* matrix = new Matrix(i18n("Matrix"));

Callers

nothing calls this directly

Calls 3

execMethod · 0.80
currentIndexMethod · 0.45
createContextMenuMethod · 0.45

Tested by

no test coverage detected