summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-12-30 21:30:13 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-30 16:14:40 -0800
commitd6fddcaadc6e912a94561483ae8a1297e12a5c3e (patch)
tree3cab1adf58c755197a719df5490ed99a84620f5d /qt-ui/profile
parent3e239c7e3e8eac0911f8b3ccc67db032e8e56297 (diff)
downloadsubsurface-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.cpp5
-rw-r--r--qt-ui/profile/profilewidget2.h3
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();