diff widgets/LevelPanToolButton.cpp @ 1216:dc2af6616c83

Merge from branch 3.0-integration
author Chris Cannam
date Fri, 13 Jan 2017 10:29:50 +0000
parents 808d375a3b12
children 8ef67917c301
line wrap: on
line diff
--- a/widgets/LevelPanToolButton.cpp	Fri Mar 04 12:23:31 2016 +0000
+++ b/widgets/LevelPanToolButton.cpp	Fri Jan 13 10:29:50 2017 +0000
@@ -49,6 +49,7 @@
 
     setPopupMode(InstantPopup);
     setMenu(menu);
+    setToolTip(tr("Click to adjust level and pan"));
 
     setImageSize(m_pixels);
     setBigImageSize(m_pixelsBig);
@@ -58,6 +59,12 @@
 {
 }
 
+void
+LevelPanToolButton::wheelEvent(QWheelEvent *e)
+{
+    m_lpw->wheelEvent(e);
+}
+
 float
 LevelPanToolButton::getLevel() const
 {
@@ -110,6 +117,13 @@
 }
 
 void
+LevelPanToolButton::setMonitoringLevels(float left, float right)
+{
+    m_lpw->setMonitoringLevels(left, right);
+    update();
+}
+
+void
 LevelPanToolButton::setIncludeMute(bool include)
 {
     m_lpw->setIncludeMute(include);
@@ -170,4 +184,18 @@
     m_lpw->renderTo(this, QRectF(margin, margin, m_pixels, m_pixels), false);
 }
 
+void
+LevelPanToolButton::enterEvent(QEvent *e)
+{
+    QToolButton::enterEvent(e);
+    emit mouseEntered();
+}
 
+void
+LevelPanToolButton::leaveEvent(QEvent *e)
+{
+    QToolButton::enterEvent(e);
+    emit mouseLeft();
+}
+
+