From d6fddcaadc6e912a94561483ae8a1297e12a5c3e Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 30 Dec 2014 21:30:13 -0200 Subject: Add a new signal to send the current time/depth of the mouse pos As the explanation says. :) Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 5 +++++ qt-ui/profile/profilewidget2.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 12b04f4bc..979e9c21b 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -848,6 +848,11 @@ void ProfileWidget2::mouseMoveEvent(QMouseEvent *event) && timeAxis->minimum() <= hValue){ mouseFollowerVertical->setPos(pos.x(), profileYAxis->line().y1()); } + if ( timeAxis->maximum() >= hValue + && timeAxis->minimum() <= hValue + && profileYAxis->maximum() >= vValue + && profileYAxis->minimum() <= vValue ) + emit mouseMoved(hValue, vValue); } bool ProfileWidget2::eventFilter(QObject *object, QEvent *event) diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h index f35d07186..51acef91e 100644 --- a/qt-ui/profile/profilewidget2.h +++ b/qt-ui/profile/profilewidget2.h @@ -84,6 +84,9 @@ public: void clearHandlers(); State currentState; +signals: + void mouseMoved(int time, int depth); + public slots: // Necessary to call from QAction's signals. void settingsChanged(); -- cgit v1.2.3-70-g09d2