\section{KTool\-Bar\-Button Class Reference}
\label{classKToolBarButton}\index{KToolBarButton@{KToolBarButton}}
A toolbar button.  


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

Inheritance diagram for KTool\-Bar\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=65pt]{classKToolBarButton__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KTool\-Bar\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=65pt]{classKToolBarButton__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf mode\-Change} ()
\begin{CompactList}\small\item\em This slot should be called whenever the toolbar mode has potentially changed. \item\end{CompactList}\item 
virtual void {\bf set\-Text\-Label} (const  {\bf QString} \&, bool tip\-Too)\label{classKToolBarButton_i1}

\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf clicked} (int)\label{classKToolBarButton_l0}

\item 
void {\bf double\-Clicked} (int)\label{classKToolBarButton_l1}

\item 
void {\bf pressed} (int)\label{classKToolBarButton_l2}

\item 
void {\bf released} (int)\label{classKToolBarButton_l3}

\item 
void {\bf toggled} (int)\label{classKToolBarButton_l4}

\item 
void {\bf highlighted} (int, bool)\label{classKToolBarButton_l5}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KTool\-Bar\-Button} (const  {\bf QString} \&icon, int id, {\bf QWidget} $\ast$parent, const  char $\ast$name=0L, const  {\bf QString} \&txt=QString::null, {\bf KInstance} $\ast$\_\-instance={\bf KGlobal::instance}())
\begin{CompactList}\small\item\em Construct a button with an icon loaded by the button itself. \item\end{CompactList}\item 
{\bf KTool\-Bar\-Button} (const  {\bf QPixmap} \&pixmap, int id, {\bf QWidget} $\ast$parent, const  char $\ast$name=0L, const  {\bf QString} \&txt=QString::null)
\begin{CompactList}\small\item\em Construct a button with an existing pixmap. \item\end{CompactList}\item 
{\bf KTool\-Bar\-Button} ({\bf QWidget} $\ast$parent=0L, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em Construct a separator button. \item\end{CompactList}\item 
{\bf $\sim$KTool\-Bar\-Button} ()
\begin{CompactList}\small\item\em Standard destructor. \item\end{CompactList}\item 
virtual void {\bf set\-Pixmap} (const  {\bf QPixmap} \&pixmap)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Set the pixmap directly for this button. \item\end{CompactList}\item 
void {\bf set\-Default\-Pixmap} (const  {\bf QPixmap} \&pixmap)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this pixmap as the default one rather then generating it using effects. \item\end{CompactList}\item 
void {\bf set\-Disabled\-Pixmap} (const  {\bf QPixmap} \&pixmap)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this pixmap when disabled one rather then generating it using effects. \item\end{CompactList}\item 
virtual void {\bf set\-Text} (const  {\bf QString} \&text)
\begin{CompactList}\small\item\em Set the text for this button. \item\end{CompactList}\item 
virtual void {\bf set\-Icon} (const  {\bf QString} \&icon)
\begin{CompactList}\small\item\em Set the icon for this button. \item\end{CompactList}\item 
virtual void {\bf set\-Icon} (const  {\bf QPixmap} \&pixmap)
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
virtual void {\bf set\-Icon\-Set} (const  {\bf QIcon\-Set} \&iconset)
\begin{CompactList}\small\item\em Set the pixmaps for this toolbar button from a {\bf QIcon\-Set}. \item\end{CompactList}\item 
void {\bf set\-Icon} (const  {\bf QString} \&icon, bool)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Set the active icon for this button. \item\end{CompactList}\item 
void {\bf set\-Default\-Icon} (const  {\bf QString} \&icon)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this icon as the default one rather then generating it using effects. \item\end{CompactList}\item 
void {\bf set\-Disabled\-Icon} (const  {\bf QString} \&icon)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this icon when disabled one rather then generating it using effects. \item\end{CompactList}\item 
void {\bf on} (bool flag=true)
\begin{CompactList}\small\item\em Turn this button on or off. \item\end{CompactList}\item 
void {\bf toggle} ()
\begin{CompactList}\small\item\em Toggle this button. \item\end{CompactList}\item 
void {\bf set\-Toggle} (bool toggle=true)
\begin{CompactList}\small\item\em Turn this button into a toggle button or disable the toggle aspects of it. \item\end{CompactList}\item 
{\bf QPopup\-Menu} $\ast$ {\bf popup} ()
\begin{CompactList}\small\item\em Return a pointer to this button's popup menu (if it exists). \item\end{CompactList}\item 
void {\bf set\-Popup} ({\bf QPopup\-Menu} $\ast$p, bool toggle=false)
\begin{CompactList}\small\item\em Give this button a popup menu. \item\end{CompactList}\item 
void {\bf set\-Delayed\-Popup} ({\bf QPopup\-Menu} $\ast$p, bool toggle=false)
\begin{CompactList}\small\item\em Gives this button a delayed popup menu. \item\end{CompactList}\item 
void {\bf set\-Radio} (bool f=true)
\begin{CompactList}\small\item\em Turn this button into a radio button. \item\end{CompactList}\item 
void {\bf set\-No\-Style} (bool no\_\-style=true)
\begin{CompactList}\small\item\em Toolbar buttons naturally will assume the global styles concerning icons, icons sizes, etc. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Clicked} ()\label{classKToolBarButton_j0}

