MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / _mousePressEvent

Method _mousePressEvent

src/gui/map/map_widget.cpp:1006–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1004}
1005
1006void MapWidget::_mousePressEvent(QMouseEvent* event)
1007{
1008 if (dragging || pinching)
1009 {
1010 event->accept();
1011 return;
1012 }
1013
1014 if (tool && tool->mousePressEvent(event, view->viewToMapF(viewportToView(event->pos())), this))
1015 {
1016 event->accept();
1017 return;
1018 }
1019
1020 if (event->button() == Qt::MiddleButton)
1021 {
1022 startDragging(event->pos());
1023 event->accept();
1024 }
1025 else if (event->button() == Qt::RightButton)
1026 {
1027 if (!context_menu->isEmpty())
1028 context_menu->popup(event->globalPos());
1029 }
1030}
1031
1032void MapWidget::mouseMoveEvent(QMouseEvent* event)
1033{

Callers

nothing calls this directly

Calls 7

viewToMapFMethod · 0.80
posMethod · 0.80
buttonMethod · 0.80
popupMethod · 0.80
acceptMethod · 0.45
mousePressEventMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected