AutomationEditor: show tooltip with exact value

Added tooltip telling the exact value under the cursor when editing
automation.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
Raine M. Ekman
2012-05-20 19:00:29 +02:00
committed by Tobias Doerffel
parent 8b66dfc860
commit 04c1a0906f

View File

@@ -36,6 +36,8 @@
#include <QtGui/QScrollBar>
#include <QtGui/QStyleOption>
#include <QtGui/QWheelEvent>
#include <QToolTip>
#ifndef __USE_XOPEN
@@ -1234,6 +1236,10 @@ inline void AutomationEditor::drawCross( QPainter & _p )
_p.drawLine( VALUES_WIDTH, (int) cross_y, width(), (int) cross_y );
_p.drawLine( mouse_pos.x(), TOP_MARGIN, mouse_pos.x(),
height() - SCROLLBAR_SIZE );
QPoint tt_pos = QCursor::pos();
tt_pos.ry() -= 64;
tt_pos.rx() += 32;
QToolTip::showText( tt_pos,QString::number( level ),this);
}