\item 
void {\bf slot\-Pressed} ()\label{classKToolBarButton_j1}

\item 
void {\bf slot\-Released} ()\label{classKToolBarButton_j2}

\item 
void {\bf slot\-Toggled} ()\label{classKToolBarButton_j3}

\item 
void {\bf slot\-Delay\-Timeout} ()\label{classKToolBarButton_j4}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf palette\-Change} (const  {\bf QPalette} \&)\label{classKToolBarButton_b0}

\item 
void {\bf leave\-Event} ({\bf QEvent} $\ast$e)\label{classKToolBarButton_b1}

\item 
void {\bf enter\-Event} ({\bf QEvent} $\ast$e)\label{classKToolBarButton_b2}

\item 
void {\bf draw\-Button} ({\bf QPainter} $\ast$p)\label{classKToolBarButton_b3}

\item 
bool {\bf event\-Filter} ({\bf QObject} $\ast$o, {\bf QEvent} $\ast$e)\label{classKToolBarButton_b4}

\item 
void {\bf show\-Menu} ()\label{classKToolBarButton_b5}

\item 
{\bf QSize} {\bf size\-Hint} () const \label{classKToolBarButton_b6}

\item 
{\bf QSize} {\bf minimum\-Size\-Hint} () const \label{classKToolBarButton_b7}

\item 
{\bf QSize} {\bf minimum\-Size} () const \label{classKToolBarButton_b8}

\item 
bool {\bf is\-Raised} () const 
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
bool {\bf is\-Active} () const 
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
int {\bf icon\-Text\-Mode} () const 
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKToolBarButton_b12}

\end{CompactItemize}


\subsection{Detailed Description}
A toolbar button. 

This is used internally by {\bf KTool\-Bar}{\rm (p.\,\pageref{classKToolBar})}, use the {\bf KTool\-Bar}{\rm (p.\,\pageref{classKToolBar})} methods instead. 



Definition at line 45 of file ktoolbarbutton.h.

\subsection{Constructor \& Destructor Documentation}
\index{KToolBarButton@{KTool\-Bar\-Button}!KToolBarButton@{KToolBarButton}}
\index{KToolBarButton@{KToolBarButton}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Button::KTool\-Bar\-Button (const {\bf QString} \& {\em icon}, int {\em id}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0L, const {\bf QString} \& {\em txt} = QString::null, {\bf KInstance} $\ast$ {\em \_\-instance} = {\bf KGlobal::instance}())}\label{classKToolBarButton_a0}


Construct a button with an icon loaded by the button itself. 

