.TH "KButtonBox" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KButtonBox \- Container widget for buttons.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kbuttonbox.h>\fP
.PP
Inherits \fBQWidget\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKButtonBox\fP (\fBQWidget\fP *parent, Orientation _orientation=Horizontal, int border=0, int _autoborder=6)"
.br
.ti -1c
.RI "\fB~KButtonBox\fP ()"
.br
.ti -1c
.RI "virtual \fBQSize\fP \fBsizeHint\fP () const "
.br
.ti -1c
.RI "virtual \fBQSizePolicy\fP \fBsizePolicy\fP () const "
.br
.ti -1c
.RI "virtual void \fBresizeEvent\fP (\fBQResizeEvent\fP *)"
.br
.ti -1c
.RI "\fBQPushButton\fP * \fBaddButton\fP (const \fBQString\fP &text, bool noexpand=false)"
.br
.ti -1c
.RI "\fBQPushButton\fP * \fBaddButton\fP (const \fBQString\fP &text, \fBQObject\fP *receiver, const char *slot, bool noexpand=false)"
.br
.ti -1c
.RI "\fBQPushButton\fP * \fBaddButton\fP (const \fBKGuiItem\fP &guiitem, bool noexpand=false)"
.br
.ti -1c
.RI "\fBQPushButton\fP * \fBaddButton\fP (const \fBKGuiItem\fP &guiitem, \fBQObject\fP *receiver, const char *slot, bool noexpand=false)"
.br
.ti -1c
.RI "void \fBaddStretch\fP (int scale=1)"
.br
.ti -1c
.RI "void \fBlayout\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBQSize\fP \fBbestButtonSize\fP () const "
.br
.ti -1c
.RI "void \fBplaceButtons\fP ()"
.br
.ti -1c
.RI "\fBQSize\fP \fBbuttonSizeHint\fP (\fBQPushButton\fP *) const "
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Container widget for buttons. 

This class uses \fBQt\fP layout control to place the buttons; can handle both vertical and horizontal button placement. The default border is now \fC0\fP (making it easier to deal with layouts). The space between buttons is now more Motif compliant.
.PP
\fBAuthor:\fP
.RS 4
Mario Weilguni <mweilguni@sime.com> 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkbuttonbox.h\fP 360744 2004-11-05 15:49:23Z coles 
.RE
.PP
.RE
.PP

.PP
Definition at line 42 of file kbuttonbox.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KButtonBox::KButtonBox (\fBQWidget\fP * parent, Orientation _orientation = \fCHorizontal\fP, int border = \fC0\fP, int _autoborder = \fC6\fP)"
.PP
Create an empty container for buttons. 
.PP
If \fC_orientation\fP is \fCVertical\fP, the buttons inserted with \fBaddButton()\fP are laid out from top to bottom, otherwise they are laid out from left to right. 
.PP
Definition at line 82 of file kbuttonbox.cpp.
.SS "KButtonBox::~\fBKButtonBox\fP ()"
.PP
Free private data field. 
.PP
Definition at line 94 of file kbuttonbox.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBQSize\fP KButtonBox::sizeHint () const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
The minimum size needed to fit all buttons.
.RE
.PP
This size is calculated by the width/height of all buttons plus border/autoborder. 
.PP
Reimplemented from \fBQWidget\fP.
.PP
Definition at line 303 of file kbuttonbox.cpp.
.PP
References bestButtonSize(), QSize::height(), and QSize::width().
.PP
Referenced by layout().
.SS "\fBQPushButton\fP * KButtonBox::addButton (const \fBQString\fP & text, bool noexpand = \fCfalse\fP)"
.PP
Add a new \fBQPushButton\fP. 
.PP
\fBParameters:\fP
.RS 4
\fItext\fP the text of the button to add 
.br
\fInoexpand\fP If \fCnoexpand\fP is \fCfalse\fP, the width of the button is adjusted to fit the other buttons (the maximum of all buttons is taken). If \fCnoexpand\fP is \fCtrue\fP, the width of this button will be set to the minimum width needed for the given text).
.RE
.PP
\fBReturns:\fP
.RS 4
A pointer to the new button. 
.RE
.PP

