2 * text_float.h - class textFloat, a floating text-label
4 * Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
29 #include <QtGui/QWidget>
30 #include <QtGui/QPixmap>
35 class EXPORT textFloat
: public QWidget
43 void setTitle( const QString
& _title
);
44 void setText( const QString
& _text
);
45 void setPixmap( const QPixmap
& _pixmap
);
47 void setVisibilityTimeOut( int _msecs
);
50 static textFloat
* displayMessage( const QString
& _msg
,
52 QWidget
* _parent
= NULL
,
53 int _add_y_margin
= 0 );
54 static textFloat
* displayMessage( const QString
& _title
,
56 const QPixmap
& _pixmap
=
59 QWidget
* _parent
= NULL
);
61 void moveGlobal( QWidget
* _w
, const QPoint
& _offset
)
63 move( _w
->mapToGlobal( QPoint( 0, 0 ) )+_offset
);
68 virtual void paintEvent( QPaintEvent
* _me
);
69 virtual void mousePressEvent( QMouseEvent
* _me
);