summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqfocusdata.3qt
blob: d37664ce3caf3434397733d073ffe982e6c65fae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
'\" t
.TH TQFocusData 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
TQFocusData \- Maintains the list of widgets in the focus chain
.SH SYNOPSIS
\fC#include <tqfocusdata.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "TQWidget * \fBfocusWidget\fR () const"
.br
.ti -1c
.BI "TQWidget * \fBhome\fR ()"
.br
.ti -1c
.BI "TQWidget * \fBnext\fR ()"
.br
.ti -1c
.BI "TQWidget * \fBprev\fR ()"
.br
.ti -1c
.BI "TQWidget * \fBfirst\fR () const"
.br
.ti -1c
.BI "TQWidget * \fBlast\fR () const"
.br
.ti -1c
.BI "int \fBcount\fR () const"
.br
.in -1c
.SH DESCRIPTION
The TQFocusData class maintains the list of widgets in the focus chain.
.PP
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.
.PP
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.
.PP
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.
.PP
The cursor may change at any time.
.PP
This class is \fInot\fR thread-safe.
.PP
See also TQWidget::focusNextPrevChild(), TQWidget::setTabOrder(), TQWidget::focusPolicy, and Miscellaneous Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "int TQFocusData::count () const"
Returns the number of widgets in the focus chain.
.SH "TQWidget * TQFocusData::first () const"
Returns the first widget in the focus chain. The cursor is not modified.
.SH "TQWidget * TQFocusData::focusWidget () const"
Returns the widgets in the hierarchy that are in the focus chain.
.SH "TQWidget * TQFocusData::home ()"
Moves the cursor to the focusWidget() and returns that widget. You must call this before next() or prev() to iterate meaningfully.
.SH "TQWidget * TQFocusData::last () const"
Returns the last widget in the focus chain. The cursor is not modified.
.SH "TQWidget * TQFocusData::next ()"
Moves the cursor to the next widget in the focus chain. There is \fIalways\fR a next widget because the list is a loop.
.SH "TQWidget * TQFocusData::prev ()"
Moves the cursor to the previous widget in the focus chain. There
is \fIalways\fR a previous widget because the list is a loop.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqfocusdata.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 [email protected] .
Please include the name of the manual page (tqfocusdata.3qt) and the Qt
version (3.3.8).