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

📄 qcheckbox.3qt

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 3QT
字号:
.TH QCheckBox 3qt "10 November 2000" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2000 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQCheckBox \- Check box with a text label.SH SYNOPSIS.br.PP\fC#include <qcheckbox.h>\fR.PPInherits QButton..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQCheckBox\fR ( QWidget * " "parent" ", const char * " "name" "=0 ) ".br.ti -1c.BI "\fBQCheckBox\fR ( const QString & " "text" ", QWidget * " "parent" ", const char * " "name" "=0 ) ".br.ti -1c.BI "bool \fBisChecked\fR () const".br.ti -1c.BI "void \fBsetChecked\fR ( bool check ) ".br.ti -1c.BI "void \fBsetNoChange\fR () ".br.ti -1c.BI "void \fBsetTristate\fR ( bool " "y" "=TRUE ) ".br.ti -1c.BI "bool \fBisTristate\fR () const".br.in -1c.SS "Important Inherited Members".in +1c.ti -1c.BI "QString \fBtext\fR () const".br.ti -1c.BI "virtual void \fBsetText\fR ( const QString & text ) ".br.ti -1c.BI "QString \fBtext\fR () const".br.ti -1c.BI "const QPixmap* \fBpixmap\fR () const".br.ti -1c.BI "virtual void \fBsetPixmap\fR ( const QPixmap & pixmap ) ".br.ti -1c.BI "int \fBaccel\fR () const".br.ti -1c.BI "virtual void \fBsetAccel\fR ( int key ) ".br.ti -1c.BI "bool \fBisToggleButton\fR () const".br.ti -1c.BI "virtual void \fBsetDown\fR ( bool enable ) ".br.ti -1c.BI "bool \fBisDown\fR () const".br.ti -1c.BI "bool \fBisOn\fR () const".br.ti -1c.BI "bool \fBautoRepeat\fR () const".br.ti -1c.BI "bool \fBisExclusiveToggle\fR () const".br.ti -1c.BI "QButtonGroup* \fBgroup\fR () const".br.ti -1c.BI "virtual void \fBsetAutoRepeat\fR ( bool enable ) ".br.ti -1c.BI "void \fBtoggle\fR () ".br.ti -1c.BI "void \fBpressed\fR () ".br.ti -1c.BI "void \fBreleased\fR () ".br.ti -1c.BI "void \fBclicked\fR () ".br.ti -1c.BI "void \fBtoggled\fR ( bool on ) ".br.ti -1c.BI "void \fBstateChanged\fR ( int state ) ".br.in -1c.SS "Properties"<table border=1 cellpadding=3 cellspacing=0> <tr><th>Type<th>Name<th>READ<th>WRITE<th>Options <tr><td>bool<td>checked<td>isChecked<td>setChecked<td>&nbsp; <tr><td>bool<td>tristate<td>isTristate<td>setTristate<td>&nbsp; </table>.SH DESCRIPTIONThe QCheckBox widget provides a check box with a text label..PPQCheckBox and QRadioButton are both option buttons. That is, they can be switched on (checked) or off (unchecked). The classes differ in how the choices for the user are restricted. Radio buttons define a "one of many" choice, while check-boxes provide "many of many" choices..PPWhile it is technically possible to implement radio-behaviour with check boxes and vice versa, it's strongly recommended to stick with the well-known semantics. Otherwise your users would be pretty confused..PPUse QButtonGroup to group check-buttons visually..PPWhenver a check box is checked or cleared, it emits the signal toggled(). Connect to this signal if you want to trigger an action each time the box changes state. Otherwise, use isChecked() to query whether or not a particular check box is selected..PPIn addition to the usual checked and unchecked states, QCheckBox optionally provides a third state to indicate "no change". This is useful whenever you need to give the user the option of neither setting nor unsetting an option. If you need that third state, enable it with setTristate() and use state() to query the current toggle state. When a tristate box changes state, it emits the stateChanged() signal..PP<img src=qchkbox-m.png> <img src=qchkbox-w.png>.PPSee also QButton, QRadioButton and Fowler: Check Box..PPExamples:.(lxform/xform.cpp i18n/main.cpp.)l.SH MEMBER FUNCTION DOCUMENTATION.SH "QCheckBox::QCheckBox ( QWidget * parent, const char * name=0 )"Constructs a check box with no text..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QCheckBox::QCheckBox ( const QString & text, QWidget * parent, const char * name=0 )"Constructs a check box with a text..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "void QCheckBox::drawButton ( QPainter * paint ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QButton..SH "void QCheckBox::drawButtonLabel ( QPainter * p ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QButton..SH "bool QCheckBox::isChecked () const"Returns TRUE if the check box is checked, or FALSE if it is not checked..PPSee also setChecked()..PPExamples:.(lxform/xform.cpp.)l.SH "bool QCheckBox::isTristate () const"Returns TRUE if the checkbox is a tristate checkbox. Otherwise returns FALSE..PPSee also setTristate()..SH "void QCheckBox::resizeEvent ( QResizeEvent * ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QCheckBox::setChecked ( bool check )"Checks the check box if \fIcheck\fR is TRUE, or unchecks it if \fIcheck\fR is FALSE..PPSee also isChecked()..SH "void QCheckBox::setNoChange ()"Sets the checkbox into the "no change" state..PPSee also setTristate()..SH "void QCheckBox::setTristate ( bool y=TRUE )"Makes the check box a tristate check box if \fIy\fR is TRUE. A tristate check box provides an additional state NoChange..PPUse tristate check boxes whenever you need to give the user the option of neither setting nor unsetting an option. A typical example is the "Italic" check box in the font dialog of a word processor when the marked text is partially Italic and partially not..PPSee also isTristate(), setNoChange(), stateChanged() and state()..SH "QSize QCheckBox::sizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "QSizePolicy QCheckBox::sizePolicy () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QCheckBox::updateMask () \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "SEE ALSO".BR http://doc.trolltech.com/qcheckbox.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

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