source: trunk/doc/html/qfocusevent.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 6.1 KB
Line 
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/src/kernel/qevent.cpp:1147 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QFocusEvent Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { 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&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;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&nbsp;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>QFocusEvent Class Reference</h1>
33
34<p>The QFocusEvent class contains event parameters for widget focus
35events.
36<a href="#details">More...</a>
37<p><tt>#include &lt;<a href="qevent-h.html">qevent.h</a>&gt;</tt>
38<p>Inherits <a href="qevent.html">QEvent</a>.
39<p><a href="qfocusevent-members.html">List of all member functions.</a>
40<h2>Public Members</h2>
41<ul>
42<li class=fn><a href="#QFocusEvent"><b>QFocusEvent</b></a> ( Type&nbsp;type )</li>
43<li class=fn>bool <a href="#gotFocus"><b>gotFocus</b></a> () const</li>
44<li class=fn>bool <a href="#lostFocus"><b>lostFocus</b></a> () const</li>
45<li class=fn>enum <a href="#Reason-enum"><b>Reason</b></a> { Mouse, Tab, Backtab, ActiveWindow, Popup, Shortcut, Other }</li>
46</ul>
47<h2>Static Public Members</h2>
48<ul>
49<li class=fn>Reason <a href="#reason"><b>reason</b></a> ()</li>
50<li class=fn>void <a href="#setReason"><b>setReason</b></a> ( Reason&nbsp;reason )</li>
51<li class=fn>void <a href="#resetReason"><b>resetReason</b></a> ()</li>
52</ul>
53<hr><a name="details"></a><h2>Detailed Description</h2>
54
55
56The QFocusEvent class contains event parameters for widget focus
57events.
58<p>
59<p> Focus events are sent to widgets when the keyboard input focus
60changes. Focus events occur due to mouse actions, keypresses (e.g.
61Tab or Backtab), the window system, popup menus, keyboard
62shortcuts or other application specific reasons. The reason for a
63particular focus event is returned by <a href="#reason">reason</a>() in the appropriate
64event handler.
65<p> The event handlers <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>() and
66<a href="qwidget.html#focusOutEvent">QWidget::focusOutEvent</a>() receive focus events.
67<p> Use <a href="#setReason">setReason</a>() to set the reason for all focus events, and
68<a href="#resetReason">resetReason</a>() to set the reason for all focus events to the reason
69in force before the last setReason() call.
70<p> <p>See also <a href="qwidget.html#setFocus">QWidget::setFocus</a>(), <a href="qwidget.html#focusPolicy-prop">QWidget::focusPolicy</a>, and <a href="events.html">Event Classes</a>.
71
72<hr><h2>Member Type Documentation</h2>
73<h3 class=fn><a name="Reason-enum"></a>QFocusEvent::Reason</h3>
74
75<p> This enum specifies why the focus changed.
76<ul>
77<li><tt>QFocusEvent::Mouse</tt> - because of a mouse action.
78<li><tt>QFocusEvent::Tab</tt> - because of a Tab press.
79<li><tt>QFocusEvent::Backtab</tt> - because of a Backtab press
80(possibly including Shift/Control, e.g. Shift+Tab).
81<li><tt>QFocusEvent::ActiveWindow</tt> - because the window system made this window (in)active.
82<li><tt>QFocusEvent::Popup</tt> - because the application opened/closed a popup that grabbed/released focus.
83<li><tt>QFocusEvent::Shortcut</tt> - because of a keyboard shortcut.
84<li><tt>QFocusEvent::Other</tt> - any other reason, usually application-specific.
85</ul><p> See the <a href="focus.html">keyboard focus overview</a> for more
86about focus.
87
88<hr><h2>Member Function Documentation</h2>
89<h3 class=fn><a name="QFocusEvent"></a>QFocusEvent::QFocusEvent ( <a href="qevent.html#Type-enum">Type</a>&nbsp;type )
90</h3>
91
92<p> Constructs a focus event object.
93<p> The <em>type</em> parameter must be either <a href="qevent.html#Type-enum">QEvent::FocusIn</a> or <a href="qevent.html#Type-enum">QEvent::FocusOut</a>.
94
95<h3 class=fn>bool <a name="gotFocus"></a>QFocusEvent::gotFocus () const
96</h3>
97
98<p> Returns TRUE if the widget received the text input focus;
99otherwise returns FALSE.
100
101<h3 class=fn>bool <a name="lostFocus"></a>QFocusEvent::lostFocus () const
102</h3>
103
104<p> Returns TRUE if the widget lost the text input focus; otherwise
105returns FALSE.
106
107<h3 class=fn><a href="qfocusevent.html#Reason-enum">Reason</a> <a name="reason"></a>QFocusEvent::reason ()<tt> [static]</tt>
108</h3>
109Returns the reason for this focus event.
110<p> <p>See also <a href="#setReason">setReason</a>().
111
112<h3 class=fn>void <a name="resetReason"></a>QFocusEvent::resetReason ()<tt> [static]</tt>
113</h3>
114Resets the reason for all future focus events to the value before
115the last <a href="#setReason">setReason</a>() call.
116<p> <p>See also <a href="#reason">reason</a>() and <a href="#setReason">setReason</a>().
117
118<h3 class=fn>void <a name="setReason"></a>QFocusEvent::setReason ( <a href="qfocusevent.html#Reason-enum">Reason</a>&nbsp;reason )<tt> [static]</tt>
119</h3>
120Sets the reason for all future focus events to <em>reason</em>.
121<p> <p>See also <a href="#reason">reason</a>() and <a href="#resetReason">resetReason</a>().
122
123<!-- eof -->
124<hr><p>
125This file is part of the <a href="index.html">Qt toolkit</a>.
126Copyright &copy; 1995-2007
127<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
128<table width=100% cellspacing=0 border=0><tr>
129<td>Copyright &copy; 2007
130<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
131<td align=right><div align=right>Qt 3.3.8</div>
132</table></div></address></body>
133</html>
Note: See TracBrowser for help on using the repository browser.