| 1004 | } |
| 1005 | |
| 1006 | void 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 | |
| 1032 | void MapWidget::mouseMoveEvent(QMouseEvent* event) |
| 1033 | { |
nothing calls this directly
no test coverage detected