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

Method showTabContextMenu

src/frontend/datapicker/DatapickerView.cpp:136–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void DatapickerView::showTabContextMenu(QPoint point) {
137 QMenu* menu = nullptr;
138 auto* aspect = m_datapicker->child<AbstractAspect>(m_tabWidget->currentIndex(), AbstractAspect::ChildIndexFlag::IncludeHidden);
139 auto* spreadsheet = dynamic_cast<Spreadsheet*>(aspect);
140 if (spreadsheet) {
141 menu = spreadsheet->createContextMenu();
142 } else {
143 auto* image = dynamic_cast<DatapickerImage*>(aspect);
144 if (image)
145 menu = image->createContextMenu();
146 }
147
148 if (menu)
149 menu->exec(m_tabWidget->mapToGlobal(point));
150}
151
152/*!
153 * handle the renames of child aspects to adjust the names of the tabs accordingly.

Callers

nothing calls this directly

Calls 3

execMethod · 0.80
currentIndexMethod · 0.45
createContextMenuMethod · 0.45

Tested by

no test coverage detected