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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
'\" t
.TH TQCheckListItem 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
TQCheckListItem \- Checkable list view items
.SH SYNOPSIS
\fC#include <tqlistview.h>\fR
.PP
Inherits TQListViewItem.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBType\fR { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }"
.br
.ti -1c
.BI "enum \fBToggleState\fR { Off, NoChange, On }"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController )"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController )"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQListView * parent, const TQString & text, Type tt = RadioButtonController )"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQListViewItem * parent, const TQString & text, const TQPixmap & p )"
.br
.ti -1c
.BI "\fBTQCheckListItem\fR ( TQListView * parent, const TQString & text, const TQPixmap & p )"
.br
.ti -1c
.BI "\fB~TQCheckListItem\fR ()"
.br
.ti -1c
.BI "virtual void \fBpaintCell\fR ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )"
.br
.ti -1c
.BI "virtual void \fBpaintFocus\fR ( TQPainter * p, const TQColorGroup & cg, const TQRect & r )"
.br
.ti -1c
.BI "virtual void \fBsetOn\fR ( bool b )"
.br
.ti -1c
.BI "bool \fBisOn\fR () const"
.br
.ti -1c
.BI "Type \fBtype\fR () const"
.br
.ti -1c
.BI "TQString \fBtext\fR () const"
.br
.ti -1c
.BI "void \fBsetTristate\fR ( bool b )"
.br
.ti -1c
.BI "bool \fBisTristate\fR () const"
.br
.ti -1c
.BI "ToggleState \fBstate\fR () const"
.br
.ti -1c
.BI "void \fBsetState\fR ( ToggleState s )"
.br
.ti -1c
.BI "virtual int \fBrtti\fR () const"
.br
.in -1c
.SS "Protected Members"
.in +1c
.ti -1c
.BI "virtual void \fBactivate\fR ()"
.br
.ti -1c
.BI "void \fBturnOffChild\fR ()"
.br
.ti -1c
.BI "virtual void \fBstateChange\fR ( bool )"
.br
.in -1c
.SH DESCRIPTION
The TQCheckListItem class provides checkable list view items.
.PP
TQCheckListItems are used in TQListViews to provide TQListViewItems that are checkboxes, radio buttons or controllers.
.PP
Checkbox and controller check list items may be inserted at any level in a list view. Radio button check list items must be children of a controller check list item.
.PP
The item can be checked or unchecked with setOn(). Its type can be retrieved with type() and its text retrieved with text().
.PP
<center>
.ce 1
.B "[Image Omitted]"
.PP
</center>
.PP
See also TQListViewItem, TQListView, and Advanced Widgets.
.SS "Member Type Documentation"
.SH "TQCheckListItem::ToggleState"
This enum specifies a TQCheckListItem's toggle state.
.TP
\fCTQCheckListItem::Off\fR
.TP
\fCTQCheckListItem::NoChange\fR
.TP
\fCTQCheckListItem::On\fR
.SH "TQCheckListItem::Type"
This enum type specifies a TQCheckListItem's type:
.TP
\fCTQCheckListItem::RadioButton\fR
.TP
\fCTQCheckListItem::CheckBox\fR
.TP
\fCTQCheckListItem::Controller\fR - \fIobsolete\fR (use RadioButtonController instead)
.TP
\fCTQCheckListItem::RadioButtonController\fR
.TP
\fCTQCheckListItem::CheckBoxController\fR
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController )"
Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle.
.SH "TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )"
Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, and with text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle.
.SH "TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController )"
Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController.
.SH "TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )"
Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController.
.SH "TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController )"
Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController.
.SH "TQCheckListItem::TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )"
Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController.
.SH "TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p )"
Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR.
.SH "TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p )"
Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR.
.SH "TQCheckListItem::~TQCheckListItem ()"
Destroys the item, and all its children to any depth, freeing up all allocated resources.
.SH "void TQCheckListItem::activate ()\fC [virtual protected]\fR"
Toggle check box or set radio button to on.
.PP
Reimplemented from TQListViewItem.
.SH "bool TQCheckListItem::isOn () const"
Returns TRUE if the item is toggled on; otherwise returns FALSE.
.SH "bool TQCheckListItem::isTristate () const"
Returns TRUE if the item is tristate; otherwise returns FALSE.
.PP
See also setTristate().
.SH "void TQCheckListItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )\fC [virtual]\fR"
Paints the item using the painter \fIp\fR and the color group \fIcg\fR. The item is in column \fIcolumn\fR, has width \fIwidth\fR and has alignment \fIalign\fR. (See TQt::AlignmentFlags for valid alignments.)
.PP
Reimplemented from TQListViewItem.
.SH "void TQCheckListItem::paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r )\fC [virtual]\fR"
Draws the focus rectangle \fIr\fR using the color group \fIcg\fR on the painter \fIp\fR.
.PP
Reimplemented from TQListViewItem.
.SH "int TQCheckListItem::rtti () const\fC [virtual]\fR"
Returns 1.
.PP
Make your derived classes return their own values for rtti(), and you can distinguish between list view items. You should use values greater than 1000, to allow for extensions to this class.
.PP
Reimplemented from TQListViewItem.
.SH "void TQCheckListItem::setOn ( bool b )\fC [virtual]\fR"
Sets the button on if \fIb\fR is TRUE, otherwise sets it off. Maintains radio button exclusivity.
.SH "void TQCheckListItem::setState ( ToggleState s )"
Sets the toggle state of the checklistitem to \fIs\fR. \fIs\fR can be Off, NoChange or On.
.PP
Tristate can only be enabled for CheckBox or CheckBoxController, therefore the NoChange only applies to them.
.PP
Setting the state to On or Off on a CheckBoxController will recursivly set the states of its children to the same state.
.PP
Setting the state to NoChange on a CheckBoxController will make it recursivly recall the previous stored state of its children. If there was no previous stored state the children are all set to On.
.SH "void TQCheckListItem::setTristate ( bool b )"
Sets tristate to \fIb\fR if the Type is either a CheckBoxController or a CheckBox.
.PP
\fCCheckBoxControllers\fR are tristate by default.
.PP
See also state() and isTristate().
.SH "ToggleState TQCheckListItem::state () const"
Returns the state of the item.
.PP
See also TQCheckListItem::ToggleState.
.SH "void TQCheckListItem::stateChange ( bool )\fC [virtual protected]\fR"
This virtual function is called when the item changes its state. NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so use state() to determine if the state is actually Off or NoChange.
.SH "TQString TQCheckListItem::text () const"
Returns the item's text.
.SH "void TQCheckListItem::turnOffChild ()\fC [protected]\fR"
If this is a RadioButtonController that has RadioButton children, turn off the child that is on.
.SH "Type TQCheckListItem::type () const"
Returns the type of this item.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqchecklistitem.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 (tqchecklistitem.3qt) and the Qt
version (3.3.8).
|