Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The QListBoxItem class is the base class of all list box items. More...
#include <qlistbox.h>
Inherited by QListBoxText and QListBoxPixmap.
This class is an abstract base class used for all list box items. If you need to insert customized items into a QListBox you must inherit this class and reimplement paint(), height() and width().
See also QListBox.
Implement this function to return the height of your item. The lb parameter is the same as listBox() and is provided for convenience and compatibility.
The default implementation returns QApplication::globalStrut()'s height.
Reimplemented in QListBoxText and QListBoxPixmap.
See also QListBox::currentItem, QListBox::item(), and isSelected().
See also setSelectable().
Returns TRUE if the item is selected; otherwise returns FALSE.
See also QListBox::isSelected() and isCurrent().
Example: listboxcombo/listboxcombo.cpp.
See also prev().
Implement this function to draw your item. The painter, p, is already open for painting.
See also height() and width().
Example: listboxcombo/listboxcombo.cpp.
Reimplemented in QListBoxText and QListBoxPixmap.
The default implementation returns 0.
Example: listboxcombo/listboxcombo.cpp.
Reimplemented in QListBoxPixmap.
See also next().
Make your derived classes return their own values for rtti(), and you can distinguish between listbox items. You should use values greater than 1000 preferably a large random number, to allow for extensions to this class.
If b is FALSE (the default), the list box will draw some default highlight indicator before calling paint().
See also selected() and paint().
See also isSelectable().
Sets the text of the QListBoxItem to text. This text is also used for sorting. The text is not shown unless explicitly drawn in paint().
See also text().
See also setText().
Example: listboxcombo/listboxcombo.cpp.
Reimplement this function to return the width of your item. The lb parameter is the same as listBox() and is provided for convenience and compatibility.
The default implementation returns QApplication::globalStrut()'s width.
See also paint() and height().
Reimplemented in QListBoxText and QListBoxPixmap.
This file is part of the Qt toolkit. Copyright © 1995-2005 Trolltech. All Rights Reserved.
Copyright © 2005 Trolltech | Trademarks | Qt 3.3.6
|