\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=52pt]{classKButtonBox__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KButton\-Box:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=52pt]{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)
\item 
{\bf $\sim$KButton\-Box} ()
\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)
\item 
{\bf QPush\-Button} $\ast$ {\bf add\-Button} (const {\bf QString} \&text, {\bf QObject} $\ast$receiver, const char $\ast$slot, bool noexpand=false)
\item 
{\bf QPush\-Button} $\ast$ {\bf add\-Button} (const {\bf KGui\-Item} \&guiitem, bool noexpand=false)
\item 
{\bf QPush\-Button} $\ast$ {\bf add\-Button} (const {\bf KGui\-Item} \&guiitem, {\bf QObject} $\ast$receiver, const char $\ast$slot, bool noexpand=false)
\item 
void {\bf add\-Stretch} (int scale=1)
\item 
void {\bf layout} ()
\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})} 360744 2004-11-05 15:49:23Z coles \end{Desc}
\end{Desc}




Definition at line 42 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} = {\tt Horizontal}, int {\em border} = {\tt 0}, int {\em \_\-autoborder} = {\tt 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 82 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 94 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 303 of file kbuttonbox.cpp.

References best\-Button\-Size(), 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} = {\tt false})}\label{classKButtonBox_a5}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]the text of the button to add \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 98 of file kbuttonbox.cpp.

References QWidget::update\-Geometry().

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} = {\tt false})}\label{classKButtonBox_a6}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]the text of the button to add. \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 123 of file kbuttonbox.cpp.

References add\-Button(), and QObject::connect().\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 KGui\-Item} \& {\em guiitem}, bool {\em noexpand} = {\tt false})}\label{classKButtonBox_a7}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em guiitem}]text and icon on the button \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}
\begin{Desc}
\item[Since:]3.3 \end{Desc}


Definition at line 110 of file kbuttonbox.cpp.

References QWidget::update\-Geometry().\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 KGui\-Item} \& {\em guiitem}, {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, bool {\em noexpand} = {\tt false})}\label{classKButtonBox_a8}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em guiitem}]text and icon on the button \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}
\begin{Desc}
\item[Since:]3.3 \end{Desc}


Definition at line 139 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} = {\tt 1})}\label{classKButtonBox_a9}


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 154 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_a10}


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

It will start layout control. 

Definition at line 163 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 276 of file kbuttonbox.cpp.

References 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}