This will trust the button to load the correct icon with the correct size.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]Name of icon to load (may be absolute or relative) \item[{\em id}]Id of this button \item[{\em parent}]This button's parent \item[{\em name}]This button's internal name \item[{\em txt}]This button's text (in a tooltip or otherwise) \end{description}
\end{Desc}


Definition at line 116 of file ktoolbarbutton.cpp.

References mode\-Change(), and QTool\-Button::set\-Text\-Label().\index{KToolBarButton@{KTool\-Bar\-Button}!KToolBarButton@{KToolBarButton}}
\index{KToolBarButton@{KToolBarButton}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Button::KTool\-Bar\-Button (const {\bf QPixmap} \& {\em pixmap}, int {\em id}, {\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0L, const {\bf QString} \& {\em txt} = QString::null)}\label{classKToolBarButton_a1}


Construct a button with an existing pixmap. 

It is not recommended that you use this as the internal icon loading code will almost always get it \char`\"{}right\char`\"{}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]Name of icon to load (may be absolute or relative) \item[{\em id}]Id of this button \item[{\em parent}]This button's parent \item[{\em name}]This button's internal name \item[{\em txt}]This button's text (in a tooltip or otherwise) \end{description}
\end{Desc}


Definition at line 148 of file ktoolbarbutton.cpp.

References mode\-Change(), KStd\-Accel::name(), set\-Icon\-Set(), and QTool\-Button::set\-Text\-Label().\index{KToolBarButton@{KTool\-Bar\-Button}!KToolBarButton@{KToolBarButton}}
\index{KToolBarButton@{KToolBarButton}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Button::KTool\-Bar\-Button ({\bf QWidget} $\ast$ {\em parent} = 0L, const char $\ast$ {\em name} = 0L)}\label{classKToolBarButton_a2}


Construct a separator button. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]This button's parent \item[{\em name}]This button's internal name \end{description}
\end{Desc}


Definition at line 106 of file ktoolbarbutton.cpp.\index{KToolBarButton@{KTool\-Bar\-Button}!~KToolBarButton@{$\sim$KToolBarButton}}
\index{~KToolBarButton@{$\sim$KToolBarButton}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Button::$\sim${\bf KTool\-Bar\-Button} ()}\label{classKToolBarButton_a3}


Standard destructor. 



Definition at line 178 of file ktoolbarbutton.cpp.

\subsection{Member Function Documentation}
\index{KToolBarButton@{KTool\-Bar\-Button}!setPixmap@{setPixmap}}
\index{setPixmap@{setPixmap}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Pixmap (const {\bf QPixmap} \& {\em pixmap})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBarButton_a4}


{\bf This class or method is obsolete, it is provided for compatibility only.} Set the pixmap directly for this button. 

This pixmap should be the active one... the dimmed and disabled pixmaps are constructed based on this one. However, don't use this function unless you are positive that you don't want to use {\bf set\-Icon}{\rm (p.\,\pageref{classKToolBarButton_a8})}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pixmap}]The active pixmap \end{description}
\end{Desc}


Definition at line 298 of file ktoolbarbutton.cpp.

References QTool\-Button::icon\-Set(), QPixmap::is\-Null(), QTool\-Button::set\-Icon\-Set(), and QIcon\-Set::set\-Pixmap().

Referenced by KTool\-Bar::set\-Button\-Pixmap().\index{KToolBarButton@{KTool\-Bar\-Button}!setDefaultPixmap@{setDefaultPixmap}}
\index{setDefaultPixmap@{setDefaultPixmap}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Default\-Pixmap (const {\bf QPixmap} \& {\em pixmap})}\label{classKToolBarButton_a5}


{\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this pixmap as the default one rather then generating it using effects. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pixmap}]The pixmap to use as the default (normal) one \end{description}
\end{Desc}


Definition at line 310 of file ktoolbarbutton.cpp.

References QTool\-Button::icon\-Set(), QTool\-Button::set\-Icon\-Set(), and QIcon\-Set::set\-Pixmap().\index{KToolBarButton@{KTool\-Bar\-Button}!setDisabledPixmap@{setDisabledPixmap}}
\index{setDisabledPixmap@{setDisabledPixmap}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Disabled\-Pixmap (const {\bf QPixmap} \& {\em pixmap})}\label{classKToolBarButton_a6}


