QRadioButton(3qt)

NAME
QRadioButton - Radio button with a text label

SYNOPSIS

#include <qradiobutton.h>

Inherits QButton.

  Public Members
QRadioButton ( QWidget * parent=0, const char * name=0 )
QRadioButton ( const char * text, QWidget * parent=0, const char * name=0 )
bool isChecked () const
void setChecked ( bool check )
virtual QSize sizeHint () const

  Protected Members
virtual bool hitButton ( const QPoint & ) const
virtual void drawButton ( QPainter * )
virtual void drawButtonLabel ( QPainter * )
virtual void mouseReleaseEvent ( QMouseEvent * )
virtual void keyPressEvent ( QKeyEvent * )

DESCRIPTION
The QRadioButton widget provides a radio button with a text label.

QRadioButton and QCheckBox are both toggle buttons, that is, they can be switched on (checked) or off (unchecked). Unlike check boxes, radio buttons are normally organized in groups where only one radio button can be switched on at a time.

The QButtonGroup widget is very useful for defining groups of radio buttons.

[Image Omitted]

[Image Omitted]

See also: QPushButton, QToolButton and GUI Design Handbook: Radio Button

Examples: drawdemo/drawdemo.cpp xform/xform.cpp pref/pref.cpp widgets/widgets.cpp

MEMBER FUNCTION DOCUMENTATION

QRadioButton::QRadioButton ( QWidget * parent=0, const char * name=0 )
Constructs a radio button with no text.

The parent and name arguments are sent to the QWidget constructor.

QRadioButton::QRadioButton ( const char * text, QWidget * parent=0, const char * name=0 )
Constructs a radio button with a text.

The parent and name arguments are sent to the QWidget constructor.

void QRadioButton::drawButton ( QPainter * paint ) [virtual protected]
Draws the radio button, but not the button label.

See also: drawButtonLabel().

Reimplemented from QButton.

void QRadioButton::drawButtonLabel ( QPainter * p ) [virtual protected]
Draws the radio button label.

See also: drawButton().

Reimplemented from QButton.

bool QRadioButton::hitButton ( const QPoint & pos ) const [virtual protected]
Reimplements QButton::hitButton(). This function is implemented to prevent a radio button that is on from being switched off.

Reimplemented from QButton.

bool QRadioButton::isChecked () const
Returns TRUE if the radio button is checked, or FALSE if it is not checked.

See also: setChecked().

void QRadioButton::keyPressEvent ( QKeyEvent * e ) [virtual protected]
Obsolete; to be removed in Qt 2.0.

Reimplemented from QWidget.

void QRadioButton::mouseReleaseEvent ( QMouseEvent * e ) [virtual protected]
Obsolete; to be removed in Qt 2.0.

Reimplemented from QWidget.

void QRadioButton::setChecked ( bool check )
Checks the radio button if check is TRUE, or unchecks it if check is FALSE.

Calling this function does not affect other radio buttons unless a radio button group has been defined using the QButtonGroup widget.

See also: isChecked().

Examples: drawdemo/drawdemo.cpp widgets/widgets.cpp

QSize QRadioButton::sizeHint () const [virtual]
Returns a size which fits the contents of the radio button.

Examples: widgets/widgets.cpp

Reimplemented from QWidget.

SEE ALSO
http://www.troll.no/qt/qradiobutton.html

COPYRIGHT
Copyright 1992-1997 Troll Tech AS. See the LICENSE file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.