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 TQFocusEvent 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
TQFocusEvent \- 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 "\fBTQFocusEvent\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 TQFocusEvent 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 "TQFocusEvent::Reason"
This enum specifies why the focus changed.
.TP
\fCTQFocusEvent::Mouse\fR - because of a mouse action.
.TP
\fCTQFocusEvent::Tab\fR - because of a Tab press.
.TP
\fCTQFocusEvent::Backtab\fR - because of a Backtab press (possibly including Shift/Control, e.g. Shift+Tab).
.TP
\fCTQFocusEvent::ActiveWindow\fR - because the window system made this window (in)active.
.TP
\fCTQFocusEvent::Popup\fR - because the application opened/closed a popup that grabbed/released focus.
.TP
\fCTQFocusEvent::Shortcut\fR - because of a keyboard shortcut.
.TP
\fCTQFocusEvent::Other\fR - any other reason, usually application-specific.
.PP
See the keyboard focus overview for more about focus.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQFocusEvent::TQFocusEvent ( Type type )"
Constructs a focus event object.
.PP
The \fItype\fR parameter must be either TQEvent::FocusIn or TQEvent::FocusOut.
.SH "bool TQFocusEvent::gotFocus () const"
Returns TRUE if the widget received the text input focus; otherwise returns FALSE.
.SH "bool TQFocusEvent::lostFocus () const"
Returns TRUE if the widget lost the text input focus; otherwise returns FALSE.
.SH "Reason TQFocusEvent::reason ()\fC [static]\fR"
Returns the reason for this focus event.
.PP
See also setReason().
.SH "void TQFocusEvent::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 TQFocusEvent::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/tqfocusevent.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).