Mercurial > hg > svgui
diff widgets/LevelPanToolButton.cpp @ 1203:ff042979331b 3.0-integration
Merge from branch svg, and thus (in some subrepos) from levelpanwidget
author | Chris Cannam |
---|---|
date | Mon, 19 Dec 2016 16:34:38 +0000 |
parents | 808d375a3b12 |
children | 8ef67917c301 |
line wrap: on
line diff
--- a/widgets/LevelPanToolButton.cpp Wed Dec 14 11:56:47 2016 +0000 +++ b/widgets/LevelPanToolButton.cpp Mon Dec 19 16:34:38 2016 +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(); +} + +