libkdepim Library API Documentation

KPrefsWidRadios Class Reference

Widget for settings represented by a group of radio buttons in KPrefsDialog. More...

#include <kprefsdialog.h>

Inheritance diagram for KPrefsWidRadios:

KPrefsWid List of all members.

Public Member Functions

 KPrefsWidRadios (const QString &text, int *reference, QWidget *parent)
 Create a widget for selection of an option.

void addRadio (const QString &text)
 Add a radio button.

QButtonGroupgroupBox ()
 Return the box widget used by this widget.

void readConfig ()
 This function is called to read value of the setting from the stored configuration and display it in the widget.

void writeConfig ()
 This function is called to write the current setting of the widget to the stored configuration.


Detailed Description

Widget for settings represented by a group of radio buttons in KPrefsDialog.

This class provides a widget for configuring selections. It is meant to be used by KPrefsDialog. The user is responsible for the layout management. The setting is interpreted as an int value, corresponding to the position of the radio button. The position of the button is defined by the sequence of addRadio() calls, starting with 0.

Definition at line 238 of file kprefsdialog.h.


Constructor & Destructor Documentation

KPrefsWidRadios::KPrefsWidRadios const QString text,
int *  reference,
QWidget parent
 

Create a widget for selection of an option.

It consists of a box with several radio buttons.

Parameters:
text Text of main box.
reference Pointer to variable read and written by this widget.
parent Parent widget.

Definition at line 201 of file kprefsdialog.cpp.


Member Function Documentation

void KPrefsWidRadios::addRadio const QString text  ) 
 

Add a radio button.

Parameters:
text Text of the button.

Definition at line 213 of file kprefsdialog.cpp.

QButtonGroup * KPrefsWidRadios::groupBox  ) 
 

Return the box widget used by this widget.

Definition at line 218 of file kprefsdialog.cpp.

void KPrefsWidRadios::readConfig  )  [virtual]
 

This function is called to read value of the setting from the stored configuration and display it in the widget.

Implements KPrefsWid.

Definition at line 223 of file kprefsdialog.cpp.

References QButtonGroup::setButton().

void KPrefsWidRadios::writeConfig  )  [virtual]
 

This function is called to write the current setting of the widget to the stored configuration.

Implements KPrefsWid.

Definition at line 228 of file kprefsdialog.cpp.

References QButtonGroup::id(), and QButtonGroup::selected().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:00 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001