diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-12-30 21:30:13 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-30 16:14:40 -0800 |
commit | d6fddcaadc6e912a94561483ae8a1297e12a5c3e (patch) | |
tree | 3cab1adf58c755197a719df5490ed99a84620f5d /qt-ui/profile | |
parent | 3e239c7e3e8eac0911f8b3ccc67db032e8e56297 (diff) | |
download | subsurface-d6fddcaadc6e912a94561483ae8a1297e12a5c3e.tar.gz |
Add a new signal to send the current time/depth of the mouse pos
As the explanation says. :)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 5 | ||||
-rw-r--r-- | qt-ui/profile/profilewidget2.h | 3 |
2 files changed, 8 insertions, 0 deletions
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(); |