\section{KTool\-Bar\-Label\-Action Class Reference}
\label{classKToolBarLabelAction}\index{KToolBarLabelAction@{KToolBarLabelAction}}
Class to display a label in a toolbar.  


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

Inheritance diagram for KTool\-Bar\-Label\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKToolBarLabelAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KTool\-Bar\-Label\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=146pt]{classKToolBarLabelAction__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KTool\-Bar\-Label\-Action} (const {\bf QString} \&text, const {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf KAction\-Collection} $\ast${\bf parent}, const char $\ast${\bf name})
\item 
{\bf KTool\-Bar\-Label\-Action} ({\bf QWidget} $\ast$buddy, const {\bf QString} \&text, const {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf KAction\-Collection} $\ast${\bf parent}, const char $\ast${\bf name})
\item 
{\bf KTool\-Bar\-Label\-Action} ({\bf QLabel} $\ast$label, const {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf KAction\-Collection} $\ast${\bf parent}, const char $\ast${\bf name})
\item 
virtual void {\bf set\-Text} (const {\bf QString} \&text)
\item 
virtual void {\bf set\-Buddy} ({\bf QWidget} $\ast$buddy)
\item 
{\bf QWidget} $\ast$ {\bf buddy} () const 
\item 
{\bf QLabel} $\ast$ {\bf label} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKToolBarLabelAction_b0}

\end{CompactItemize}


\subsection{Detailed Description}
Class to display a label in a toolbar. 

KTool\-Bar\-Label\-Action is a convenience class for displaying a label in a toolbar.

It provides easy access to the label's {\bf set\-Buddy(QWidget$\ast$)}{\rm (p.\,\pageref{classKToolBarLabelAction_a5})} and {\bf buddy()}{\rm (p.\,\pageref{classKToolBarLabelAction_a6})} methods and can be used as follows:



\footnotesize\begin{verbatim} KHistoryCombo* findCombo = new KHistoryCombo(true, this);
 KWidgetAction* action
   = new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this,
                       SLOT(slotFocus()), actionCollection(), "find_combo");

 new KToolBarLabelAction(findCombo, i18n("F&ind "), 0, this,
                         SLOT(slotFocus()), actionCollection(),
             "find_label");
\end{verbatim}
\normalsize


\begin{Desc}
\item[Author:]Felix Berger $<${\tt felixberger@beldesign.de}$>$ \end{Desc}




Definition at line 49 of file ktoolbarlabelaction.h.

\subsection{Constructor \& Destructor Documentation}
\index{KToolBarLabelAction@{KTool\-Bar\-Label\-Action}!KToolBarLabelAction@{KToolBarLabelAction}}
\index{KToolBarLabelAction@{KToolBarLabelAction}!KToolBarLabelAction@{KTool\-Bar\-Label\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Label\-Action::KTool\-Bar\-Label\-Action (const {\bf QString} \& {\em text}, const {\bf KShortcut} \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf KAction\-Collection} $\ast$ {\em parent}, const char $\ast$ {\em name})}\label{classKToolBarLabelAction_a0}


Constructs a toolbar label. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The label's and the action's text. \item[{\em cut}]The action's shortcut. \item[{\em receiver}]The SLOT's parent. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 35 of file ktoolbarlabelaction.cpp.\index{KToolBarLabelAction@{KTool\-Bar\-Label\-Action}!KToolBarLabelAction@{KToolBarLabelAction}}
\index{KToolBarLabelAction@{KToolBarLabelAction}!KToolBarLabelAction@{KTool\-Bar\-Label\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Label\-Action::KTool\-Bar\-Label\-Action ({\bf QWidget} $\ast$ {\em buddy}, const {\bf QString} \& {\em text}, const {\bf KShortcut} \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf KAction\-Collection} $\ast$ {\em parent}, const char $\ast$ {\em name})}\label{classKToolBarLabelAction_a1}


Constructs a toolbar label setting a buddy for the label. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buddy}]The widget which is focused when the label's accelerator is typed. \item[{\em text}]The label's and the action's text. \item[{\em cut}]The action's shortcut. \item[{\em receiver}]The SLOT's parent. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 48 of file ktoolbarlabelaction.cpp.\index{KToolBarLabelAction@{KTool\-Bar\-Label\-Action}!KToolBarLabelAction@{KToolBarLabelAction}}
\index{KToolBarLabelAction@{KToolBarLabelAction}!KToolBarLabelAction@{KTool\-Bar\-Label\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Label\-Action::KTool\-Bar\-Label\-Action ({\bf QLabel} $\ast$ {\em label}, const {\bf KShortcut} \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf KAction\-Collection} $\ast$ {\em parent}, const char $\ast$ {\em name})}\label{classKToolBarLabelAction_a2}


Constructs a toolbar label for a label. 

You can use this constructor if you want to display a class which is derived from {\bf QLabel} in the toolbar. Note that ownership of the label is transferred to the action and the label is deleted when the action is deleted. So you shouldn't hold any pointers to the label.

It's important that the label's name is set to \char`\"{}kde toolbar widget\char`\"{} in its constructor, otherwise it is not correctly rendered in some kde styles.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em label}]the label which is displayed in the toolbar. \item[{\em cut}]The action's shortcut. \item[{\em receiver}]The SLOT's parent. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 62 of file ktoolbarlabelaction.cpp.

References label().

\subsection{Member Function Documentation}
\index{KToolBarLabelAction@{KTool\-Bar\-Label\-Action}!setText@{setText}}
\index{setText@{setText}!KToolBarLabelAction@{KTool\-Bar\-Label\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Label\-Action::set\-Text (const {\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBarLabelAction_a4}


Reimplemented to update both the action's text and the label's text. 



Reimplemented from {\bf KAction} {\rm (p.\,\pageref{classKAction_i0})}.

Definition at line 93 of file ktoolbarlabelaction.cpp.

References KAction::set\-Text().\index{KToolBarLabelAction@{KTool\-Bar\-Label\-Action}!setBuddy@{setBuddy}}
\index{setBuddy@{setBuddy}!KToolBarLabelAction@{KTool\-Bar\-Label\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Label\-Action::set\-Buddy ({\bf QWidget} $\ast$ {\em buddy})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBarLabelAction_a5}


Sets the label's buddy to buddy. 

See {\bf QLabel::set\-Buddy()} for details. 

Definition at line 99 of file ktoolbarlabelaction.cpp.

References buddy().\index{KToolBarLabelAction@{KTool\-Bar\-Label\-Action}!buddy@{buddy}}
\index{buddy@{buddy}!KToolBarLabelAction@{KTool\-Bar\-Label\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QWidget} $\ast$ KTool\-Bar\-Label\-Action::buddy () const}\label{classKToolBarLabelAction_a6}


Returns the label's buddy or 0 if no buddy is currently set. 

See {\bf QLabel::buddy()} and {\bf QLabel::set\-Buddy()} for more information. 

Definition at line 104 of file ktoolbarlabelaction.cpp.

Referenced by set\-Buddy().\index{KToolBarLabelAction@{KTool\-Bar\-Label\-Action}!label@{label}}
\index{label@{label}!KToolBarLabelAction@{KTool\-Bar\-Label\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QLabel} $\ast$ KTool\-Bar\-Label\-Action::label () const}\label{classKToolBarLabelAction_a7}


Returns the label which is used internally. 



Definition at line 109 of file ktoolbarlabelaction.cpp.

Referenced by KTool\-Bar\-Label\-Action().

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