diff options
author | Yuri Gorshenin <y@maps.me> | 2017-05-26 17:09:49 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2017-05-29 17:49:17 +0300 |
commit | 9af213dc58bbe776dc8cbfcca2878761e9a73f58 (patch) | |
tree | 5306607da084a4be90ec9f6816f8e98cd8946ad2 /qt/qt_common | |
parent | a580ccc0fd4d4ec4437c5e2c10e7726cae3d3ceb (diff) |
[assessment-tool] Implemented addition of non-found results.
Diffstat (limited to 'qt/qt_common')
-rw-r--r-- | qt/qt_common/map_widget.cpp | 3 | ||||
-rw-r--r-- | qt/qt_common/map_widget.hpp | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/qt/qt_common/map_widget.cpp b/qt/qt_common/map_widget.cpp index bd2746a890..0ddc9d60c6 100644 --- a/qt/qt_common/map_widget.cpp +++ b/qt/qt_common/map_widget.cpp @@ -356,6 +356,9 @@ void MapWidget::mouseMoveEvent(QMouseEvent * e) void MapWidget::mouseReleaseEvent(QMouseEvent * e) { + if (e->button() == Qt::RightButton) + emit OnContextMenuRequested(e->globalPos()); + QOpenGLWidget::mouseReleaseEvent(e); if (IsLeftButton(e)) m_framework.TouchEvent(GetTouchEvent(e, df::TouchEvent::TOUCH_UP)); diff --git a/qt/qt_common/map_widget.hpp b/qt/qt_common/map_widget.hpp index 4956b592a8..a238532e88 100644 --- a/qt/qt_common/map_widget.hpp +++ b/qt/qt_common/map_widget.hpp @@ -36,7 +36,10 @@ public: void BindSlider(ScaleSlider & slider); void CreateEngine(); -public Q_SLOTS: +signals: + void OnContextMenuRequested(QPoint const & p); + +public slots: void ScalePlus(); void ScaleMinus(); void ScalePlusLight(); |