\section{KButton\-Box Class Reference}
\label{classKButtonBox}\index{KButtonBox@{KButtonBox}}
Container widget for buttons.  


{\tt \#include $<$kbuttonbox.h$>$}

Inheritance diagram for KButton\-Box:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKButtonBox__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KButton\-Box:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKButtonBox__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KButton\-Box} ({\bf QWidget} $\ast$parent, Orientation \_\-orientation=Horizontal, int border=0, int \_\-autoborder=6)
\begin{CompactList}\small\item\em Create an empty container for buttons. \item\end{CompactList}\item 
{\bf $\sim$KButton\-Box} ()
\begin{CompactList}\small\item\em Free private data field. \item\end{CompactList}\item 
virtual {\bf QSize} {\bf size\-Hint} () const 
\item 
virtual {\bf QSize\-Policy} {\bf size\-Policy} () const \label{classKButtonBox_a3}

\item 
virtual void {\bf resize\-Event} ({\bf QResize\-Event} $\ast$)\label{classKButtonBox_a4}

\item 
{\bf QPush\-Button} $\ast$ {\bf add\-Button} (const  {\bf QString} \&text, bool noexpand=FALSE)
\begin{CompactList}\small\item\em Add a new {\bf QPush\-Button}. \item\end{CompactList}\item 
{\bf QPush\-Button} $\ast$ {\bf add\-Button} (const  {\bf QString} \&text, {\bf QObject} $\ast$receiver, const  char $\ast$slot, bool noexpand=FALSE)
\begin{CompactList}\small\item\em Add a new {\bf QPush\-Button}. \item\end{CompactList}\item 
void {\bf add\-Stretch} (int scale=1)
\begin{CompactList}\small\item\em Add a stretch to the buttonbox. \item\end{CompactList}\item 
void {\bf layout} ()
\begin{CompactList}\small\item\em This function must be called {\em once\/} after all buttons have been inserted. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf QSize} {\bf best\-Button\-Size} () const 
\item 
void {\bf place\-Buttons} ()\label{classKButtonBox_b1}

\item 
{\bf QSize} {\bf button\-Size\-Hint} ({\bf QPush\-Button} $\ast$) const \label{classKButtonBox_b2}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKButtonBox_b3}

\end{CompactItemize}


\subsection{Detailed Description}
Container widget for buttons. 

This class uses {\bf Qt} layout control to place the buttons; can handle both vertical and horizontal button placement. The default border is now {\tt 0} (making it easier to deal with layouts). The space between buttons is now more Motif compliant.

\begin{Desc}
\item[Author:]Mario Weilguni $<${\tt mweilguni@sime.com}$>$ \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kbuttonbox.h}{\rm (p.\,\pageref{kbuttonbox_8h})},v 1.26 2002/03/04 00:51:46 lunakl Exp \end{Desc}
\end{Desc}




Definition at line 39 of file kbuttonbox.h.

\subsection{Constructor \& Destructor Documentation}
\index{KButtonBox@{KButton\-Box}!KButtonBox@{KButtonBox}}
\index{KButtonBox@{KButtonBox}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KButton\-Box::KButton\-Box ({\bf QWidget} $\ast$ {\em parent}, Orientation {\em \_\-orientation} = Horizontal, int {\em border} = 0, int {\em \_\-autoborder} = 6)}\label{classKButtonBox_a0}


Create an empty container for buttons. 

If {\tt \_\-orientation} is {\tt Vertical}, the buttons inserted with {\bf add\-Button}{\rm (p.\,\pageref{classKButtonBox_a5})}() are laid out from top to bottom, otherwise they are laid out from left to right. 

Definition at line 74 of file kbuttonbox.cpp.\index{KButtonBox@{KButton\-Box}!~KButtonBox@{$\sim$KButtonBox}}
\index{~KButtonBox@{$\sim$KButtonBox}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KButton\-Box::$\sim${\bf KButton\-Box} ()}\label{classKButtonBox_a1}