{\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this pixmap when disabled one rather then generating it using effects. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pixmap}]The pixmap to use when disabled \end{description}
\end{Desc}


Definition at line 317 of file ktoolbarbutton.cpp.

References QTool\-Button::icon\-Set(), QTool\-Button::set\-Icon\-Set(), and QIcon\-Set::set\-Pixmap().\index{KToolBarButton@{KTool\-Bar\-Button}!setText@{setText}}
\index{setText@{setText}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Text (const {\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBarButton_a7}


Set the text for this button. 

The text will be either used as a tooltip (Icon\-Only) or will be along side the icon

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The button (or tooltip) text \end{description}
\end{Desc}


Definition at line 273 of file ktoolbarbutton.cpp.

References mode\-Change(), and QTool\-Button::set\-Text\-Label().\index{KToolBarButton@{KTool\-Bar\-Button}!setIcon@{setIcon}}
\index{setIcon@{setIcon}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Icon (const {\bf QString} \& {\em icon})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBarButton_a8}


Set the icon for this button. 

The icon will be loaded internally with the correct size. This function is preferred over {\bf set\-Icon\-Set}{\rm (p.\,\pageref{classKToolBarButton_a10})}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]The name of the icon \end{description}
\end{Desc}


Definition at line 279 of file ktoolbarbutton.cpp.

References QTool\-Button::set\-Icon\-Set().

Referenced by mode\-Change(), KTool\-Bar::set\-Button\-Icon(), and set\-Icon().\index{KToolBarButton@{KTool\-Bar\-Button}!setIcon@{setIcon}}
\index{setIcon@{setIcon}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KTool\-Bar\-Button::set\-Icon (const {\bf QPixmap} \& {\em pixmap})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKToolBarButton_a9}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 141 of file ktoolbarbutton.h.\index{KToolBarButton@{KTool\-Bar\-Button}!setIconSet@{setIconSet}}
\index{setIconSet@{setIconSet}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Icon\-Set (const {\bf QIcon\-Set} \& {\em iconset})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBarButton_a10}


Set the pixmaps for this toolbar button from a {\bf QIcon\-Set}. 

If you call this you don't need to call any of the other methods that set icons or pixmaps. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em iconset}]The iconset to use \end{description}
\end{Desc}


Reimplemented from {\bf QTool\-Button}.

Definition at line 292 of file ktoolbarbutton.cpp.

References QTool\-Button::set\-Icon\-Set().

Referenced by KTool\-Bar\-Button(), and KTool\-Bar::set\-Button\-Icon\-Set().\index{KToolBarButton@{KTool\-Bar\-Button}!setIcon@{setIcon}}
\index{setIcon@{setIcon}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Icon (const {\bf QString} \& {\em icon}, bool)\hspace{0.3cm}{\tt  [inline]}}\label{classKToolBarButton_a11}


{\bf This class or method is obsolete, it is provided for compatibility only.} Set the active icon for this button. 

The pixmap itself is loaded internally based on the icon size... .. the disabled and default pixmaps, however will only be constructed if generate is true. This function is preferred over {\bf set\-Pixmap}{\rm (p.\,\pageref{classKToolBarButton_a4})}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]The name of the active icon \item[{\em generate}]If true, then the other icons are automagically generated from this one \end{description}
\end{Desc}


Definition at line 164 of file ktoolbarbutton.h.

References set\-Icon().\index{KToolBarButton@{KTool\-Bar\-Button}!setDefaultIcon@{setDefaultIcon}}
\index{setDefaultIcon@{setDefaultIcon}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Default\-Icon (const {\bf QString} \& {\em icon})}\label{classKToolBarButton_a12}


{\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this icon as the default one rather then generating it using effects. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]The icon to use as the default (normal) one \end{description}
\end{Desc}


