You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/man/man3/tqfocusevent.3qt

118 lines
4.1 KiB

'\" 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 <tqevent.h>\fR
.PP
Inherits TQEvent.
.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 TQEvent::FocusIn or TQEvent::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 qt-bugs@trolltech.com .
Please include the name of the manual page (tqfocusevent.3qt) and the Qt
version (3.3.8).