Free private data field. 



Definition at line 87 of file kbuttonbox.cpp.

\subsection{Member Function Documentation}
\index{KButtonBox@{KButton\-Box}!sizeHint@{sizeHint}}
\index{sizeHint@{sizeHint}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} KButton\-Box::size\-Hint () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKButtonBox_a2}


\begin{Desc}
\item[Returns:]The minimum size needed to fit all buttons.\end{Desc}
This size is calculated by the width/height of all buttons plus border/autoborder. 

Reimplemented from {\bf QWidget}.

Definition at line 232 of file kbuttonbox.cpp.

References best\-Button\-Size(), button\-Size\-Hint(), data, QSize::height(), and QSize::width().

Referenced by layout().\index{KButtonBox@{KButton\-Box}!addButton@{addButton}}
\index{addButton@{addButton}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPush\-Button} $\ast$ KButton\-Box::add\-Button (const {\bf QString} \& {\em text}, bool {\em noexpand} = FALSE)}\label{classKButtonBox_a5}


Add a new {\bf QPush\-Button}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em noexpand}]If {\tt noexpand} is {\tt false}, the width of the button is adjusted to fit the other buttons (the maximum of all buttons is taken). If {\tt noexpand} is {\tt true}, the width of this button will be set to the minimum width needed for the given text).\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A pointer to the new button. \end{Desc}


Definition at line 91 of file kbuttonbox.cpp.

Referenced by add\-Button().\index{KButtonBox@{KButton\-Box}!addButton@{addButton}}
\index{addButton@{addButton}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPush\-Button} $\ast$ KButton\-Box::add\-Button (const {\bf QString} \& {\em text}, {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, bool {\em noexpand} = FALSE)}\label{classKButtonBox_a6}


Add a new {\bf QPush\-Button}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em receiver}]An object to connect to. \item[{\em slot}]A {\bf Qt} slot to connect the 'clicked()' signal to. \item[{\em noexpand}]If {\tt noexpand} is {\tt false}, the width of the button is adjusted to fit the other buttons (the maximum of all buttons is taken). If {\tt noexpand} {\tt true}, the width of this button will be set to the minimum width needed for the given text).\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A pointer to the new button. \end{Desc}


Definition at line 103 of file kbuttonbox.cpp.

References add\-Button(), and QObject::connect().\index{KButtonBox@{KButton\-Box}!addStretch@{addStretch}}
\index{addStretch@{addStretch}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KButton\-Box::add\-Stretch (int {\em scale} = 1)}\label{classKButtonBox_a7}


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).

\begin{Desc}
\item[See also:]{\bf QBox\-Layout} \end{Desc}


Definition at line 119 of file kbuttonbox.cpp.\index{KButtonBox@{KButton\-Box}!layout@{layout}}
\index{layout@{layout}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KButton\-Box::layout ()}\label{classKButtonBox_a8}


This function must be called {\em once\/} after all buttons have been inserted. 

It will start layout control. 

Definition at line 129 of file kbuttonbox.cpp.

References best\-Button\-Size(), QWidget::set\-Minimum\-Size(), and size\-Hint().\index{KButtonBox@{KButton\-Box}!bestButtonSize@{bestButtonSize}}
\index{bestButtonSize@{bestButtonSize}!KButtonBox@{KButton\-Box}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} KButton\-Box::best\-Button\-Size () const\hspace{0.3cm}{\tt  [protected]}}\label{classKButtonBox_b0}


\begin{Desc}
\item[Returns:]the best size for a button. Checks all buttons and takes the maximum width/height. \end{Desc}


Definition at line 209 of file kbuttonbox.cpp.

References data, QSize::height(), QSize::set\-Height(), QSize::set\-Width(), and QSize::width().

Referenced by layout(), and size\-Hint().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kbuttonbox.h\item 
kbuttonbox.cpp\end{CompactItemize}
