diff options
author | rachytski <siarhei.rachytski@gmail.com> | 2012-06-04 00:00:10 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:39:22 +0300 |
commit | 62c416b537630753ea0a9eaaa5a25825a15e97f7 (patch) | |
tree | 2c6af273f10f332fc9419d311b8e27bb1f9e6545 /qt | |
parent | a8c028aede9bec8376370b0d146a46d0c332d8f5 (diff) |
rough implementation of Tap handling on all platforms.
Diffstat (limited to 'qt')
-rw-r--r-- | qt/draw_widget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 619e282047..fd90f8d21c 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -5,6 +5,8 @@ #include "../map/framework_factory.hpp" #include "../map/render_policy.hpp" +#include "../gui/controller.hpp" + #include "../yg/internal/opengl.hpp" #include "../platform/settings.hpp" @@ -316,6 +318,9 @@ namespace qt if (e->button() == Qt::LeftButton) { + if (m_framework->GetGuiController()->OnTapStarted(m2::PointU(e->pos().x(), e->pos().y()))) + return; + if (e->modifiers() & Qt::ControlModifier) { // starting rotation @@ -378,6 +383,8 @@ namespace qt { QGLWidget::mouseMoveEvent(e); + m_framework->GetGuiController()->OnTapMoved(m2::PointU(e->pos().x(), e->pos().y())); + if (m_isDrag) m_framework->DoDrag(get_drag_event(e)); @@ -389,6 +396,8 @@ namespace qt { QGLWidget::mouseReleaseEvent(e); + m_framework->GetGuiController()->OnTapEnded(m2::PointU(e->pos().x(), e->pos().y())); + StopDragging(e); StopRotating(e); |