Definition at line 324 of file ktoolbarbutton.cpp.

References QTool\-Button::icon\-Set(), QTool\-Button::set\-Icon\-Set(), and QIcon\-Set::set\-Pixmap().\index{KToolBarButton@{KTool\-Bar\-Button}!setDisabledIcon@{setDisabledIcon}}
\index{setDisabledIcon@{setDisabledIcon}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Disabled\-Icon (const {\bf QString} \& {\em icon})}\label{classKToolBarButton_a13}


{\bf This class or method is obsolete, it is provided for compatibility only.} Force the button to use this icon when disabled one rather then generating it using effects. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]The icon to use when disabled \end{description}
\end{Desc}


Definition at line 338 of file ktoolbarbutton.cpp.

References QTool\-Button::icon\-Set(), QTool\-Button::set\-Icon\-Set(), and QIcon\-Set::set\-Pixmap().\index{KToolBarButton@{KTool\-Bar\-Button}!on@{on}}
\index{on@{on}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::on (bool {\em flag} = true)}\label{classKToolBarButton_a14}


Turn this button on or off. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em flag}]true or false \end{description}
\end{Desc}


Definition at line 743 of file ktoolbarbutton.cpp.

References QTool\-Button::set\-On().

Referenced by KTool\-Bar::set\-Button().\index{KToolBarButton@{KTool\-Bar\-Button}!toggle@{toggle}}
\index{toggle@{toggle}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::toggle ()}\label{classKToolBarButton_a15}


Toggle this button. 



Reimplemented from {\bf QTool\-Button}.

Definition at line 755 of file ktoolbarbutton.cpp.

References QTool\-Button::set\-On().

Referenced by KTool\-Bar::toggle\-Button().\index{KToolBarButton@{KTool\-Bar\-Button}!setToggle@{setToggle}}
\index{setToggle@{setToggle}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Toggle (bool {\em toggle} = true)}\label{classKToolBarButton_a16}


Turn this button into a toggle button or disable the toggle aspects of it. 

This does not toggle the button itself. Use {\bf toggle}{\rm (p.\,\pageref{classKToolBarButton_a15})}() for that.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toggle}]true or false \end{description}
\end{Desc}


Definition at line 761 of file ktoolbarbutton.cpp.

References QTool\-Button::set\-Toggle\-Button().

Referenced by KTool\-Bar::set\-Toggle().\index{KToolBarButton@{KTool\-Bar\-Button}!popup@{popup}}
\index{popup@{popup}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPopup\-Menu} $\ast$ KTool\-Bar\-Button::popup ()}\label{classKToolBarButton_a17}


Return a pointer to this button's popup menu (if it exists). 



Definition at line 359 of file ktoolbarbutton.cpp.\index{KToolBarButton@{KTool\-Bar\-Button}!setPopup@{setPopup}}
\index{setPopup@{setPopup}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Popup ({\bf QPopup\-Menu} $\ast$ {\em p}, bool {\em toggle} = false)}\label{classKToolBarButton_a18}


Give this button a popup menu. 

There will not be a delay when you press the button. Use {\bf set\-Delayed\-Popup}{\rm (p.\,\pageref{classKToolBarButton_a19})} if you want that behavior. You can also make the popup-menu \char`\"{}sticky\char`\"{}, i.e. visible until a selection is made or the mouse is clikced elsewhere, by simply setting the second argument to true. This \char`\"{}sticky\char`\"{} button feature allows you to make a selection without having to press and hold down the mouse while making a selection.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p}]The new popup menu \item[{\em toggle}]if true, makes the button \char`\"{}sticky\char`\"{} (toggled) \end{description}
\end{Desc}


Definition at line 352 of file ktoolbarbutton.cpp.

Referenced by KTool\-Bar::insert\-Button(), KTool\-Bar\-Popup\-Action::plug(), KAction\-Menu::plug(), and set\-Delayed\-Popup().\index{KToolBarButton@{KTool\-Bar\-Button}!setDelayedPopup@{setDelayedPopup}}
\index{setDelayedPopup@{setDelayedPopup}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Delayed\-Popup ({\bf QPopup\-Menu} $\ast$ {\em p}, bool {\em toggle} = false)}\label{classKToolBarButton_a19}


