⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qlistboxitem.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QListBoxItem 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQListBoxItem \- The base class of all list box items.SH SYNOPSIS\fC#include <qlistbox.h>\fR.PPInherited by QListBoxText and QListBoxPixmap..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQListBoxItem\fR ( QListBox * listbox = 0 )".br.ti -1c.BI "\fBQListBoxItem\fR ( QListBox * listbox, QListBoxItem * after )".br.ti -1c.BI "virtual \fB~QListBoxItem\fR ()".br.ti -1c.BI "virtual QString \fBtext\fR () const".br.ti -1c.BI "virtual const QPixmap * \fBpixmap\fR () const".br.ti -1c.BI "virtual int \fBheight\fR ( const QListBox * lb ) const".br.ti -1c.BI "virtual int \fBwidth\fR ( const QListBox * lb ) const".br.ti -1c.BI "bool \fBisSelected\fR () const".br.ti -1c.BI "bool \fBisCurrent\fR () const".br.ti -1c.BI "bool selected () const  \fI(obsolete)\fR".br.ti -1c.BI "bool current () const  \fI(obsolete)\fR".br.ti -1c.BI "QListBox * \fBlistBox\fR () const".br.ti -1c.BI "void \fBsetSelectable\fR ( bool b )".br.ti -1c.BI "bool \fBisSelectable\fR () const".br.ti -1c.BI "QListBoxItem * \fBnext\fR () const".br.ti -1c.BI "QListBoxItem * \fBprev\fR () const".br.ti -1c.BI "virtual int \fBrtti\fR () const".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBpaint\fR ( QPainter * p ) = 0".br.ti -1c.BI "virtual void \fBsetText\fR ( const QString & text )".br.ti -1c.BI "void \fBsetCustomHighlighting\fR ( bool b )".br.in -1c.SH DESCRIPTIONThe QListBoxItem class is the base class of all list box items..PPThis 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()..PPSee also QListBox..SH MEMBER FUNCTION DOCUMENTATION.SH "QListBoxItem::QListBoxItem ( QListBox * listbox = 0 )"Constructs an empty list box item in the list box \fIlistbox\fR..SH "QListBoxItem::QListBoxItem ( QListBox * listbox, QListBoxItem * after )"Constructs an empty list box item in the list box \fIlistbox\fR and inserts it after the item \fIafter\fR or at the beginning if \fIafter\fR is 0..SH "QListBoxItem::~QListBoxItem ()\fC [virtual]\fR"Destroys the list box item..SH "bool QListBoxItem::current () const"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "int QListBoxItem::height ( const QListBox * lb ) const\fC [virtual]\fR"Implement this function to return the height of your item. The \fIlb\fR parameter is the same as listBox() and is provided for convenience and compatibility..PPThe default implementation returns QApplication::globalStrut()'s height..PPSee also paint() and width()..PPReimplemented in QListBoxText and QListBoxPixmap..SH "bool QListBoxItem::isCurrent () const"Returns TRUE if the item is the current item; otherwise returns FALSE..PPSee also QListBox::currentItem, QListBox::item(), and isSelected()..SH "bool QListBoxItem::isSelectable () const"Returns TRUE if this item is selectable (the default); otherwise returns FALSE..PPSee also setSelectable()..SH "bool QListBoxItem::isSelected () const"Returns TRUE if the item is selected; otherwise returns FALSE..PPSee also QListBox::isSelected() and isCurrent()..PPExample: listboxcombo/listboxcombo.cpp..SH "QListBox * QListBoxItem::listBox () const"Returns a pointer to the list box containing this item..SH "QListBoxItem * QListBoxItem::next () const"Returns the item that comes after this in the list box. If this is the last item, 0 is returned..PPSee also prev()..SH "void QListBoxItem::paint ( QPainter * p )\fC [pure virtual protected]\fR"Implement this function to draw your item. The painter, \fIp\fR, is already open for painting..PPSee also height() and width()..PPExample: listboxcombo/listboxcombo.cpp..PPReimplemented in QListBoxText and QListBoxPixmap..SH "const QPixmap * QListBoxItem::pixmap () const\fC [virtual]\fR"Returns the pixmap associated with the item, or 0 if there isn't one..PPThe default implementation returns 0..PPExample: listboxcombo/listboxcombo.cpp..PPReimplemented in QListBoxPixmap..SH "QListBoxItem * QListBoxItem::prev () const"Returns the item which comes before this in the list box. If this is the first item, 0 is returned..PPSee also next()..SH "int QListBoxItem::rtti () const\fC [virtual]\fR"Returns 0..PPMake 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..SH "bool QListBoxItem::selected () const"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QListBoxItem::setCustomHighlighting ( bool b )\fC [protected]\fR"Defines whether the list box item is responsible for drawing itself in a highlighted state when being selected..PPIf \fIb\fR is FALSE (the default), the list box will draw some default highlight indicator before calling paint()..PPSee also selected() and paint()..SH "void QListBoxItem::setSelectable ( bool b )"If \fIb\fR is TRUE (the default) then this item can be selected by the user; otherwise this item cannot be selected by the user..PPSee also isSelectable()..SH "void QListBoxItem::setText ( const QString & text )\fC [virtual protected]\fR"Sets the text of the QListBoxItem to \fItext\fR. This \fItext\fR is also used for sorting. The text is not shown unless explicitly drawn in paint()..PPSee also text()..SH "QString QListBoxItem::text () const\fC [virtual]\fR"Returns the text of the item. This text is also used for sorting..PPSee also setText()..PPExample: listboxcombo/listboxcombo.cpp..SH "int QListBoxItem::width ( const QListBox * lb ) const\fC [virtual]\fR"Reimplement this function to return the width of your item. The \fIlb\fR parameter is the same as listBox() and is provided for convenience and compatibility..PPThe default implementation returns QApplication::globalStrut()'s width..PPSee also paint() and height()..PPReimplemented in QListBoxText and QListBoxPixmap..SH "SEE ALSO".BR http://doc.trolltech.com/qlistboxitem.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf 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..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qlistboxitem.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -