Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The TQListBoxItem class is the base class of all list box items. More...
#include <tqlistbox.h>
Inherited by TQListBoxText and TQListBoxPixmap.
This class is an abstract base class used for all list box items. If you need to insert customized items into a TQListBox you must inherit this class and reimplement paint(), height() and width().
See also TQListBox.
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 TQApplication::globalStrut()'s height.
Reimplemented in TQListBoxText and TQListBoxPixmap.
See also TQListBox::currentItem, TQListBox::item(), and isSelected().
See also setSelectable().
Returns TRUE if the item is selected; otherwise returns FALSE.
See also TQListBox::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 TQListBoxText and TQListBoxPixmap.
The default implementation returns 0.
Example: listboxcombo/listboxcombo.cpp.
Reimplemented in TQListBoxPixmap.
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 TQListBoxItem 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 TQApplication::globalStrut()'s width.
See also paint() and height().
Reimplemented in TQListBoxText and TQListBoxPixmap.
This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.
Copyright © 2007 Trolltech | Trademarks | TQt 3.3.8
|