1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
20 // Author: Sergey TELKOV
31 class QTX_EXPORT QtxToolTip : public QLabel
36 QtxToolTip( QWidget* = 0 );
37 virtual ~QtxToolTip();
41 virtual void showTip( const QPoint& aPos,
42 const QString& text, const QRect& aWidgetRegion );
43 virtual void showTip( const QRect& aRegion,
44 const QString& text, const QRect& aWidgetRegion );
46 virtual bool eventFilter( QObject* o, QEvent* e );
48 void setWakeUpDelayTime( int );
49 void setShowDelayTime( int );
51 int wakeUpDelayTime() const { return myWakeUpDelayTime; }
52 int showDelayTime() const { return myShowDelayTime; }
55 void maybeTip( QPoint, QString&, QFont&, QRect&, QRect& );
58 void onSleepTimeOut();
59 void onWakeUpTimeOut();
62 virtual void maybeTip( const QPoint& );
63 virtual void mousePressEvent( QMouseEvent* );
64 virtual void mouseDoubleClickEvent( QMouseEvent* );
66 QTimer* sleepTimer() const;
67 QTimer* wakeUpTimer() const;
70 QTimer* myWakeUpTimer;
75 int myWakeUpDelayTime;