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

Method contextMenuEvent

src/frontend/worksheet/WorksheetView.cpp:1015–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013}
1014
1015void WorksheetView::contextMenuEvent(QContextMenuEvent* e) {
1016 if ((m_magnificationWindow && m_magnificationWindow->isVisible() && items(e->pos()).size() == 1) || !itemAt(e->pos())) {
1017 // no item or only the magnification window under the cursor -> show the context menu for the worksheet
1018 m_cursorPos = mapToScene(e->pos());
1019 m_calledFromContextMenu = true;
1020 m_worksheet->createContextMenu()->exec(QCursor::pos());
1021 } else {
1022 // propagate the event to the scene and graphics items
1023 QGraphicsView::contextMenuEvent(e);
1024 }
1025}
1026
1027void WorksheetView::keyPressEvent(QKeyEvent* event) {
1028 // handle delete

Callers

nothing calls this directly

Calls 4

execMethod · 0.80
isVisibleMethod · 0.45
sizeMethod · 0.45
createContextMenuMethod · 0.45

Tested by

no test coverage detected