Qt logo

QCheckListItem Class Reference


The QCheckListItem class implements checkable list view items. More...

#include <qlistview.h>

Inherits QListViewItem.

List of all member functions.

Public Members

Protected Members


Detailed Description

The QCheckListItem class implements checkable list view items.

There are three types of check list items: CheckBox, RadioButton and Controller.

Checkboxes may be inserted at top level in the list view. A radio button must be child of a controller.


Member Function Documentation

QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, Type tt = Controller )

Constructs a checkable item with parent parent, text text and type tt. Note that tt must not be RadioButton, if so it will not toggle.

QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, const QPixmap & p )

Constructs a Controller item with parent parent, text text and pixmap p.

QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, Type tt = Controller )

Constructs a checkable item with parent parent, text text and type tt. Note that this item must not be a a RadioButton. Radio buttons must be children on a Controller.

QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, const QPixmap & p )

Constructs a Controller item with parent parent, text text and pixmap p.

QCheckListItem::QCheckListItem ( QCheckListItem * parent, const QString & text, Type tt = Controller )

Constructs a checkable item with parent parent, text text and type tt. Note that a RadioButton must be child of a Controller, otherwise it will not toggle.

void QCheckListItem::activate () [virtual protected]

Toggle checkbox, or set radio button on.

Reimplemented from QListViewItem.

bool QCheckListItem::isOn () const

Returns TRUE if this item is toggled on, FALSE otherwise.

void QCheckListItem::paintBranches ( QPainter * p, const QColorGroup & cg, int w, int, int h, GUIStyle ) [virtual protected]

Fills the rectangle. No decoration is drawn.

Reimplemented from QListViewItem.

void QCheckListItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) [virtual]

Paints this item.

Reimplemented from QListViewItem.

void QCheckListItem::paintFocus ( QPainter * p, const QColorGroup & cg, const QRect & r ) [virtual]

Draws the focus rectangle.

void QCheckListItem::setOn ( bool b ) [virtual]

Sets this button on if b is TRUE, off otherwise. Maintains radio button exclusivity.

void QCheckListItem::setup () [virtual]

Performs setup.

Reimplemented from QListViewItem.

void QCheckListItem::stateChange ( bool ) [virtual protected]

This virtual function is called when the item changes its on/off state.

QString QCheckListItem::text () const

Returns the text of this item.

QString QCheckListItem::text ( int n ) const [virtual]

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QListViewItem.

void QCheckListItem::turnOffChild () [protected]

If this is a Controller that has RadioButton children, turn off the child that is on.


Search the documentation, FAQ, qt-interest archive and more (uses www.troll.no):


This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.


Copyright İ 1999 Troll TechTrademarks
Qt version 2.0.2