.TH "KButtonBox" 3 "28 Jan 2004" "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
.RI "\fICreate an empty container for buttons. \fP"
.ti -1c
.RI "\fB~KButtonBox\fP ()"
.br
.RI "\fIFree private data field. \fP"
.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
.RI "\fIAdd a new \fBQPushButton\fP. \fP"
.ti -1c
.RI "\fBQPushButton\fP * \fBaddButton\fP (const  \fBQString\fP &text, \fBQObject\fP *receiver, const  char *slot, bool noexpand=FALSE)"
.br
.RI "\fIAdd a new \fBQPushButton\fP. \fP"
.ti -1c
.RI "void \fBaddStretch\fP (int scale=1)"
.br
.RI "\fIAdd a stretch to the buttonbox. \fP"
.ti -1c
.RI "void \fBlayout\fP ()"
.br
.RI "\fIThis function must be called \fIonce\fP after all buttons have been inserted. \fP"
.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,v 1.26 2002/03/04 00:51:46 lunakl Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 39 of file kbuttonbox.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KButtonBox::KButtonBox (\fBQWidget\fP * parent, Orientation _orientation = Horizontal, int border = 0, int _autoborder = 6)"
.PP
Create an empty container for buttons. 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. Definition at line 74 of file kbuttonbox.cpp.
.SS "KButtonBox::~\fBKButtonBox\fP ()"
.PP
Free private data field. Definition at line 87 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. Reimplemented from \fBQWidget\fP.
.PP
Definition at line 232 of file kbuttonbox.cpp.
.PP
References bestButtonSize(), buttonSizeHint(), data, QSize::height(), and QSize::width().
.PP
Referenced by layout().
.SS "\fBQPushButton\fP * KButtonBox::addButton (const \fBQString\fP & text, bool noexpand = FALSE)"
.PP
Add a new \fBQPushButton\fP. \fBParameters:\fP
.RS 4
\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
Definition at line 91 of file kbuttonbox.cpp.
.PP
Referenced by addButton().
.SS "\fBQPushButton\fP * KButtonBox::addButton (const \fBQString\fP & text, \fBQObject\fP * receiver, const char * slot, bool noexpand = FALSE)"
.PP
Add a new \fBQPushButton\fP. \fBParameters:\fP
.RS 4
\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
Definition at line 103 of file kbuttonbox.cpp.
.PP
References addButton(), and QObject::connect().
.SS "void KButtonBox::addStretch (int scale = 1)"
.PP
Add a stretch to the buttonbox. 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
Definition at line 119 of file kbuttonbox.cpp.
.SS "void KButtonBox::layout ()"
.PP
This function must be called \fIonce\fP after all buttons have been inserted. It will start layout control. Definition at line 129 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
Definition at line 209 of file kbuttonbox.cpp.
.PP
References data, 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.
