added own cursor drawing

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@58 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Andreas Brandmaier
2006-01-23 14:03:13 +00:00
parent 2f4059ed15
commit 28673e7a80

View File

@@ -128,7 +128,7 @@ void graph::mousePressEvent( QMouseEvent * _me )
// toggle mouse state
m_mouseDown = true;
// setCursor( QCursor::BlankCursor );
setCursor( QCursor::BlankCursor );
m_lastCursorX = x;
}
@@ -157,6 +157,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me )
// toggle mouse state
m_mouseDown = false;
setCursor( QCursor::ArrowCursor );
update();
}
@@ -194,7 +195,12 @@ void graph::paintEvent( QPaintEvent * )
}
// draw Pointer
// mapFromGlobal( QCursor::pos() );
if (m_mouseDown) {
QPoint cursor = mapFromGlobal( QCursor::pos() );
p.setPen( QColor( 0xAA, 0xFF, 0x00 ) );
p.drawLine( 2, cursor.y(), 130, cursor.y() );
p.drawLine( cursor.x(), 2, cursor.x(), 102 );
}
#ifndef QT4
// and blit all the drawn stuff on the screen...