Gives this button a delayed popup menu. 

This function allows you to add a delayed popup menu to the button. The popup menu is then only displayed when the button is pressed and held down for about half a second. You can also make the popup-menu \char`\"{}sticky\char`\"{}, i.e. visible until a selection is made or the mouse is clikced elsewhere, by simply setting the second argument to true. This \char`\"{}sticky\char`\"{} button feature allows you to make a selection without having to press and hold down the mouse while making a selection.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p}]the new popup menu \item[{\em toggle}]if true, makes the button \char`\"{}sticky\char`\"{} (toggled) \end{description}
\end{Desc}


Definition at line 364 of file ktoolbarbutton.cpp.

References set\-Popup().

Referenced by KTool\-Bar::set\-Delayed\-Popup().\index{KToolBarButton@{KTool\-Bar\-Button}!setRadio@{setRadio}}
\index{setRadio@{setRadio}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-Radio (bool {\em f} = true)}\label{classKToolBarButton_a20}


Turn this button into a radio button. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em f}]true or false \end{description}
\end{Desc}


Definition at line 737 of file ktoolbarbutton.cpp.

Referenced by KTool\-Bar\-Radio\-Group::add\-Button().\index{KToolBarButton@{KTool\-Bar\-Button}!setNoStyle@{setNoStyle}}
\index{setNoStyle@{setNoStyle}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::set\-No\-Style (bool {\em no\_\-style} = true)}\label{classKToolBarButton_a21}


Toolbar buttons naturally will assume the global styles concerning icons, icons sizes, etc. 

You can use this function to explicitely turn this off, if you like.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em no\_\-style}]Will disable styles if true \end{description}
\end{Desc}


Definition at line 728 of file ktoolbarbutton.cpp.

References mode\-Change().

Referenced by KTool\-Bar::set\-Item\-No\-Style().\index{KToolBarButton@{KTool\-Bar\-Button}!modeChange@{modeChange}}
\index{modeChange@{modeChange}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Button::mode\-Change ()\hspace{0.3cm}{\tt  [slot]}}\label{classKToolBarButton_i0}


This slot should be called whenever the toolbar mode has potentially changed. 

This includes such events as text changing, orientation changing, etc. 

Definition at line 183 of file ktoolbarbutton.cpp.

References QTool\-Tip::add(), QApplication::global\-Strut(), QSize::height(), QFont\-Metrics::line\-Spacing(), QTool\-Tip::remove(), set\-Icon(), QSize::set\-Width(), QTool\-Button::text\-Label(), KGlobal\-Settings::tool\-Bar\-Font(), QSize::width(), and QFont\-Metrics::width().

Referenced by KTool\-Bar\-Button(), set\-No\-Style(), and set\-Text().\index{KToolBarButton@{KTool\-Bar\-Button}!isRaised@{isRaised}}
\index{isRaised@{isRaised}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar\-Button::is\-Raised () const\hspace{0.3cm}{\tt  [protected]}}\label{classKToolBarButton_b9}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 785 of file ktoolbarbutton.cpp.\index{KToolBarButton@{KTool\-Bar\-Button}!isActive@{isActive}}
\index{isActive@{isActive}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar\-Button::is\-Active () const\hspace{0.3cm}{\tt  [protected]}}\label{classKToolBarButton_b10}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 790 of file ktoolbarbutton.cpp.\index{KToolBarButton@{KTool\-Bar\-Button}!iconTextMode@{iconTextMode}}
\index{iconTextMode@{iconTextMode}!KToolBarButton@{KTool\-Bar\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar\-Button::icon\-Text\-Mode () const\hspace{0.3cm}{\tt  [protected]}}\label{classKToolBarButton_b11}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 795 of file ktoolbarbutton.cpp.

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