1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
'\" t
.TH QFocusEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QFocusEvent \- Event parameters for widget focus events
.SH SYNOPSIS
\fC#include <ntqevent.h>\fR
.PP
Inherits QEvent.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQFocusEvent\fR ( Type type )"
.br
.ti -1c
.BI "bool \fBgotFocus\fR () const"
.br
.ti -1c
.BI "bool \fBlostFocus\fR () const"
.br
.ti -1c
.BI "enum \fBReason\fR { Mouse, Tab, Backtab, ActiveWindow, Popup, Shortcut, Other }"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "Reason \fBreason\fR ()"
.br
.ti -1c
.BI "void \fBsetReason\fR ( Reason reason )"
.br
.ti -1c
.BI "void \fBresetReason\fR ()"
.br
.in -1c
.SH DESCRIPTION
The QFocusEvent class contains event parameters for widget focus events.
.PP
Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, keypresses (e.g. Tab or Backtab), the window system, popup menus, keyboard shortcuts or other application specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler.
.PP
The event handlers TQWidget::focusInEvent() and TQWidget::focusOutEvent() receive focus events.
.PP
Use setReason() to set the reason for all focus events, and resetReason() to set the reason for all focus events to the reason in force before the last setReason() call.
.PP
See also TQWidget::setFocus(), TQWidget::focusPolicy, and Event Classes.
.SS "Member Type Documentation"
.SH "QFocusEvent::Reason"
This enum specifies why the focus changed.
.TP
\fCQFocusEvent::Mouse\fR - because of a mouse action.
.TP
\fCQFocusEvent::Tab\fR - because of a Tab press.
.TP
\fCQFocusEvent::Backtab\fR - because of a Backtab press (possibly including Shift/Control, e.g. Shift+Tab).
.TP
\fCQFocusEvent::ActiveWindow\fR - because the window system made this window (in)active.
.TP
\fCQFocusEvent::Popup\fR - because the application opened/closed a popup that grabbed/released focus.
.TP
\fCQFocusEvent::Shortcut\fR - because of a keyboard shortcut.
.TP
\fCQFocusEvent::Other\fR - any other reason, usually application-specific.
.PP
See the keyboard focus overview for more about focus.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QFocusEvent::QFocusEvent ( Type type )"
Constructs a focus event object.
.PP
The \fItype\fR parameter must be either QEvent::FocusIn or QEvent::FocusOut.
.SH "bool QFocusEvent::gotFocus () const"
Returns TRUE if the widget received the text input focus; otherwise returns FALSE.
.SH "bool QFocusEvent::lostFocus () const"
Returns TRUE if the widget lost the text input focus; otherwise returns FALSE.
.SH "Reason QFocusEvent::reason ()\fC [static]\fR"
Returns the reason for this focus event.
.PP
See also setReason().
.SH "void QFocusEvent::resetReason ()\fC [static]\fR"
Resets the reason for all future focus events to the value before the last setReason() call.
.PP
See also reason() and setReason().
.SH "void QFocusEvent::setReason ( Reason reason )\fC [static]\fR"
Sets the reason for all future focus events to \fIreason\fR.
.PP
See also reason() and resetReason().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qfocusevent.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR [email protected] .
Please include the name of the manual page (tqfocusevent.3qt) and the Qt
version (3.3.8).
|