.PP
Definition at line 98 of file kbuttonbox.cpp.
.PP
References QWidget::updateGeometry().
.PP
Referenced by addButton().
.SS "\fBQPushButton\fP * KButtonBox::addButton (const \fBQString\fP & text, \fBQObject\fP * receiver, const char * slot, bool noexpand = \fCfalse\fP)"
.PP
Add a new \fBQPushButton\fP. 
.PP
\fBParameters:\fP
.RS 4
\fItext\fP the text of the button to add. 
.br
\fIreceiver\fP An object to connect to. 
.br
\fIslot\fP A \fBQt\fP slot to connect the 'clicked()' signal to. 
.br
\fInoexpand\fP If \fCnoexpand\fP is \fCfalse\fP, the width of the button is adjusted to fit the other buttons (the maximum of all buttons is taken). If \fCnoexpand\fP \fCtrue\fP, the width of this button will be set to the minimum width needed for the given text).
.RE
.PP
\fBReturns:\fP
.RS 4
A pointer to the new button. 
.RE
.PP

.PP
Definition at line 123 of file kbuttonbox.cpp.
.PP
References addButton(), and QObject::connect().
.SS "\fBQPushButton\fP * KButtonBox::addButton (const \fBKGuiItem\fP & guiitem, bool noexpand = \fCfalse\fP)"
.PP
Add a new \fBQPushButton\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIguiitem\fP text and icon on the button 
.br
\fInoexpand\fP If \fCnoexpand\fP is \fCfalse\fP, the width of the button is adjusted to fit the other buttons (the maximum of all buttons is taken). If \fCnoexpand\fP is \fCtrue\fP, the width of this button will be set to the minimum width needed for the given text).
.RE
.PP
\fBReturns:\fP
.RS 4
A pointer to the new button.
.RE
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 110 of file kbuttonbox.cpp.
.PP
References QWidget::updateGeometry().
.SS "\fBQPushButton\fP * KButtonBox::addButton (const \fBKGuiItem\fP & guiitem, \fBQObject\fP * receiver, const char * slot, bool noexpand = \fCfalse\fP)"
.PP
Add a new \fBQPushButton\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIguiitem\fP text and icon on the button 
.br
\fIreceiver\fP An object to connect to. 
.br
\fIslot\fP A \fBQt\fP slot to connect the 'clicked()' signal to. 
.br
\fInoexpand\fP If \fCnoexpand\fP is \fCfalse\fP, the width of the button is adjusted to fit the other buttons (the maximum of all buttons is taken). If \fCnoexpand\fP \fCtrue\fP, the width of this button will be set to the minimum width needed for the given text).
.RE
.PP
\fBReturns:\fP
.RS 4
A pointer to the new button.
.RE
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 139 of file kbuttonbox.cpp.
.PP
References addButton(), and QObject::connect().
.SS "void KButtonBox::addStretch (int scale = \fC1\fP)"
.PP
Add a stretch to the buttonbox. 
.PP
Can be used to separate buttons. That is, if you add the buttons OK and Cancel, add a stretch, and then add the button Help, the buttons OK and Cancel will be left-aligned (or top-aligned for vertical) whereas Help will be right-aligned (or bottom-aligned for vertical).
.PP
\fBSee also:\fP
.RS 4
\fBQBoxLayout\fP 
.RE
.PP

.PP
Definition at line 154 of file kbuttonbox.cpp.
.SS "void KButtonBox::layout ()"
.PP
This function must be called \fIonce\fP after all buttons have been inserted. 
.PP
It will start layout control. 
.PP
Definition at line 163 of file kbuttonbox.cpp.
.PP
References bestButtonSize(), QWidget::setMinimumSize(), and sizeHint().
.SS "\fBQSize\fP KButtonBox::bestButtonSize () const\fC [protected]\fP"
.PP
\fBReturns:\fP
.RS 4
the best size for a button. Checks all buttons and takes the maximum width/height. 
.RE
.PP

.PP
Definition at line 276 of file kbuttonbox.cpp.
.PP
References QSize::height(), QSize::setHeight(), QSize::setWidth(), and QSize::width().
.PP
Referenced by layout(), and sizeHint().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
