📄 qchecklistitem.3qt
字号:
'\" t.TH QCheckListItem 3qt "11 October 2001" "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 NAMEQCheckListItem \- Checkable list view items.PP\fC#include <qlistview.h>\fR.PPInherits QListViewItem..PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBType\fR { RadioButton, CheckBox, Controller }".br.ti -1c.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, const QString & text, Type tt = Controller )".br.ti -1c.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, Type tt = Controller )".br.ti -1c.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, Type tt = Controller )".br.ti -1c.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, const QPixmap & p )".br.ti -1c.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, const QPixmap & p )".br.ti -1c.BI "\fB~QCheckListItem\fR ()".br.ti -1c.BI "virtual void \fBpaintCell\fR ( QPainter * p, const QColorGroup & cg, int column, int width, int align )".br.ti -1c.BI "virtual void \fBpaintFocus\fR ( QPainter * p, const QColorGroup & cg, const QRect & r )".br.ti -1c.BI "virtual void \fBsetOn\fR ( bool b )".br.ti -1c.BI "bool \fBisOn\fR () const".br.ti -1c.BI "Type \fBtype\fR () const".br.ti -1c.BI "QString \fBtext\fR () const".br.ti -1c.BI "virtual int \fBrtti\fR () const".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBactivate\fR ()".br.ti -1c.BI "void \fBturnOffChild\fR ()".br.ti -1c.BI "virtual void \fBstateChange\fR ( bool )".br.in -1c.SH DESCRIPTIONThe QCheckListItem class provides checkable list view items..PPThere are three types of check list items: checkboxes, radio buttons and controllers..PPCheckboxes may be inserted at the top level in the list view. A radio button must be the child of a controller..PPThe item can be checked or unchecked with setOn(). Its type can be retrieved with type() and its text retrieved with text()..PPSee also Advanced Widgets..SS "Member Type Documentation".SH "QCheckListItem::Type"This enum type specifies a QCheckListItem's type:.TP\fCQCheckListItem::RadioButton\fR.TP\fCQCheckListItem::CheckBox\fR.TP\fCQCheckListItem::Controller\fR.SH MEMBER FUNCTION DOCUMENTATION.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, const QString & text, Type tt = Controller )"Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and type \fItt\fR. Note that a RadioButton must be the child of a Controller, otherwise it will not toggle..SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, Type tt = Controller )"Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a Controller..SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, Type tt = Controller )"Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a Controller..SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, const QPixmap & p )"Constructs a Controller item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR..SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, const QPixmap & p )"Constructs a Controller item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR..SH "QCheckListItem::~QCheckListItem ()"Destroys the item, deleting all its children, freeing up all allocated resources..SH "void QCheckListItem::activate ()\fC [virtual protected]\fR"Toggle check box or set radio button to on..PPReimplemented from QListViewItem..SH "bool QCheckListItem::isOn () const"Returns TRUE if the item is toggled on; otherwise returns FALSE..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 is aligned \fIalign\fR. (See Qt::AlignmentFlags for valid alignments.).PPReimplemented from QListViewItem..SH "void QCheckListItem::paintFocus ( QPainter * p, const QColorGroup & cg, const QRect & r )\fC [virtual]\fR"Draws the focus rectangle \fIr\fR using the color group \fIcg\fR on the painter \fIp\fR..PPReimplemented from QListViewItem..SH "int QCheckListItem::rtti () const\fC [virtual]\fR"Returns 1..PPMake your derived classes return their own values for rtti(), and you can distinguish between listview items. You should use values greater than 1000 preferably a large random number, to allow for extensions to this class..PPReimplemented 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::stateChange ( bool )\fC [virtual protected]\fR"This virtual function is called when the item changes its on/off state..SH "QString QCheckListItem::text () const"Returns the text of the item..SH "void QCheckListItem::turnOffChild ()\fC [protected]\fR"If this is a Controller that has RadioButton children, turn off the child that is on..SH "Type QCheckListItem::type () const"Returns the type of this item..SH "SEE ALSO".BR http://doc.trolltech.com/qchecklistitem.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 (qchecklistitem.3qt) and the Qtversion (3.0.0).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -