1QFocusEvent(3qt)                                              QFocusEvent(3qt)
2
3
4

NAME

6       QFocusEvent - Event parameters for widget focus events
7

SYNOPSIS

9       #include <qevent.h>
10
11       Inherits QEvent.
12
13   Public Members
14       QFocusEvent ( Type type )
15       bool gotFocus () const
16       bool lostFocus () const
17       enum Reason { Mouse, Tab, Backtab, ActiveWindow, Popup, Shortcut, Other
18           }
19
20   Static Public Members
21       Reason reason ()
22       void setReason ( Reason reason )
23       void resetReason ()
24

DESCRIPTION

26       The QFocusEvent class contains event parameters for widget focus
27       events.
28
29       Focus events are sent to widgets when the keyboard input focus changes.
30       Focus events occur due to mouse actions, keypresses (e.g. Tab or
31       Backtab), the window system, popup menus, keyboard shortcuts or other
32       application specific reasons. The reason for a particular focus event
33       is returned by reason() in the appropriate event handler.
34
35       The event handlers QWidget::focusInEvent() and QWidget::focusOutEvent()
36       receive focus events.
37
38       Use setReason() to set the reason for all focus events, and
39       resetReason() to set the reason for all focus events to the reason in
40       force before the last setReason() call.
41
42       See also QWidget::setFocus(), QWidget::focusPolicy, and Event Classes.
43
44   Member Type Documentation

QFocusEvent::Reason

46       This enum specifies why the focus changed.
47
48       QFocusEvent::Mouse - because of a mouse action.
49
50       QFocusEvent::Tab - because of a Tab press.
51
52       QFocusEvent::Backtab - because of a Backtab press (possibly including
53       Shift/Control, e.g. Shift+Tab).
54
55       QFocusEvent::ActiveWindow - because the window system made this window
56       (in)active.
57
58       QFocusEvent::Popup - because the application opened/closed a popup that
59       grabbed/released focus.
60
61       QFocusEvent::Shortcut - because of a keyboard shortcut.
62
63       QFocusEvent::Other - any other reason, usually application-specific.
64
65       See the keyboard focus overview for more about focus.
66

MEMBER FUNCTION DOCUMENTATION

QFocusEvent::QFocusEvent ( Type type )

69       Constructs a focus event object.
70
71       The type parameter must be either QEvent::FocusIn or QEvent::FocusOut.
72

bool QFocusEvent::gotFocus () const

74       Returns TRUE if the widget received the text input focus; otherwise
75       returns FALSE.
76

bool QFocusEvent::lostFocus () const

78       Returns TRUE if the widget lost the text input focus; otherwise returns
79       FALSE.
80

Reason QFocusEvent::reason () [static]

82       Returns the reason for this focus event.
83
84       See also setReason().
85

void QFocusEvent::resetReason () [static]

87       Resets the reason for all future focus events to the value before the
88       last setReason() call.
89
90       See also reason() and setReason().
91

void QFocusEvent::setReason ( Reason reason ) [static]

93       Sets the reason for all future focus events to reason.
94
95       See also reason() and resetReason().
96
97

SEE ALSO

99       http://doc.trolltech.com/qfocusevent.html
100       http://www.trolltech.com/faq/tech.html
101
103       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
104       license file included in the distribution for a complete license
105       statement.
106

AUTHOR

108       Generated automatically from the source code.
109

BUGS

111       If you find a bug in Qt, please report it as described in
112       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
113       help you. Thank you.
114
115       The definitive Qt documentation is provided in HTML format; it is
116       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
117       web browser. This man page is provided as a convenience for those users
118       who prefer man pages, although this format is not officially supported
119       by Trolltech.
120
121       If you find errors in this manual page, please report them to qt-
122       bugs@trolltech.com.  Please include the name of the manual page
123       (qfocusevent.3qt) and the Qt version (3.3.8).
124
125
126
127Trolltech AS                    2 February 2007               QFocusEvent(3qt)
Impressum