1 // Copyright (C) 2005 OPEN CASCADE
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
19 // Author : OPEN CASCADE
22 // File: GLViewer_ToolTip.h
23 // Created: March, 2005
25 #ifndef GLVIEWER_TOOLTIP_H
26 #define GLVIEWER_TOOLTIP_H
30 //#include <qtooltip.h>
31 //#include <QtxToolTip.h>
36 class GLViewer_ViewPort2d;
38 /***************************************************************************
39 ** Class: GLViewer_ObjectTip
40 ** Descr: ToolTip of GLViewer_Objects
42 ** Created: UI team, 28.03.05
43 ****************************************************************************/
44 class GLVIEWER_API GLViewer_ObjectTip: public QObject//QToolTip//QtxToolTip
48 GLViewer_ObjectTip( GLViewer_ViewPort2d* );
49 ~GLViewer_ObjectTip();
52 // virtual void maybeTip( const QPoint& p );
53 virtual bool eventFilter( QObject*, QEvent* );
55 virtual bool maybeTip( const QPoint&);
57 void setText( const QString& theText ){ myText = theText; }
58 QString getText() const { return myText; }
65 void hideTipAndSleep();
66 void wakeup( int mseconds = TIP_TIME );
72 GLViewer_ViewPort2d* mypViewPort;
81 #endif //GLVIEWER_TOOLTIP_H