The QCheckListItem class provides checkable list view items.
.PP
QCheckListItems are used in QListViews to provide QListViewItems 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 QListViewItem, QListView, and Advanced Widgets.
.SS "Member Type Documentation"
.SH "QCheckListItem::ToggleState"
This enum specifies a QCheckListItem's toggle state.
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.
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.
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.
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.
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.
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.
Returns TRUE if the item is toggled on; otherwise returns FALSE.
.SH "bool QCheckListItem::isTristate () const"
Returns TRUE if the item is tristate; otherwise returns FALSE.
.PP
See also setTristate().
.SH "void QCheckListItem::paintCell ( QPainter * p, const QColorGroup & 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 Qt::AlignmentFlags for valid alignments.)
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 QListViewItem.
.SH "void QCheckListItem::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 QCheckListItem::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 QCheckListItem::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.
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.