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

Method contextMenuEvent

src/backend/worksheet/plots/cartesian/CartesianPlot.cpp:3765–3774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3763// ##############################################################################
3764
3765void CartesianPlotPrivate::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) {
3766 const auto* cSystem{defaultCoordinateSystem()};
3767 scenePos = event->pos();
3768 if (!cSystem->isValid())
3769 return;
3770 logicalPos = cSystem->mapSceneToLogical(scenePos, AbstractCoordinateSystem::MappingFlag::Limit);
3771 calledFromContextMenu = true;
3772 auto* menu = q->createContextMenu();
3773 Q_EMIT q->contextMenuRequested(q->AbstractAspect::type(), menu);
3774}
3775
3776/*!
3777 * \brief CartesianPlotPrivate::mousePressEvent

Callers

nothing calls this directly

Calls 3

isValidMethod · 0.45
mapSceneToLogicalMethod · 0.45
createContextMenuMethod · 0.45

Tested by

no test coverage detected