1QFocusData(3qt)                                                QFocusData(3qt)
2
3
4

NAME

6       QFocusData - Maintains the list of widgets in the focus chain
7

SYNOPSIS

9       #include <qfocusdata.h>
10
11   Public Members
12       QWidget * focusWidget () const
13       QWidget * home ()
14       QWidget * next ()
15       QWidget * prev ()
16       QWidget * first () const
17       QWidget * last () const
18       int count () const
19

DESCRIPTION

21       The QFocusData class maintains the list of widgets in the focus chain.
22
23       This read-only list always contains at least one widget (i.e. the top-
24       level widget). It provides a simple cursor which can be reset to the
25       current focus widget using home(), or moved to its neighboring widgets
26       using next() and prev(). You can also retrieve the count() of the
27       number of widgets in the list. The list is a loop, so if you keep
28       iterating, for example using next(), you will never come to the end.
29
30       Some widgets in the list may not accept focus. Widgets are added to the
31       list as necessary, but not removed from it. This lets widgets change
32       focus policy dynamically without disrupting the focus chain the user
33       experiences. When a widget disables and re-enables tab focus, its
34       position in the focus chain does not change.
35
36       When reimplementing QWidget::focusNextPrevChild() to provide special
37       focus flow, you will usually call QWidget::focusData() to retrieve the
38       focus data stored at the top-level widget. A top-level widget's focus
39       data contains the focus list for its hierarchy of widgets.
40
41       The cursor may change at any time.
42
43       This class is not thread-safe.
44
45       See also QWidget::focusNextPrevChild(), QWidget::setTabOrder(),
46       QWidget::focusPolicy, and Miscellaneous Classes.
47

MEMBER FUNCTION DOCUMENTATION

int QFocusData::count () const

50       Returns the number of widgets in the focus chain.
51

QWidget * QFocusData::first () const

53       Returns the first widget in the focus chain. The cursor is not
54       modified.
55

QWidget * QFocusData::focusWidget () const

57       Returns the widgets in the hierarchy that are in the focus chain.
58

QWidget * QFocusData::home ()

60       Moves the cursor to the focusWidget() and returns that widget. You must
61       call this before next() or prev() to iterate meaningfully.
62

QWidget * QFocusData::last () const

64       Returns the last widget in the focus chain. The cursor is not modified.
65

QWidget * QFocusData::next ()

67       Moves the cursor to the next widget in the focus chain. There is always
68       a next widget because the list is a loop.
69

QWidget * QFocusData::prev ()

71       Moves the cursor to the previous widget in the focus chain. There is
72       always a previous widget because the list is a loop.
73
74

SEE ALSO

76       http://doc.trolltech.com/qfocusdata.html
77       http://www.trolltech.com/faq/tech.html
78
80       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
81       license file included in the distribution for a complete license
82       statement.
83

AUTHOR

85       Generated automatically from the source code.
86

BUGS

88       If you find a bug in Qt, please report it as described in
89       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
90       help you. Thank you.
91
92       The definitive Qt documentation is provided in HTML format; it is
93       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
94       web browser. This man page is provided as a convenience for those users
95       who prefer man pages, although this format is not officially supported
96       by Trolltech.
97
98       If you find errors in this manual page, please report them to qt-
99       bugs@trolltech.com.  Please include the name of the manual page
100       (qfocusdata.3qt) and the Qt version (3.3.8).
101
102
103
104Trolltech AS                    2 February 2007                QFocusData(3qt)
Impressum