TQFocusData(3qt)

NAME
TQFocusData - Maintains the list of widgets in the focus chain

SYNOPSIS
#include <tqfocusdata.h>

  Public Members
TQWidget * focusWidget () const
TQWidget * home ()
TQWidget * next ()
TQWidget * prev ()
TQWidget * first () const
TQWidget * last () const
int count () const

DESCRIPTION
The TQFocusData class maintains the list of widgets in the focus chain.

This read-only list always contains at least one widget (i.e. the top-level widget). It provides a simple cursor which can be reset to the current focus widget using home(), or moved to its neighboring widgets using next() and prev(). You can also retrieve the count() of the number of widgets in the list. The list is a loop, so if you keep iterating, for example using next(), you will never come to the end.

Some widgets in the list may not accept focus. Widgets are added to the list as necessary, but not removed from it. This lets widgets change focus policy dynamically without disrupting the focus chain the user experiences. When a widget disables and re-enables tab focus, its position in the focus chain does not change.

When reimplementing TQWidget::focusNextPrevChild() to provide special focus flow, you will usually call TQWidget::focusData() to retrieve the focus data stored at the top-level widget. A top-level widget's focus data contains the focus list for its hierarchy of widgets.

The cursor may change at any time.

This class is not thread-safe.

See also TQWidget::focusNextPrevChild(), TQWidget::setTabOrder(), TQWidget::focusPolicy, and Miscellaneous Classes.

MEMBER FUNCTION DOCUMENTATION

int TQFocusData::count () const
Returns the number of widgets in the focus chain.

TQWidget * TQFocusData::first () const
Returns the first widget in the focus chain. The cursor is not modified.

TQWidget * TQFocusData::focusWidget () const
Returns the widgets in the hierarchy that are in the focus chain.

TQWidget * TQFocusData::home ()
Moves the cursor to the focusWidget() and returns that widget. You must call this before next() or prev() to iterate meaningfully.

TQWidget * TQFocusData::last () const
Returns the last widget in the focus chain. The cursor is not modified.

TQWidget * TQFocusData::next ()
Moves the cursor to the next widget in the focus chain. There is always a next widget because the list is a loop.

TQWidget * TQFocusData::prev ()
Moves the cursor to the previous widget in the focus chain. There is always a previous widget because the list is a loop.

SEE ALSO
http://doc.trolltech.com/tqfocusdata.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

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.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (tqfocusdata.3qt) and the Qt version (3.3.8).