always use main-window as parent and make sure to be moved relative to it, i.e. do not show outside of moved main-window

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@755 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-03-03 22:52:12 +00:00
parent 2843a5d743
commit c65b1100b6
2 changed files with 16 additions and 54 deletions

View File

@@ -1,7 +1,7 @@
/*
* text_float.h - class textFloat, a floating text-label
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -33,7 +33,7 @@
class textFloat : public QWidget
{
public:
textFloat( QWidget * _parent );
textFloat( void );
virtual ~textFloat()
{
}
@@ -42,8 +42,6 @@ public:
void setText( const QString & _text );
void setPixmap( const QPixmap & _pixmap );
void reparent( QWidget * _new_parent );
void setVisibilityTimeOut( int _msecs );
@@ -58,6 +56,11 @@ public:
int _timeout = 2000,
QWidget * _parent = NULL );
void moveGlobal( QWidget * _w, const QPoint & _offset )
{
move( _w->mapToGlobal( QPoint( 0, 0 ) )+_offset );
}
protected:
virtual void paintEvent( QPaintEvent * _me );