MCPcopy Create free account
hub / github.com/comaps/comaps / keyReleaseEvent

Method keyReleaseEvent

qt/draw_widget.cpp:450–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448}
449
450void DrawWidget::keyReleaseEvent(QKeyEvent * e)
451{
452 if (m_screenshotMode)
453 return;
454
455 if (IsLeftButton(QGuiApplication::mouseButtons()) && e->key() == Qt::Key_Control)
456 {
457 df::TouchEvent event;
458 event.SetTouchType(df::TouchEvent::TOUCH_UP);
459 df::Touch touch;
460 touch.m_id = 0;
461 touch.m_location = m2::PointD(L2D(QCursor::pos().x()), L2D(QCursor::pos().y()));
462 event.SetFirstTouch(touch);
463 event.SetSecondTouch(GetSymmetrical(touch));
464
465 m_framework.TouchEvent(event);
466 }
467 else if (e->key() == Qt::Key_Alt)
468 m_emulatingLocation = false;
469}
470
471std::string DrawWidget::GetDistance(search::Result const & res) const
472{

Callers

nothing calls this directly

Calls 7

IsLeftButtonFunction · 0.85
SetTouchTypeMethod · 0.80
SetFirstTouchMethod · 0.80
SetSecondTouchMethod · 0.80
xMethod · 0.45
yMethod · 0.45
TouchEventMethod · 0.45

Tested by

no test coverage detected