1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qtooltip.h:1 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>qtooltip.h Include File</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qtooltip.h</h1>
|
---|
33 |
|
---|
34 | <p>This is the verbatim text of the qtooltip.h include file. It is provided only for illustration; the copyright remains with Trolltech.
|
---|
35 | <hr>
|
---|
36 | <pre>
|
---|
37 | /****************************************************************************
|
---|
38 | ** $Id: qtooltip-h.html 2051 2007-02-21 10:04:20Z chehrlic $
|
---|
39 | **
|
---|
40 | ** Definition of Tool Tips (or Balloon Help) for any widget or rectangle
|
---|
41 | **
|
---|
42 | ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
|
---|
43 | **
|
---|
44 | ** This file is part of the widgets module of the Qt GUI Toolkit.
|
---|
45 | **
|
---|
46 | ** This file may be distributed under the terms of the Q Public License
|
---|
47 | ** as defined by Trolltech ASA of Norway and appearing in the file
|
---|
48 | ** LICENSE.QPL included in the packaging of this file.
|
---|
49 | **
|
---|
50 | ** This file may be distributed and/or modified under the terms of the
|
---|
51 | ** GNU General Public License version 2 as published by the Free Software
|
---|
52 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
53 | ** packaging of this file.
|
---|
54 | **
|
---|
55 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
---|
56 | ** licenses may use this file in accordance with the Qt Commercial License
|
---|
57 | ** Agreement provided with the Software.
|
---|
58 | **
|
---|
59 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
---|
60 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
61 | **
|
---|
62 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
---|
63 | ** information about Qt Commercial License Agreements.
|
---|
64 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
---|
65 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
---|
66 | **
|
---|
67 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
68 | ** not clear to you.
|
---|
69 | **
|
---|
70 | **********************************************************************/
|
---|
71 |
|
---|
72 | #ifndef QTOOLTIP_H
|
---|
73 | #define QTOOLTIP_H
|
---|
74 |
|
---|
75 | #ifndef QT_H
|
---|
76 | #include "qwidget.h"
|
---|
77 | #endif // QT_H
|
---|
78 |
|
---|
79 | #ifndef QT_NO_TOOLTIP
|
---|
80 |
|
---|
81 | #if __GNUC__ - 0 > 3
|
---|
82 | #pragma GCC system_header
|
---|
83 | #endif
|
---|
84 |
|
---|
85 | class QTipManager;
|
---|
86 | class QIconViewToolTip;
|
---|
87 | class QListViewToolTip;
|
---|
88 |
|
---|
89 | class Q_EXPORT QToolTipGroup: public QObject
|
---|
90 | {
|
---|
91 | Q_OBJECT
|
---|
92 | Q_PROPERTY( bool delay READ delay WRITE setDelay )
|
---|
93 | Q_PROPERTY( bool enabled READ enabled WRITE setEnabled )
|
---|
94 |
|
---|
95 | public:
|
---|
96 | QToolTipGroup( QObject *parent, const char *name = 0 );
|
---|
97 | ~QToolTipGroup();
|
---|
98 |
|
---|
99 | bool delay() const;
|
---|
100 | bool enabled() const;
|
---|
101 |
|
---|
102 | public slots:
|
---|
103 | void setDelay( bool );
|
---|
104 | void setEnabled( bool );
|
---|
105 |
|
---|
106 | signals:
|
---|
107 | void showTip( const QString &);
|
---|
108 | void removeTip();
|
---|
109 |
|
---|
110 | private:
|
---|
111 | uint del:1;
|
---|
112 | uint ena:1;
|
---|
113 |
|
---|
114 | friend class QTipManager;
|
---|
115 |
|
---|
116 | private: // Disabled copy constructor and operator=
|
---|
117 | #if defined(Q_DISABLE_COPY)
|
---|
118 | QToolTipGroup( const QToolTipGroup & );
|
---|
119 | QToolTipGroup& operator=( const QToolTipGroup & );
|
---|
120 | #endif
|
---|
121 | };
|
---|
122 |
|
---|
123 |
|
---|
124 | class Q_EXPORT QToolTip: public Qt
|
---|
125 | {
|
---|
126 | public:
|
---|
127 | QToolTip( QWidget *, QToolTipGroup * = 0 );
|
---|
128 | //### add virtual d'tor for 4.0
|
---|
129 |
|
---|
130 | static void add( QWidget *, const QString &);
|
---|
131 | static void add( QWidget *, const QString &,
|
---|
132 | QToolTipGroup *, const QString& );
|
---|
133 | static void remove( QWidget * );
|
---|
134 |
|
---|
135 | static void add( QWidget *, const QRect &, const QString &);
|
---|
136 | static void add( QWidget *, const QRect &, const QString &,
|
---|
137 | QToolTipGroup *, const QString& );
|
---|
138 | static void remove( QWidget *, const QRect & );
|
---|
139 |
|
---|
140 | static QString textFor( QWidget *, const QPoint & pos = QPoint() );
|
---|
141 |
|
---|
142 | static void hide();
|
---|
143 |
|
---|
144 | static QFont font();
|
---|
145 | static void setFont( const QFont & );
|
---|
146 | static QPalette palette();
|
---|
147 | static void setPalette( const QPalette & );
|
---|
148 |
|
---|
149 | #ifndef QT_NO_COMPAT
|
---|
150 | static void setEnabled( bool enable ) { setGloballyEnabled( enable ); }
|
---|
151 | static bool enabled() { return isGloballyEnabled(); }
|
---|
152 | #endif
|
---|
153 | static void setGloballyEnabled( bool );
|
---|
154 | static bool isGloballyEnabled();
|
---|
155 | static void setWakeUpDelay(int);
|
---|
156 |
|
---|
157 | protected:
|
---|
158 | virtual void maybeTip( const QPoint & ) = 0;
|
---|
159 | void tip( const QRect &, const QString &);
|
---|
160 | void tip( const QRect &, const QString& , const QString &);
|
---|
161 | void tip( const QRect &, const QString &, const QRect & );
|
---|
162 | void tip( const QRect &, const QString&, const QString &, const QRect &);
|
---|
163 |
|
---|
164 | void clear();
|
---|
165 |
|
---|
166 | public:
|
---|
167 | QWidget *parentWidget() const { return p; }
|
---|
168 | QToolTipGroup *group() const { return g; }
|
---|
169 |
|
---|
170 | private:
|
---|
171 | QWidget *p;
|
---|
172 | QToolTipGroup *g;
|
---|
173 | static QFont *ttFont;
|
---|
174 | static QPalette *ttPalette;
|
---|
175 |
|
---|
176 | friend class QTipManager;
|
---|
177 | };
|
---|
178 |
|
---|
179 |
|
---|
180 | #endif // QT_NO_TOOLTIP
|
---|
181 |
|
---|
182 | #endif // QTOOLTIP_H
|
---|
183 | </pre>
|
---|
184 | <!-- eof -->
|
---|
185 | <p><address><hr><div align=center>
|
---|
186 | <table width=100% cellspacing=0 border=0><tr>
|
---|
187 | <td>Copyright © 2007
|
---|
188 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
189 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
190 | </table></div></address></body>
|
---|
191 | </html>
|
---|