\section{KTool\-Bar Class Reference}
\label{classKToolBar}\index{KToolBar@{KToolBar}}
Floatable toolbar with auto resize.  


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

Inheritance diagram for KTool\-Bar:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=47pt]{classKToolBar__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KTool\-Bar:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=171pt]{classKToolBar__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Icon\-Text} \{ {\bf Icon\-Only} =  0, 
{\bf Icon\-Text\-Right}, 
{\bf Text\-Only}, 
{\bf Icon\-Text\-Bottom}
 \}
\item 
enum {\bf Bar\-Status} \{ {\bf Toggle}, 
{\bf Show}, 
{\bf Hide}
 \}
\item 
enum {\bf Bar\-Position} \{ \par
{\bf Unmanaged}, 
{\bf Floating}, 
{\bf Top}, 
{\bf Bottom}, 
\par
{\bf Right}, 
{\bf Left}, 
{\bf Flat}
 \}
\end{CompactItemize}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
virtual void {\bf set\-Icon\-Text} (const {\bf QString} \&txt)\label{classKToolBar_i0}

\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf clicked} (int id)
\item 
void {\bf double\-Clicked} (int id)
\item 
void {\bf pressed} (int)
\item 
void {\bf released} (int)
\item 
void {\bf toggled} (int)
\item 
void {\bf highlighted} (int id, bool is\-Highlighted)
\item 
void {\bf highlighted} (int id)
\item 
void {\bf moved} ({\bf Bar\-Position})
\item 
void {\bf modechange} ()
\item 
void {\bf toolbar\-Destroyed} ()
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KTool\-Bar} ({\bf QWidget} $\ast$parent, const char $\ast$name=0, bool honor\-Style=false, bool read\-Config=true)
\item 
{\bf KTool\-Bar} ({\bf QMain\-Window} $\ast$parent\-Window, QMain\-Window::Tool\-Bar\-Dock dock, bool new\-Line=false, const char $\ast$name=0, bool honor\-Style=false, bool read\-Config=true)
\item 
{\bf KTool\-Bar} ({\bf QMain\-Window} $\ast$parent\-Window, {\bf QWidget} $\ast$dock, bool new\-Line=false, const char $\ast$name=0, bool honor\-Style=false, bool read\-Config=true)
\item 
virtual {\bf $\sim$KTool\-Bar} ()
\item 
int {\bf insert\-Button} (const {\bf QString} \&icon, int id, bool enabled=true, const {\bf QString} \&text=QString::null, int index=-1, {\bf KInstance} $\ast$\_\-instance={\bf KGlobal::instance}())
\item 
int {\bf insert\-Button} (const {\bf QString} \&icon, int id, const char $\ast$signal, const {\bf QObject} $\ast$receiver, const char $\ast$slot, bool enabled=true, const {\bf QString} \&text=QString::null, int index=-1, {\bf KInstance} $\ast$\_\-instance={\bf KGlobal::instance}())
\item 
int {\bf insert\-Button} (const {\bf QPixmap} \&pixmap, int id, bool enabled=true, const {\bf QString} \&text=QString::null, int index=-1)
\item 
int {\bf insert\-Button} (const {\bf QPixmap} \&pixmap, int id, const char $\ast$signal, const {\bf QObject} $\ast$receiver, const char $\ast$slot, bool enabled=true, const {\bf QString} \&text=QString::null, int index=-1)
\item 
int {\bf insert\-Button} (const {\bf QString} \&icon, int id, {\bf QPopup\-Menu} $\ast$popup, bool enabled, const {\bf QString} \&\_\-text, int index=-1)
\item 
int {\bf insert\-Button} (const {\bf QPixmap} \&pixmap, int id, {\bf QPopup\-Menu} $\ast$popup, bool enabled, const {\bf QString} \&\_\-text, int index=-1)
\item 
int {\bf insert\-Lined} (const {\bf QString} \&text, int id, const char $\ast$signal, const {\bf QObject} $\ast$receiver, const char $\ast$slot, bool enabled=true, const {\bf QString} \&tool\-Tip\-Text=QString::null, int size=70, int index=-1)
\item 
int {\bf insert\-Combo} (const {\bf QString\-List} \&list, int id, bool writable, const char $\ast$signal, const {\bf QObject} $\ast$receiver, const char $\ast$slot, bool enabled=true, const {\bf QString} \&tooltiptext=QString::null, int size=70, int index=-1, QCombo\-Box::Policy policy=QCombo\-Box::At\-Bottom)
\item 
int {\bf insert\-Combo} (const {\bf QString} \&text, int id, bool writable, const char $\ast$signal, {\bf QObject} $\ast$receiver, const char $\ast$slot, bool enabled=true, const {\bf QString} \&tooltiptext=QString::null, int size=70, int index=-1, QCombo\-Box::Policy policy=QCombo\-Box::At\-Bottom)
\item 
int {\bf insert\-Separator} (int index=-1, int id=-1)
\item 
int {\bf insert\-Line\-Separator} (int index=-1, int id=-1)
\item 
int {\bf insert\-Widget} (int id, int width, {\bf QWidget} $\ast$\_\-widget, int index=-1)
\item 
int {\bf insert\-Animated\-Widget} (int id, {\bf QObject} $\ast$receiver, const char $\ast$slot, const {\bf QString} \&icons, int index=-1)
\item 
{\bf KAnim\-Widget} $\ast$ {\bf animated\-Widget} (int id)
\item 
void {\bf add\-Connection} (int id, const char $\ast$signal, const {\bf QObject} $\ast$receiver, const char $\ast$slot)
\item 
void {\bf set\-Item\-Enabled} (int id, bool enabled)
\item 
void {\bf set\-Button\-Icon} (int id, const {\bf QString} \&\_\-icon)
\item 
void {\bf set\-Button\-Pixmap} (int id, const {\bf QPixmap} \&\_\-pixmap)
\item 
void {\bf set\-Button\-Icon\-Set} (int id, const {\bf QIcon\-Set} \&iconset)
\item 
void {\bf set\-Delayed\-Popup} (int id, {\bf QPopup\-Menu} $\ast$\_\-popup, bool toggle=false)
\item 
void {\bf set\-Auto\-Repeat} (int id, bool flag=true)
\item 
void {\bf set\-Toggle} (int id, bool flag=true)
\item 
void {\bf toggle\-Button} (int id)
\item 
void {\bf set\-Button} (int id, bool flag)
\item 
bool {\bf is\-Button\-On} (int id) const 
\item 
void {\bf set\-Lined\-Text} (int id, const {\bf QString} \&text)
\item 
{\bf QString} {\bf get\-Lined\-Text} (int id) const 
\item 
void {\bf insert\-Combo\-Item} (int id, const {\bf QString} \&text, int index)
\item 
void {\bf insert\-Combo\-List} (int id, const {\bf QString\-List} \&list, int index)
\item 
void {\bf remove\-Combo\-Item} (int id, int index)
\item 
void {\bf set\-Current\-Combo\-Item} (int id, int index)
\item 
void {\bf change\-Combo\-Item} (int id, const {\bf QString} \&text, int index=-1)
\item 
void {\bf clear\-Combo} (int id)
\item 
{\bf QString} {\bf get\-Combo\-Item} (int id, int index=-1) const 
\item 
{\bf KCombo\-Box} $\ast$ {\bf get\-Combo} (int id)
\item 
{\bf KLine\-Edit} $\ast$ {\bf get\-Lined} (int id)
\item 
{\bf KTool\-Bar\-Button} $\ast$ {\bf get\-Button} (int id)
\item 
void {\bf align\-Item\-Right} (int id, bool right=true)
\item 
{\bf QWidget} $\ast$ {\bf get\-Widget} (int id)
\item 
void {\bf set\-Item\-Auto\-Sized} (int id, bool yes=true)
\item 
void {\bf clear} ()
\item 
void {\bf remove\-Item} (int id)
\item 
void {\bf remove\-Item\-Delayed} (int id)
\item 
void {\bf hide\-Item} (int id)
\item 
void {\bf show\-Item} (int id)
\item 
int {\bf item\-Index} (int id)
\item 
int {\bf id\-At} (int index)
\item 
void {\bf set\-Full\-Size} (bool flag=true)
\item 
bool {\bf full\-Size} () const 
\item 
void {\bf enable\-Moving} (bool flag=true) KDE\_\-DEPRECATED
\item 
void {\bf set\-Bar\-Pos} ({\bf Bar\-Position} bpos)
\item 
{\bf Bar\-Position} {\bf bar\-Pos} () const 
\item 
bool {\bf enable} ({\bf Bar\-Status} stat) KDE\_\-DEPRECATED
\item 
void {\bf set\-Max\-Height} (int h) KDE\_\-DEPRECATED
\item 
int {\bf max\-Height} () KDE\_\-DEPRECATED
\item 
void {\bf set\-Max\-Width} (int dw) KDE\_\-DEPRECATED
\item 
int {\bf max\-Width} () KDE\_\-DEPRECATED
\item 
void {\bf set\-Title} (const {\bf QString} \&\_\-title)
\item 
void {\bf enable\-Floating} (bool flag) KDE\_\-DEPRECATED
\item 
void {\bf set\-Icon\-Text} (Icon\-Text it)
\item 
void {\bf set\-Icon\-Text} (Icon\-Text it, bool update)
\item 
Icon\-Text {\bf icon\-Text} () const 
\item 
void {\bf set\-Icon\-Size} (int size)
\item 
void {\bf set\-Icon\-Size} (int size, bool update)
\item 
int {\bf icon\-Size} () const 
\item 
int {\bf icon\-Size\-Default} () const 
\item 
void {\bf set\-Enable\-Context\-Menu} (bool enable=true)
\item 
bool {\bf context\-Menu\-Enabled} () const 
\item 
void {\bf set\-Item\-No\-Style} (int id, bool no\_\-style=true)
\item 
void {\bf set\-Flat} (bool flag)\label{classKToolBar_a73}

\item 
int {\bf count} () const 
\item 
void {\bf save\-State} ()
\item 
void {\bf save\-Settings} ({\bf KConfig} $\ast$config, const {\bf QString} \&config\-Group)
\item 
void {\bf apply\-Settings} ({\bf KConfig} $\ast$config, const {\bf QString} \&config\-Group, bool force)
\item 
void {\bf apply\-Settings} ({\bf KConfig} $\ast$config, const {\bf QString} \&config\-Group)\label{classKToolBar_a78}

\item 
void {\bf set\-XMLGUIClient} ({\bf KXMLGUIClient} $\ast$client)\label{classKToolBar_a79}

\item 
void {\bf set\-Text} (const {\bf QString} \&txt)
\item 
{\bf QString} {\bf text} () const 
\item 
void {\bf set\-Stretchable\-Widget} ({\bf QWidget} $\ast$w)\label{classKToolBar_a82}

\item 
{\bf QSize\-Policy} {\bf size\-Policy} () const \label{classKToolBar_a83}

\item 
bool {\bf highlight} () const \label{classKToolBar_a84}

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

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

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

\item 
void {\bf hide} ()\label{classKToolBar_a88}

\item 
void {\bf show} ()\label{classKToolBar_a89}

\item 
void {\bf update\-Rects} (bool=false)\label{classKToolBar_a90}

\item 
void {\bf load\-State} (const {\bf QDom\-Element} \&e)
\item 
void {\bf save\-State} ({\bf QDom\-Element} \&e)\label{classKToolBar_a92}

\item 
void {\bf position\-Yourself} (bool force=false)\label{classKToolBar_a93}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static bool {\bf highlight\-Setting} ()
\item 
static bool {\bf transparent\-Setting} ()
\item 
static Icon\-Text {\bf icon\-Text\-Setting} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf mouse\-Press\-Event} ({\bf QMouse\-Event} $\ast$)\label{classKToolBar_b0}

\item 
void {\bf child\-Event} ({\bf QChild\-Event} $\ast$e)\label{classKToolBar_b1}

\item 
void {\bf show\-Event} ({\bf QShow\-Event} $\ast$e)\label{classKToolBar_b2}

\item 
void {\bf resize\-Event} ({\bf QResize\-Event} $\ast$e)\label{classKToolBar_b3}

\item 
bool {\bf event} ({\bf QEvent} $\ast$e)\label{classKToolBar_b4}

\item 
void {\bf apply\-Appearance\-Settings} ({\bf KConfig} $\ast$config, const {\bf QString} \&\_\-config\-Group, bool force\-Global=false)\label{classKToolBar_b5}

\item 
{\bf QString} {\bf settings\-Group} () const \label{classKToolBar_b6}

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

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
Icon\-Text {\bf icon\-Text}\label{classKToolBar_00}

\item 
{\bf Bar\-Position} {\bf bar\-Pos}\label{classKToolBar_01}

\item 
bool {\bf full\-Size}\label{classKToolBar_02}

\item 
int {\bf icon\-Size}\label{classKToolBar_03}

\item 
{\bf QString} {\bf text}\label{classKToolBar_04}

\end{CompactItemize}


\subsection{Detailed Description}
Floatable toolbar with auto resize. 

A KDE-style toolbar.

KTool\-Bar can be dragged around in and between different docks.

A KTool\-Bar can contain all sorts of widgets.

KTool\-Bar can be used as a standalone widget, but {\bf KMain\-Window}{\rm (p.\,\pageref{classKMainWindow})} provides easy factories and management of one or more toolbars. Once you have a KTool\-Bar object, you can insert items into it with the insert... methods, or remove them with the {\bf remove\-Item()}{\rm (p.\,\pageref{classKToolBar_a45})} method. This can be done at any time; the toolbar will be automatically updated. There are also many methods to set per-child properties like alignment and toggle behavior.

KTool\-Bar uses a global config group to load toolbar settings on construction. It will reread this config group on a {\bf KApplication::appearance\-Changed()} signal.

\begin{Desc}
\item[Author:]Reginald Stadlbauer $<${\tt reggie@kde.org}$>$, Stephan Kulow $<${\tt coolo@kde.org}$>$, Sven Radej $<${\tt radej@kde.org}$>$. \end{Desc}




Definition at line 103 of file ktoolbar.h.

\subsection{Member Enumeration Documentation}
\index{KToolBar@{KTool\-Bar}!BarStatus@{BarStatus}}
\index{BarStatus@{BarStatus}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KTool\-Bar::Bar\-Status}}\label{classKToolBar_w15}


The state of the status bar. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Definition at line 119 of file ktoolbar.h.\index{KToolBar@{KTool\-Bar}!BarPosition@{BarPosition}}
\index{BarPosition@{BarPosition}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KTool\-Bar::Bar\-Position}}\label{classKToolBar_w16}


Possible bar positions. 



Definition at line 123 of file ktoolbar.h.

\subsection{Constructor \& Destructor Documentation}
\index{KToolBar@{KTool\-Bar}!KToolBar@{KToolBar}}
\index{KToolBar@{KToolBar}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar::KTool\-Bar ({\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = {\tt 0}, bool {\em honor\-Style} = {\tt false}, bool {\em read\-Config} = {\tt true})}\label{classKToolBar_a0}


Normal constructor. 

This constructor is used by the XML-GUI. If you use it, you need to call QMain\-Window::add\-Tool\-Bar to specify the position of the toolbar. So it's simpler to use the other constructor.

The toolbar will read in various global config settings for things like icon size and text position, etc. However, some of the settings will be honored only if {\tt honor\-Style} is set to true. All other toolbars will be Icon\-Only and use Medium icons.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]The standard toolbar parent (usually a {\bf KMain\-Window}{\rm (p.\,\pageref{classKMainWindow})}) \item[{\em name}]The standard internal name \item[{\em honor\-Style}]If true, then global settings for Icon\-Size and Icon\-Text will be honored \item[{\em read\-Config}]whether to apply the configuration (global and application-specific) \end{description}
\end{Desc}


Definition at line 195 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!KToolBar@{KToolBar}}
\index{KToolBar@{KToolBar}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar::KTool\-Bar ({\bf QMain\-Window} $\ast$ {\em parent\-Window}, QMain\-Window::Tool\-Bar\-Dock {\em dock}, bool {\em new\-Line} = {\tt false}, const char $\ast$ {\em name} = {\tt 0}, bool {\em honor\-Style} = {\tt false}, bool {\em read\-Config} = {\tt true})}\label{classKToolBar_a1}


Constructor for non-XML-GUI applications. 

The toolbar will read in various global config settings for things like icon size and text position, etc. However, some of the settings will be honored only if {\tt honor\-Style} is set to true. All other toolbars will be Icon\-Only and use Medium icons.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent\-Window}]The window that should be the parent of this toolbar \item[{\em dock}]The position of the toolbar. Usually QMain\-Window::Top. \item[{\em new\-Line}]If true, start a new line in the dock for this toolbar. \item[{\em name}]The standard internal name \item[{\em honor\-Style}]If true, then global settings for Icon\-Size and Icon\-Text will be honored \item[{\em read\-Config}]whether to apply the configuration (global and application-specific) \end{description}
\end{Desc}


Definition at line 204 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!KToolBar@{KToolBar}}
\index{KToolBar@{KToolBar}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar::KTool\-Bar ({\bf QMain\-Window} $\ast$ {\em parent\-Window}, {\bf QWidget} $\ast$ {\em dock}, bool {\em new\-Line} = {\tt false}, const char $\ast$ {\em name} = {\tt 0}, bool {\em honor\-Style} = {\tt false}, bool {\em read\-Config} = {\tt true})}\label{classKToolBar_a2}


Constructor for non-XML-GUI applications. 

The toolbar will read in various global config settings for things like icon size and text position, etc. However, some of the settings will be honored only if {\tt honor\-Style} is set to true. All other toolbars will be Icon\-Only and use Medium icons.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent\-Window}]The window that should be the parent of this toolbar \item[{\em dock}]Another widget than the mainwindow to dock toolbar to. \item[{\em new\-Line}]If true, start a new line in the dock for this toolbar. \item[{\em name}]The standard internal name \item[{\em honor\-Style}]If true, then global settings for Icon\-Size and Icon\-Text will be honored \item[{\em read\-Config}]whether to apply the configuration (global and application-specific) \end{description}
\end{Desc}


Definition at line 212 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!~KToolBar@{$\sim$KToolBar}}
\index{~KToolBar@{$\sim$KToolBar}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar::$\sim${\bf KTool\-Bar} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBar_a3}


Destructor. 



Definition at line 220 of file ktoolbar.cpp.

References toolbar\-Destroyed().

\subsection{Member Function Documentation}
\index{KToolBar@{KTool\-Bar}!insertButton@{insertButton}}
\index{insertButton@{insertButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Button (const {\bf QString} \& {\em icon}, int {\em id}, bool {\em enabled} = {\tt true}, const {\bf QString} \& {\em text} = {\tt QString::null}, int {\em index} = {\tt -1}, {\bf KInstance} $\ast$ {\em \_\-instance} = {\tt {\bf KGlobal::instance}()})}\label{classKToolBar_a4}


Insert a button (a {\bf KTool\-Bar\-Button}{\rm (p.\,\pageref{classKToolBarButton})}) with a pixmap. 

The pixmap is loaded by the button itself based on the global icon settings.

You should connect to one or more signals in KTool\-Bar: {\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})} , {\bf pressed()}{\rm (p.\,\pageref{classKToolBar_l2})} , {\bf released()}{\rm (p.\,\pageref{classKToolBar_l3})} , or {\bf highlighted()}{\rm (p.\,\pageref{classKToolBar_l5})} and if the button is a toggle button ( {\bf set\-Toggle()}{\rm (p.\,\pageref{classKToolBar_a25})} ) {\bf toggled()}{\rm (p.\,\pageref{classKToolBar_l4})} . Those signals have {\tt id} of a button that caused the signal. If you want to bind a popup to button, see {\bf set\-Button()}{\rm (p.\,\pageref{classKToolBar_a27})}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]The name of the icon to use as the active pixmap \item[{\em id}]The id of this button \item[{\em enabled}]Enable or disable the button at startup \item[{\em text}]The tooltip or toolbar text (depending on state) \item[{\em index}]The position of the button. (-1 = at end). \item[{\em \_\-instance}]instance this button will belong to\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The item index. \end{Desc}


Definition at line 257 of file ktoolbar.cpp.

Referenced by KPaste\-Text\-Action::plug(), KTool\-Bar\-Popup\-Action::plug(), KAction\-Menu::plug(), KRecent\-Files\-Action::plug(), and KAction::plug().\index{KToolBar@{KTool\-Bar}!insertButton@{insertButton}}
\index{insertButton@{insertButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Button (const {\bf QString} \& {\em icon}, int {\em id}, const char $\ast$ {\em signal}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, bool {\em enabled} = {\tt true}, const {\bf QString} \& {\em text} = {\tt QString::null}, int {\em index} = {\tt -1}, {\bf KInstance} $\ast$ {\em \_\-instance} = {\tt {\bf KGlobal::instance}()})}\label{classKToolBar_a5}


This is the same as above, but with specified signals and slots to which this button will be connected. 

You can add more signals with {\bf add\-Connection()}{\rm (p.\,\pageref{classKToolBar_a18})}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icon}]The name of the icon to use as the active pixmap \item[{\em id}]The id of this button \item[{\em signal}]The signal to connect to \item[{\em receiver}]The slot's parent \item[{\em slot}]The slot to receive the signal specified in that argument. \item[{\em enabled}]Enable or disable the button at startup \item[{\em text}]The tooltip or toolbar text (depending on state) \item[{\em index}]The position of the button. (-1 = at end). \item[{\em \_\-instance}]instance this button will belong to\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The item index. \end{Desc}


Definition at line 269 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!insertButton@{insertButton}}
\index{insertButton@{insertButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Button (const {\bf QPixmap} \& {\em pixmap}, int {\em id}, bool {\em enabled} = {\tt true}, const {\bf QString} \& {\em text} = {\tt QString::null}, int {\em index} = {\tt -1})}\label{classKToolBar_a6}


Inserts a button (a {\bf KTool\-Bar\-Button}{\rm (p.\,\pageref{classKToolBarButton})}) with the specified pixmap. 

This pixmap will be used as the \char`\"{}active\char`\"{} one and the disabled and default ones will be autogenerated.

It is recommended that you use the insert\-Button function that allows you to specify the icon name rather then the pixmap itself. Specifying the icon name is much more flexible.

You should connect to one or more signals in KTool\-Bar: {\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})} , {\bf pressed()}{\rm (p.\,\pageref{classKToolBar_l2})} , {\bf released()}{\rm (p.\,\pageref{classKToolBar_l3})} , or {\bf highlighted()}{\rm (p.\,\pageref{classKToolBar_l5})} and if the button is a toggle button ( {\bf set\-Toggle()}{\rm (p.\,\pageref{classKToolBar_a25})} ) {\bf toggled()}{\rm (p.\,\pageref{classKToolBar_l4})} . Those signals have {\tt id} of a button that caused the signal. If you want to bind a popup to button, see {\bf set\-Button()}{\rm (p.\,\pageref{classKToolBar_a27})}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pixmap}]The active pixmap \item[{\em id}]The id of this button \item[{\em enabled}]Enable or disable the button at startup \item[{\em text}]The tooltip or toolbar text (depending on state) \item[{\em index}]The position of the button. (-1 = at end).\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The item index. \end{Desc}


Definition at line 282 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!insertButton@{insertButton}}
\index{insertButton@{insertButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Button (const {\bf QPixmap} \& {\em pixmap}, int {\em id}, const char $\ast$ {\em signal}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, bool {\em enabled} = {\tt true}, const {\bf QString} \& {\em text} = {\tt QString::null}, int {\em index} = {\tt -1})}\label{classKToolBar_a7}


This is the same as above, but with specified signals and slots to which this button will be connected. 

You can add more signals with {\bf add\-Connection()}{\rm (p.\,\pageref{classKToolBar_a18})}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pixmap}]The name of the icon to use as the active pixmap \item[{\em id}]The id of this button \item[{\em signal}]The signal to connect to \item[{\em receiver}]The slot's parent \item[{\em slot}]The slot to receive the signal specified in that argument. \item[{\em enabled}]Enable or disable the button at startup \item[{\em text}]The tooltip or toolbar text (depending on state) \item[{\em index}]The position of the button. (-1 = at end).\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The item index. \end{Desc}


Definition at line 293 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!insertButton@{insertButton}}
\index{insertButton@{insertButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Button (const {\bf QString} \& {\em icon}, int {\em id}, {\bf QPopup\-Menu} $\ast$ {\em popup}, bool {\em enabled}, const {\bf QString} \& {\em \_\-text}, int {\em index} = {\tt -1})}\label{classKToolBar_a8}


Inserts a button with popupmenu. 

Button will have small triangle. You have to connect to popup's signals. The signals KButton::pressed(), KButton::released(), KButton::clicked() or KButton::double\-Clicked() are {\tt not} emmited by this button (see {\bf set\-Delayed\-Popup()}{\rm (p.\,\pageref{classKToolBar_a23})} for that). You can add custom popups which inherit {\bf QPopup\-Menu} to get popups with tables, drawings etc. Just don't fiddle with events there. 

Definition at line 307 of file ktoolbar.cpp.

References KTool\-Bar\-Button::set\-Popup().\index{KToolBar@{KTool\-Bar}!insertButton@{insertButton}}
\index{insertButton@{insertButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Button (const {\bf QPixmap} \& {\em pixmap}, int {\em id}, {\bf QPopup\-Menu} $\ast$ {\em popup}, bool {\em enabled}, const {\bf QString} \& {\em \_\-text}, int {\em index} = {\tt -1})}\label{classKToolBar_a9}


Inserts a button with popupmenu. 

Button will have small triangle. You have to connect to popup's signals. The signals KButton::pressed(), KButton::released(), KButton::clicked() or KButton::double\-Clicked() are {\tt not} emmited by this button (see {\bf set\-Delayed\-Popup()}{\rm (p.\,\pageref{classKToolBar_a23})} for that). You can add custom popups which inherit {\bf QPopup\-Menu} to get popups with tables, drawings etc. Just don't fiddle with events there. 

Definition at line 319 of file ktoolbar.cpp.

References KTool\-Bar\-Button::set\-Popup().\index{KToolBar@{KTool\-Bar}!insertLined@{insertLined}}
\index{insertLined@{insertLined}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Lined (const {\bf QString} \& {\em text}, int {\em id}, const char $\ast$ {\em signal}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, bool {\em enabled} = {\tt true}, const {\bf QString} \& {\em tool\-Tip\-Text} = {\tt QString::null}, int {\em size} = {\tt 70}, int {\em index} = {\tt -1})}\label{classKToolBar_a10}


Inserts a {\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})}. 

You have to specify signals and slots to which {\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})} will be connected. {\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})} has all slots {\bf QLine\-Edit} has, plus signals {\bf KLine\-Edit::completion}{\rm (p.\,\pageref{classKLineEdit_l2})} and {\bf KLine\-Edit::text\-Rotation}{\rm (p.\,\pageref{classKLineEdit_l4})} {\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})} can be set to autoresize itself to full free width in toolbar, that is to last right aligned item. For that, toolbar must be set to full width (which it is by default). \begin{Desc}
\item[See also:]set\-Full\-Width() 

{\bf set\-Item\-Auto\-Sized()}{\rm (p.\,\pageref{classKToolBar_a43})} 

{\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})} \end{Desc}
\begin{Desc}
\item[Returns:]Item index. \end{Desc}


Definition at line 331 of file ktoolbar.cpp.

References QTool\-Tip::add(), and KLine\-Edit::set\-Text().\index{KToolBar@{KTool\-Bar}!insertCombo@{insertCombo}}
\index{insertCombo@{insertCombo}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Combo (const {\bf QString\-List} \& {\em list}, int {\em id}, bool {\em writable}, const char $\ast$ {\em signal}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, bool {\em enabled} = {\tt true}, const {\bf QString} \& {\em tooltiptext} = {\tt QString::null}, int {\em size} = {\tt 70}, int {\em index} = {\tt -1}, QCombo\-Box::Policy {\em policy} = {\tt QComboBox::AtBottom})}\label{classKToolBar_a11}


Inserts a {\bf KCombo\-Box}{\rm (p.\,\pageref{classKComboBox})} with list. 

Can be writable, but cannot contain pixmaps. By default inserting policy is At\-Bottom, i.e. typed items are placed at the bottom of the list. Can be autosized. If the size argument is specified as -1, the width of the combobox is automatically computed.

\begin{Desc}
\item[See also:]set\-Full\-Width() 

{\bf set\-Item\-Auto\-Sized()}{\rm (p.\,\pageref{classKToolBar_a43})} 

{\bf KCombo\-Box}{\rm (p.\,\pageref{classKComboBox})} \end{Desc}
\begin{Desc}
\item[Returns:]Item index. \end{Desc}


Definition at line 350 of file ktoolbar.cpp.

References QTool\-Tip::add(), QCombo\-Box::insert\-String\-List(), and QCombo\-Box::set\-Insertion\-Policy().

Referenced by KSelect\-Action::plug().\index{KToolBar@{KTool\-Bar}!insertCombo@{insertCombo}}
\index{insertCombo@{insertCombo}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Combo (const {\bf QString} \& {\em text}, int {\em id}, bool {\em writable}, const char $\ast$ {\em signal}, {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, bool {\em enabled} = {\tt true}, const {\bf QString} \& {\em tooltiptext} = {\tt QString::null}, int {\em size} = {\tt 70}, int {\em index} = {\tt -1}, QCombo\-Box::Policy {\em policy} = {\tt QComboBox::AtBottom})}\label{classKToolBar_a12}


Insert a {\bf KCombo\-Box}{\rm (p.\,\pageref{classKComboBox})} with text. 

The rest is the same as above. \begin{Desc}
\item[See also:]{\bf set\-Item\-Auto\-Sized()}{\rm (p.\,\pageref{classKToolBar_a43})}

{\bf KCombo\-Box}{\rm (p.\,\pageref{classKComboBox})} \end{Desc}
\begin{Desc}
\item[Returns:]Item index. \end{Desc}


Definition at line 374 of file ktoolbar.cpp.

References QTool\-Tip::add(), QCombo\-Box::insert\-Item(), and QCombo\-Box::set\-Insertion\-Policy().\index{KToolBar@{KTool\-Bar}!insertSeparator@{insertSeparator}}
\index{insertSeparator@{insertSeparator}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Separator (int {\em index} = {\tt -1}, int {\em id} = {\tt -1})}\label{classKToolBar_a13}


Inserts a separator into the toolbar with the given {\tt id}. 

\begin{Desc}
\item[Returns:]the separator's index \end{Desc}


Definition at line 394 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!insertLineSeparator@{insertLineSeparator}}
\index{insertLineSeparator@{insertLineSeparator}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Line\-Separator (int {\em index} = {\tt -1}, int {\em id} = {\tt -1})}\label{classKToolBar_a14}


Inserts a line separator into the toolbar with the given {\tt id}. 

\begin{Desc}
\item[Returns:]the separator's index \end{Desc}


Definition at line 401 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!insertWidget@{insertWidget}}
\index{insertWidget@{insertWidget}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Widget (int {\em id}, int {\em width}, {\bf QWidget} $\ast$ {\em \_\-widget}, int {\em index} = {\tt -1})}\label{classKToolBar_a15}


Inserts a user-defined widget. 

The widget {\tt must} have this toolbar as its parent.

Widget must have a {\bf QWidget} for base class. Widget can be autosized to full width. If you forget about it, you can get a pointer to this widget with {\bf get\-Widget()}{\rm (p.\,\pageref{classKToolBar_a42})}. \begin{Desc}
\item[See also:]{\bf set\-Item\-Auto\-Sized()}{\rm (p.\,\pageref{classKToolBar_a43})} \end{Desc}
\begin{Desc}
\item[Returns:]Item index. \end{Desc}


Definition at line 409 of file ktoolbar.cpp.

Referenced by KWidget\-Action::plug().\index{KToolBar@{KTool\-Bar}!insertAnimatedWidget@{insertAnimatedWidget}}
\index{insertAnimatedWidget@{insertAnimatedWidget}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::insert\-Animated\-Widget (int {\em id}, {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, const {\bf QString} \& {\em icons}, int {\em index} = {\tt -1})}\label{classKToolBar_a16}


Inserts an animated widget. 

A {\bf KAnim\-Widget}{\rm (p.\,\pageref{classKAnimWidget})} will be created internally using the icon name you provide. This will emit a signal ({\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})}) whenever the animation widget is clicked.

\begin{Desc}
\item[See also:]{\bf animated\-Widget()}{\rm (p.\,\pageref{classKToolBar_a17})}\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The id for this toolbar item \item[{\em receiver}]The parent of your slot \item[{\em slot}]The slot to receive the {\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})} signal \item[{\em icons}]The name of the animation icon group to use \item[{\em index}]The item index\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The item index \end{Desc}


Definition at line 416 of file ktoolbar.cpp.

References clicked().\index{KToolBar@{KTool\-Bar}!animatedWidget@{animatedWidget}}
\index{animatedWidget@{animatedWidget}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAnim\-Widget} $\ast$ KTool\-Bar::animated\-Widget (int {\em id})}\label{classKToolBar_a17}


This will return a pointer to the animated widget with the given {\tt id}, if it exists. 

\begin{Desc}
\item[See also:]{\bf insert\-Animated\-Widget}{\rm (p.\,\pageref{classKToolBar_a16})} \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The id for the widget you want to get a pointer to \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A pointer to the current animated widget or 0L \end{Desc}


Definition at line 428 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().\index{KToolBar@{KTool\-Bar}!addConnection@{addConnection}}
\index{addConnection@{addConnection}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::add\-Connection (int {\em id}, const char $\ast$ {\em signal}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot})}\label{classKToolBar_a18}


Adds connections to items. 

It is important that you know the {\tt id} of particular item. Nothing happens if you forget {\tt id}. 

Definition at line 456 of file ktoolbar.cpp.

References get\-Widget().\index{KToolBar@{KTool\-Bar}!setItemEnabled@{setItemEnabled}}
\index{setItemEnabled@{setItemEnabled}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Item\-Enabled (int {\em id}, bool {\em enabled})}\label{classKToolBar_a19}


Enables/disables item. 



Definition at line 464 of file ktoolbar.cpp.

References get\-Widget(), and QWidget::set\-Enabled().\index{KToolBar@{KTool\-Bar}!setButtonIcon@{setButtonIcon}}
\index{setButtonIcon@{setButtonIcon}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Button\-Icon (int {\em id}, const {\bf QString} \& {\em \_\-icon})}\label{classKToolBar_a20}


Sets the icon for a button. 

Can be used while button is visible. 

Definition at line 480 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::set\-Icon().\index{KToolBar@{KTool\-Bar}!setButtonPixmap@{setButtonPixmap}}
\index{setButtonPixmap@{setButtonPixmap}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Button\-Pixmap (int {\em id}, const {\bf QPixmap} \& {\em \_\-pixmap})}\label{classKToolBar_a21}


Sets button pixmap. 

Can be used while button is visible. 

Definition at line 472 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::set\-Pixmap().\index{KToolBar@{KTool\-Bar}!setButtonIconSet@{setButtonIconSet}}
\index{setButtonIconSet@{setButtonIconSet}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Button\-Icon\-Set (int {\em id}, const {\bf QIcon\-Set} \& {\em iconset})}\label{classKToolBar_a22}


Sets a button icon from a {\bf QIcon\-Set}. 

Can be used while button is visible. 

Definition at line 487 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::set\-Icon\-Set().\index{KToolBar@{KTool\-Bar}!setDelayedPopup@{setDelayedPopup}}
\index{setDelayedPopup@{setDelayedPopup}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Delayed\-Popup (int {\em id}, {\bf QPopup\-Menu} $\ast$ {\em \_\-popup}, bool {\em toggle} = {\tt false})}\label{classKToolBar_a23}


Sets a delayed popup for a button. 

Delayed popup is what you see in Netscape Navigator's Previous and Next buttons: If you click them you go back or forth. If you press them long enough, you get a history-menu. This is exactly what we do here.

You will insert a normal button with connection (or use signals from toolbar): 

\footnotesize\begin{verbatim} bar->insertButton(icon, id, SIGNAL(clicked ()), this,
                   SLOT (slotClick()), true, "click or wait for popup");
\end{verbatim}
\normalsize
 And then add a delayed popup: 

\footnotesize\begin{verbatim} bar->setDelayedPopup (id, historyPopup);
\end{verbatim}
\normalsize


Don't add delayed popups to buttons which have normal popups.

You may add popups which are derived from {\bf QPopup\-Menu}. You may add popups that are already in the menu bar or are submenus of other popups. 

Definition at line 495 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::set\-Delayed\-Popup().

Referenced by KPaste\-Text\-Action::plug(), KTool\-Bar\-Popup\-Action::plug(), KAction\-Menu::plug(), and KRecent\-Files\-Action::plug().\index{KToolBar@{KTool\-Bar}!setAutoRepeat@{setAutoRepeat}}
\index{setAutoRepeat@{setAutoRepeat}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Auto\-Repeat (int {\em id}, bool {\em flag} = {\tt true})}\label{classKToolBar_a24}


Turns a button into an autorepeat button. 

Toggle buttons, buttons with menus, or buttons with delayed menus cannot be made into autorepeat buttons. Moreover, you can and will receive only the signal {\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})}, but not {\bf pressed()}{\rm (p.\,\pageref{classKToolBar_l2})} or {\bf released()}{\rm (p.\,\pageref{classKToolBar_l3})}. When the user presses this button, you will receive the signal {\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})}, and if the button is still pressed after some time, you will receive more {\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})} signals separated by regular intervals. Since this uses {\bf QButton::set\-Auto\-Repeat()} , I can't quantify 'some'. 

Definition at line 503 of file ktoolbar.cpp.

References get\-Button().\index{KToolBar@{KTool\-Bar}!setToggle@{setToggle}}
\index{setToggle@{setToggle}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Toggle (int {\em id}, bool {\em flag} = {\tt true})}\label{classKToolBar_a25}


Turns button into a toggle button if {\tt flag} is true. 



Definition at line 511 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::set\-Toggle().

Referenced by KToggle\-Action::plug().\index{KToolBar@{KTool\-Bar}!toggleButton@{toggleButton}}
\index{toggleButton@{toggleButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::toggle\-Button (int {\em id})}\label{classKToolBar_a26}


Toggles a togglebutton. 

If the button is a toggle button (see {\bf set\-Toggle()}{\rm (p.\,\pageref{classKToolBar_a25})}) the button state will be toggled. This will also cause the toolbar to emit the signal KButton::toggled() with parameter {\tt id}. You must connect to this signal, or use {\bf add\-Connection()}{\rm (p.\,\pageref{classKToolBar_a18})} to connect directly to the button signal KButton::toggled(). 

Definition at line 519 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::toggle().\index{KToolBar@{KTool\-Bar}!setButton@{setButton}}
\index{setButton@{setButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Button (int {\em id}, bool {\em flag})}\label{classKToolBar_a27}


Sets a toggle button state. 

If the button is a toggle button (see {\bf set\-Toggle()}{\rm (p.\,\pageref{classKToolBar_a25})}) this will set its state flag. This will also emit the signal KButton::toggled().

\begin{Desc}
\item[See also:]{\bf set\-Toggle()}{\rm (p.\,\pageref{classKToolBar_a25})} \end{Desc}


Definition at line 527 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::on().

Referenced by KToggle\-Action::plug().\index{KToolBar@{KTool\-Bar}!isButtonOn@{isButtonOn}}
\index{isButtonOn@{isButtonOn}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar::is\-Button\-On (int {\em id}) const}\label{classKToolBar_a28}


Returns {\tt true} if button is on and is a toggle button. 

\begin{Desc}
\item[Returns:]{\tt true} if button is on and is a toggle button \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Toggle()}{\rm (p.\,\pageref{classKToolBar_a25})} \end{Desc}


Definition at line 535 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!setLinedText@{setLinedText}}
\index{setLinedText@{setLinedText}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Lined\-Text (int {\em id}, const {\bf QString} \& {\em text})}\label{classKToolBar_a29}


Sets the text of a line editor. 

Cursor is set at end of text. 

Definition at line 542 of file ktoolbar.cpp.

References get\-Lined(), and KLine\-Edit::set\-Text().\index{KToolBar@{KTool\-Bar}!getLinedText@{getLinedText}}
\index{getLinedText@{getLinedText}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KTool\-Bar::get\-Lined\-Text (int {\em id}) const}\label{classKToolBar_a30}


Returns the line editor text. 

\begin{Desc}
\item[Returns:]the line editor text. \end{Desc}


Definition at line 550 of file ktoolbar.cpp.

References QLine\-Edit::text().\index{KToolBar@{KTool\-Bar}!insertComboItem@{insertComboItem}}
\index{insertComboItem@{insertComboItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::insert\-Combo\-Item (int {\em id}, const {\bf QString} \& {\em text}, int {\em index})}\label{classKToolBar_a31}


Inserts {\tt text} in combobox {\tt id} at position {\tt index}. 



Definition at line 557 of file ktoolbar.cpp.

References get\-Combo(), and QCombo\-Box::insert\-Item().\index{KToolBar@{KTool\-Bar}!insertComboList@{insertComboList}}
\index{insertComboList@{insertComboList}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::insert\-Combo\-List (int {\em id}, const {\bf QString\-List} \& {\em list}, int {\em index})}\label{classKToolBar_a32}


Inserts {\tt list} in combobox {\tt id} at position {\tt index}. 



Definition at line 564 of file ktoolbar.cpp.

References get\-Combo(), and QCombo\-Box::insert\-String\-List().\index{KToolBar@{KTool\-Bar}!removeComboItem@{removeComboItem}}
\index{removeComboItem@{removeComboItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::remove\-Combo\-Item (int {\em id}, int {\em index})}\label{classKToolBar_a33}


Removes item {\tt index} from combobox {\tt id}. 



Definition at line 572 of file ktoolbar.cpp.

References get\-Combo(), and QCombo\-Box::remove\-Item().\index{KToolBar@{KTool\-Bar}!setCurrentComboItem@{setCurrentComboItem}}
\index{setCurrentComboItem@{setCurrentComboItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Current\-Combo\-Item (int {\em id}, int {\em index})}\label{classKToolBar_a34}


Sets item {\tt index} to be current item in combobox {\tt id}. 



Definition at line 580 of file ktoolbar.cpp.

References get\-Combo(), and KCombo\-Box::set\-Current\-Item().\index{KToolBar@{KTool\-Bar}!changeComboItem@{changeComboItem}}
\index{changeComboItem@{changeComboItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::change\-Combo\-Item (int {\em id}, const {\bf QString} \& {\em text}, int {\em index} = {\tt -1})}\label{classKToolBar_a35}


Changes item {\tt index} in combobox {\tt id} to text. 

{\tt index} = -1 refers current item (one displayed in the button). 

Definition at line 588 of file ktoolbar.cpp.

References QCombo\-Box::change\-Item(), and get\-Combo().\index{KToolBar@{KTool\-Bar}!clearCombo@{clearCombo}}
\index{clearCombo@{clearCombo}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::clear\-Combo (int {\em id})}\label{classKToolBar_a36}


Clears the combobox {\tt id}. 

Does not delete it or hide it. 

Definition at line 596 of file ktoolbar.cpp.

References QCombo\-Box::clear(), and get\-Combo().\index{KToolBar@{KTool\-Bar}!getComboItem@{getComboItem}}
\index{getComboItem@{getComboItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KTool\-Bar::get\-Combo\-Item (int {\em id}, int {\em index} = {\tt -1}) const}\label{classKToolBar_a37}


Returns text of item {\tt index} from combobox {\tt id}. 

\begin{Desc}
\item[Returns:]text of item {\tt index} from combobox {\tt id}.\end{Desc}
{\tt index} = -1 refers to current item. 

Definition at line 604 of file ktoolbar.cpp.

References QCombo\-Box::text().\index{KToolBar@{KTool\-Bar}!getCombo@{getCombo}}
\index{getCombo@{getCombo}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KCombo\-Box} $\ast$ KTool\-Bar::get\-Combo (int {\em id})}\label{classKToolBar_a38}


Returns a pointer to the combobox with {\tt id}. 

\begin{Desc}
\item[Returns:]a pointer to the combobox with {\tt id}.\end{Desc}
Example: 

\footnotesize\begin{verbatim} KComboBox *combo = toolbar->getCombo(combo_id);
\end{verbatim}
\normalsize
 That way you can get access to other public methods that {\bf KCombo\-Box}{\rm (p.\,\pageref{classKComboBox})} provides. 

Definition at line 611 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().

Referenced by change\-Combo\-Item(), clear\-Combo(), insert\-Combo\-Item(), insert\-Combo\-List(), KSelect\-Action::plug(), remove\-Combo\-Item(), and set\-Current\-Combo\-Item().\index{KToolBar@{KTool\-Bar}!getLined@{getLined}}
\index{getLined@{getLined}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLine\-Edit} $\ast$ KTool\-Bar::get\-Lined (int {\em id})}\label{classKToolBar_a39}


Returns a pointer to KTool\-Bar\-Lined with {\tt id}. 

\begin{Desc}
\item[Returns:]a pointer to KTool\-Bar\-Lined with {\tt id}.\end{Desc}
Example: 

\footnotesize\begin{verbatim} KLineEdit * lined = toolbar->getKToolBarLined(lined_id);
\end{verbatim}
\normalsize
 That way you can get access to other public methods that {\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})} provides. {\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})} is the same thing as {\bf QLine\-Edit} plus completion signals. 

Definition at line 620 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().

Referenced by set\-Lined\-Text().\index{KToolBar@{KTool\-Bar}!getButton@{getButton}}
\index{getButton@{getButton}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KTool\-Bar\-Button} $\ast$ KTool\-Bar::get\-Button (int {\em id})}\label{classKToolBar_a40}


Returns a pointer to {\bf KTool\-Bar\-Button}{\rm (p.\,\pageref{classKToolBarButton})}. 

Example: 

\footnotesize\begin{verbatim} KToolBarButton * button = toolbar->getButton(button_id);
\end{verbatim}
\normalsize
 That way you can get access to other public methods that {\bf KTool\-Bar\-Button}{\rm (p.\,\pageref{classKToolBarButton})} provides.

Using this method is not recommended. 

Definition at line 629 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().

Referenced by KTool\-Bar\-Radio\-Group::add\-Button(), KPaste\-Text\-Action::plug(), KTool\-Bar\-Popup\-Action::plug(), KAction\-Menu::plug(), KRecent\-Files\-Action::plug(), KAction::plug(), set\-Auto\-Repeat(), set\-Button(), set\-Button\-Icon(), set\-Button\-Icon\-Set(), set\-Button\-Pixmap(), set\-Delayed\-Popup(), set\-Item\-No\-Style(), set\-Toggle(), and toggle\-Button().\index{KToolBar@{KTool\-Bar}!alignItemRight@{alignItemRight}}
\index{alignItemRight@{alignItemRight}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::align\-Item\-Right (int {\em id}, bool {\em right} = {\tt true})}\label{classKToolBar_a41}


Align item to the right. 

This works only if toolbar is set to full width. \begin{Desc}
\item[See also:]set\-Full\-Width() \end{Desc}


Definition at line 638 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().\index{KToolBar@{KTool\-Bar}!getWidget@{getWidget}}
\index{getWidget@{getWidget}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QWidget} $\ast$ KTool\-Bar::get\-Widget (int {\em id})}\label{classKToolBar_a42}


Returns a pointer to the widget corresponding to {\tt id}. 

\begin{Desc}
\item[Returns:]a pointer to the widget corresponding to {\tt id}.\end{Desc}
Wrong ids are not tested. You can do with this whatever you want, except change its height (hardcoded). If you change its width you will probably have to call QTool\-Bar::update\-Rects(true) \begin{Desc}
\item[See also:]{\bf QWidget} 

update\-Rects() \end{Desc}


Definition at line 650 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().

Referenced by add\-Connection(), hide\-Item(), item\-Index(), set\-Item\-Auto\-Sized(), set\-Item\-Enabled(), and show\-Item().\index{KToolBar@{KTool\-Bar}!setItemAutoSized@{setItemAutoSized}}
\index{setItemAutoSized@{setItemAutoSized}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Item\-Auto\-Sized (int {\em id}, bool {\em yes} = {\tt true})}\label{classKToolBar_a43}


Set item autosized. 

This works only if the toolbar is set to full width. Only {\tt one} item can be autosized, and it has to be the last left-aligned item. Items that come after this must be right aligned. Items that can be right aligned are Lineds, Frames, Widgets and Combos. An autosized item will resize itself whenever the toolbar geometry changes to the last right-aligned item (or to end of toolbar if there are no right-aligned items.) \begin{Desc}
\item[See also:]set\-Full\-Width() 

{\bf align\-Item\-Right()}{\rm (p.\,\pageref{classKToolBar_a41})} \end{Desc}


Definition at line 657 of file ktoolbar.cpp.

References get\-Widget(), and QTool\-Bar::set\-Stretchable\-Widget().

Referenced by KWidget\-Action::plug().\index{KToolBar@{KTool\-Bar}!clear@{clear}}
\index{clear@{clear}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::clear ()}\label{classKToolBar_a44}


Remove all items. 

The toolbar is redrawn after it. 

Reimplemented from {\bf QTool\-Bar}.

Definition at line 665 of file ktoolbar.cpp.

References QMap::clear(), and QTool\-Bar::clear().\index{KToolBar@{KTool\-Bar}!removeItem@{removeItem}}
\index{removeItem@{removeItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::remove\-Item (int {\em id})}\label{classKToolBar_a45}


Remove item {\tt id}. 

Item is deleted. Toolbar is redrawn after it. 

Definition at line 673 of file ktoolbar.cpp.

References QMap::end(), endl(), QMap::find(), kd\-Debug(), QMap::remove(), and QPtr\-List::remove\-Ref().\index{KToolBar@{KTool\-Bar}!removeItemDelayed@{removeItemDelayed}}
\index{removeItemDelayed@{removeItemDelayed}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::remove\-Item\-Delayed (int {\em id})}\label{classKToolBar_a46}


Remove item {\tt id}. 

Item is deleted when toolbar is redrawn. 

Definition at line 689 of file ktoolbar.cpp.

References QMap::end(), endl(), QMap::find(), kd\-Debug(), QMap::remove(), QPtr\-List::remove\-Ref(), and QTimer::start().

Referenced by KAction::unplug().\index{KToolBar@{KTool\-Bar}!hideItem@{hideItem}}
\index{hideItem@{hideItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::hide\-Item (int {\em id})}\label{classKToolBar_a47}


Hide item {\tt id}. 



Definition at line 708 of file ktoolbar.cpp.

References get\-Widget(), and QWidget::hide().\index{KToolBar@{KTool\-Bar}!showItem@{showItem}}
\index{showItem@{showItem}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::show\-Item (int {\em id})}\label{classKToolBar_a48}


Show item {\tt id}. 



Definition at line 716 of file ktoolbar.cpp.

References get\-Widget(), and QWidget::show().\index{KToolBar@{KTool\-Bar}!itemIndex@{itemIndex}}
\index{itemIndex@{itemIndex}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::item\-Index (int {\em id})}\label{classKToolBar_a49}


Returns the index of the item {\tt id}. 

\begin{Desc}
\item[Returns:]the index of the item {\tt id}. \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 724 of file ktoolbar.cpp.

References QPtr\-List::find\-Ref(), and get\-Widget().\index{KToolBar@{KTool\-Bar}!idAt@{idAt}}
\index{idAt@{idAt}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::id\-At (int {\em index})}\label{classKToolBar_a50}


Returns the id of the item at the given index. 

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


Definition at line 730 of file ktoolbar.cpp.

References QPtr\-List::at().\index{KToolBar@{KTool\-Bar}!setFullSize@{setFullSize}}
\index{setFullSize@{setFullSize}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Full\-Size (bool {\em flag} = {\tt true})}\label{classKToolBar_a51}


Set toolbar to full parent size (default). 

In full size mode the bar extends over the parent's full width or height. If the mode is disabled the toolbar tries to take as much space as it needs without wrapping, but it does not exceed the parent box. You can force a certain width or height with {\bf set\-Max\-Width()}{\rm (p.\,\pageref{classKToolBar_a59})} or {\bf set\-Max\-Height()}{\rm (p.\,\pageref{classKToolBar_a57})}.

If you want to use right-aligned items or auto-sized items you must use full size mode. 

Definition at line 736 of file ktoolbar.cpp.

Referenced by load\-State().\index{KToolBar@{KTool\-Bar}!fullSize@{fullSize}}
\index{fullSize@{fullSize}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar::full\-Size () const}\label{classKToolBar_a52}


Returns the full-size mode enabled flag. 

\begin{Desc}
\item[Returns:]{\tt true} if the full-size mode is enabled. \end{Desc}
\index{KToolBar@{KTool\-Bar}!enableMoving@{enableMoving}}
\index{enableMoving@{enableMoving}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::enable\-Moving (bool {\em flag} = {\tt true})}\label{classKToolBar_a53}


Enable or disable moving of toolbar. 

\begin{Desc}
\item[{\bf Deprecated}]use set\-Moving\-Enabled(bool) instead. \end{Desc}


Definition at line 749 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!setBarPos@{setBarPos}}
\index{setBarPos@{setBarPos}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Bar\-Pos ({\bf Bar\-Position} {\em bpos})}\label{classKToolBar_a54}


Set position of toolbar. 

\begin{Desc}
\item[See also:]{\bf Bar\-Position()}{\rm (p.\,\pageref{classKToolBar_w16})} \end{Desc}


Definition at line 755 of file ktoolbar.cpp.

References QTool\-Bar::main\-Window().\index{KToolBar@{KTool\-Bar}!barPos@{barPos}}
\index{barPos@{barPos}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Bar\-Position} KTool\-Bar::bar\-Pos () const}\label{classKToolBar_a55}


Returns the toolbar position. 

\begin{Desc}
\item[Returns:]position of toolbar. \end{Desc}
\index{KToolBar@{KTool\-Bar}!enable@{enable}}
\index{enable@{enable}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar::enable ({\bf Bar\-Status} {\em stat})}\label{classKToolBar_a56}


Show, hide, or toggle toolbar. 

This method is provided for compatibility only, please use show() and/or hide() instead. \begin{Desc}
\item[See also:]{\bf Bar\-Status}{\rm (p.\,\pageref{classKToolBar_w15})} \end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Definition at line 779 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!setMaxHeight@{setMaxHeight}}
\index{setMaxHeight@{setMaxHeight}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Max\-Height (int {\em h})}\label{classKToolBar_a57}


Use set\-Maximum\-Height() instead. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Definition at line 792 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!maxHeight@{maxHeight}}
\index{maxHeight@{maxHeight}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::max\-Height ()}\label{classKToolBar_a58}


Returns the value set with {\bf set\-Max\-Height()}{\rm (p.\,\pageref{classKToolBar_a57})}. 

\begin{Desc}
\item[{\bf Deprecated}]Use maximum\-Height() instead.\end{Desc}
\begin{Desc}
\item[Returns:]the value set with {\bf set\-Max\-Height()}{\rm (p.\,\pageref{classKToolBar_a57})}. \end{Desc}


Definition at line 797 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!setMaxWidth@{setMaxWidth}}
\index{setMaxWidth@{setMaxWidth}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Max\-Width (int {\em dw})}\label{classKToolBar_a59}


Use set\-Maximum\-Width() instead. 

Set maximal width of horizontal (top or bottom) toolbar. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Definition at line 803 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!maxWidth@{maxWidth}}
\index{maxWidth@{maxWidth}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::max\-Width ()}\label{classKToolBar_a60}


Returns the value set with {\bf set\-Max\-Width()}{\rm (p.\,\pageref{classKToolBar_a59})}. 

Use maximum\-Width() instead. \begin{Desc}
\item[Returns:]the value set with {\bf set\-Max\-Width()}{\rm (p.\,\pageref{classKToolBar_a59})}. \end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Definition at line 809 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!setTitle@{setTitle}}
\index{setTitle@{setTitle}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Title (const {\bf QString} \& {\em \_\-title})}\label{classKToolBar_a61}


Set title for toolbar when it floats. 

Titles are however not (yet) visible. You can't change toolbar's title while it's floating. 

Definition at line 815 of file ktoolbar.cpp.

References QTool\-Bar::set\-Label().\index{KToolBar@{KTool\-Bar}!enableFloating@{enableFloating}}
\index{enableFloating@{enableFloating}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::enable\-Floating (bool {\em flag})}\label{classKToolBar_a62}


Use set\-Moving\-Enabled(bool) instead. 

\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Definition at line 821 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!setIconText@{setIconText}}
\index{setIconText@{setIconText}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Icon\-Text (Icon\-Text {\em it})}\label{classKToolBar_a63}


Set the kind of painting for buttons. 

Choose from: \begin{itemize}
\item Icon\-Only (only icons), \item Icon\-Text\-Right (icon and text, text is left from icons), \item Text\-Only (only text), \item Icon\-Text\-Bottom (icons and text, text is under icons). \begin{Desc}
\item[See also:]Icon\-Text \end{Desc}
\end{itemize}


Definition at line 826 of file ktoolbar.cpp.

Referenced by load\-State().\index{KToolBar@{KTool\-Bar}!setIconText@{setIconText}}
\index{setIconText@{setIconText}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Icon\-Text (Icon\-Text {\em it}, bool {\em update})}\label{classKToolBar_a64}


Similar to {\bf set\-Icon\-Text(Icon\-Text it)}{\rm (p.\,\pageref{classKToolBar_a63})} but allows you to disable or enable updating. 

If {\tt update} is false, then the buttons will not be updated. This is useful only if you know that you will be forcing an update later. 

Definition at line 832 of file ktoolbar.cpp.

References QTool\-Bar::main\-Window().\index{KToolBar@{KTool\-Bar}!iconText@{iconText}}
\index{iconText@{iconText}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Icon\-Text KTool\-Bar::icon\-Text () const}\label{classKToolBar_a65}


Returns the current text style for buttons. 

\begin{Desc}
\item[Returns:]the current text style for buttons. \end{Desc}
\index{KToolBar@{KTool\-Bar}!setIconSize@{setIconSize}}
\index{setIconSize@{setIconSize}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Icon\-Size (int {\em size})}\label{classKToolBar_a66}


Set the icon size to load. 

Usually you should not call this, the icon size is taken care of by {\bf KIcon\-Loader} and globally configured. By default, the toolbar will load icons of size 32 for main toolbars and 22 for other toolbars \begin{Desc}
\item[See also:]{\bf KIcon\-Loader}.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em size}]The size to use \end{description}
\end{Desc}


Definition at line 868 of file ktoolbar.cpp.

Referenced by load\-State().\index{KToolBar@{KTool\-Bar}!setIconSize@{setIconSize}}
\index{setIconSize@{setIconSize}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Icon\-Size (int {\em size}, bool {\em update})}\label{classKToolBar_a67}


Same as set\-Icon\-Text(int size) but allows you to disable the toolbar update. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em size}]The size to use \item[{\em update}]If true, then the toolbar will be updated after this \end{description}
\end{Desc}


Definition at line 873 of file ktoolbar.cpp.

References QTool\-Bar::main\-Window().\index{KToolBar@{KTool\-Bar}!iconSize@{iconSize}}
\index{iconSize@{iconSize}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::icon\-Size () const}\label{classKToolBar_a68}


Returns the current icon size for buttons. 

\begin{Desc}
\item[Returns:]the current icon size for buttons. \end{Desc}


Referenced by save\-Settings().\index{KToolBar@{KTool\-Bar}!iconSizeDefault@{iconSizeDefault}}
\index{iconSizeDefault@{iconSizeDefault}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::icon\-Size\-Default () const}\label{classKToolBar_a69}


Returns the default size for this type of toolbar. 

\begin{Desc}
\item[Returns:]the default size for this type of toolbar. \end{Desc}


Definition at line 907 of file ktoolbar.cpp.

References KIcon\-Loader::current\-Size(), and KGlobal::icon\-Loader().

Referenced by save\-Settings().\index{KToolBar@{KTool\-Bar}!setEnableContextMenu@{setEnableContextMenu}}
\index{setEnableContextMenu@{setEnableContextMenu}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Enable\-Context\-Menu (bool {\em enable} = {\tt true})}\label{classKToolBar_a70}


This allows you to enable or disable the context menu. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em enable}]If false, then the context menu will be disabled \end{description}
\end{Desc}


Definition at line 915 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!contextMenuEnabled@{contextMenuEnabled}}
\index{contextMenuEnabled@{contextMenuEnabled}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar::context\-Menu\-Enabled () const}\label{classKToolBar_a71}


Returns the context menu enabled flag. 

\begin{Desc}
\item[Returns:]true if the context menu is disabled \end{Desc}


Definition at line 921 of file ktoolbar.cpp.\index{KToolBar@{KTool\-Bar}!setItemNoStyle@{setItemNoStyle}}
\index{setItemNoStyle@{setItemNoStyle}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Item\-No\-Style (int {\em id}, bool {\em no\_\-style} = {\tt true})}\label{classKToolBar_a72}


This will inform a toolbar button to ignore certain style changes. 

Specifically, it will ignore Icon\-Text (always Icon\-Only) and will not allow image effects to apply.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The button to exclude from styles \item[{\em no\_\-style}]If true, then it is excluded (default: true). \end{description}
\end{Desc}


Definition at line 927 of file ktoolbar.cpp.

References get\-Button(), and KTool\-Bar\-Button::set\-No\-Style().\index{KToolBar@{KTool\-Bar}!count@{count}}
\index{count@{count}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar::count () const}\label{classKToolBar_a74}


Returns the total number of items in the toolbar. 

\begin{Desc}
\item[Returns:]the total number of items in the toolbar \end{Desc}


Definition at line 950 of file ktoolbar.cpp.

References QMap::count().\index{KToolBar@{KTool\-Bar}!saveState@{saveState}}
\index{saveState@{saveState}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::save\-State ()}\label{classKToolBar_a75}


Instruct the toolbar to save it's current state to either the app config file or to the XML-GUI resource file (whichever has precedence). 



Definition at line 956 of file ktoolbar.cpp.

References QDom\-Element::attribute(), KGlobal::config(), QDom\-Document::document\-Element(), QDom\-Node::is\-Null(), QDom\-Node::next\-Sibling(), save\-Settings(), QDom\-Document::set\-Content(), KConfig\-Base::sync(), QDom\-Element::tag\-Name(), and QDom\-Node::to\-Element().

Referenced by KXMLGUIBuilder::remove\-Container().\index{KToolBar@{KTool\-Bar}!saveSettings@{saveSettings}}
\index{saveSettings@{saveSettings}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::save\-Settings ({\bf KConfig} $\ast$ {\em config}, const {\bf QString} \& {\em config\-Group})}\label{classKToolBar_a76}


Save the toolbar settings to group {\tt config\-Group} in {\tt config}. 



Definition at line 1037 of file ktoolbar.cpp.

References QPtr\-List::append(), QPtr\-List\-Iterator::count(), QPtr\-List::first(), icon\-Size(), icon\-Size\-Default(), QString::is\-Empty(), QTool\-Bar::main\-Window(), QPtr\-List::next(), and QMain\-Window::tool\-Bars().

Referenced by KMain\-Window::save\-Main\-Window\-Settings(), and save\-State().\index{KToolBar@{KTool\-Bar}!applySettings@{applySettings}}
\index{applySettings@{applySettings}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::apply\-Settings ({\bf KConfig} $\ast$ {\em config}, const {\bf QString} \& {\em config\-Group}, bool {\em force})}\label{classKToolBar_a77}


Read the toolbar settings from group {\tt config\-Group} in {\tt config} and apply them. 

Even default settings are re-applied if {\tt force} is set. 

Definition at line 1635 of file ktoolbar.cpp.

References QString::is\-Empty(), QTool\-Bar::main\-Window(), and KGlobal::static\-QString().

Referenced by KMain\-Window::apply\-Main\-Window\-Settings().\index{KToolBar@{KTool\-Bar}!setText@{setText}}
\index{setText@{setText}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-Text (const {\bf QString} \& {\em txt})}\label{classKToolBar_a80}


Assign a (translated) text to this toolbar. 

This is used for the tooltip on the handle, and when listing the toolbars. 

Definition at line 1128 of file ktoolbar.cpp.

References QTool\-Bar::set\-Label().

Referenced by load\-State().\index{KToolBar@{KTool\-Bar}!text@{text}}
\index{text@{text}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KTool\-Bar::text () const}\label{classKToolBar_a81}


Returns the toolbar's text. 

\begin{Desc}
\item[Returns:]the toolbar's text. \end{Desc}
\index{KToolBar@{KTool\-Bar}!loadState@{loadState}}
\index{loadState@{loadState}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::load\-State (const {\bf QDom\-Element} \& {\em e})}\label{classKToolBar_a91}


Load state from an XML element, called by {\bf KXMLGUIBuilder}{\rm (p.\,\pageref{classKXMLGUIBuilder})}. 



Definition at line 1769 of file ktoolbar.cpp.

References QMain\-Window::add\-Dock\-Window(), highlight\-Setting(), icon\-Text\-Setting(), QString::is\-Empty(), QCString::is\-Empty(), QString::latin1(), QString::lower(), QCString::lower(), QTool\-Bar::main\-Window(), QMain\-Window::move\-Dock\-Window(), QMain\-Window::opaque\-Moving(), set\-Full\-Size(), set\-Icon\-Size(), set\-Icon\-Text(), QMain\-Window::set\-Opaque\-Moving(), set\-Text(), QString::to\-Int(), QCString::to\-Int(), transparent\-Setting(), and QString::utf8().

Referenced by KXMLGUIBuilder::create\-Container().\index{KToolBar@{KTool\-Bar}!clicked@{clicked}}
\index{clicked@{clicked}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::clicked (int {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l0}


Emitted when button {\tt id} is clicked. 



Referenced by insert\-Animated\-Widget().\index{KToolBar@{KTool\-Bar}!doubleClicked@{doubleClicked}}
\index{doubleClicked@{doubleClicked}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::double\-Clicked (int {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l1}


Emitted when button {\tt id} is double-clicked. 

Note: you will always recive two {\bf clicked()}{\rm (p.\,\pageref{classKToolBar_l0})} , {\bf pressed()}{\rm (p.\,\pageref{classKToolBar_l2})} and {\bf released()}{\rm (p.\,\pageref{classKToolBar_l3})} signals. There is no way to avoid it - at least no easy way. If you need to resolve this all you can do is set up timers which wait for {\bf QApplication::double\-Click\-Interval()} to expire. If in that time you don't get this signal, you may belive that button was only clicked and not double-clicked. And please note that butons with popup menus do not emit this signal, but those with delayed popup do. \index{KToolBar@{KTool\-Bar}!pressed@{pressed}}
\index{pressed@{pressed}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::pressed (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l2}


Emitted when button {\tt id} is pressed. 

\index{KToolBar@{KTool\-Bar}!released@{released}}
\index{released@{released}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::released (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l3}


Emits when button {\tt id} is released. 

\index{KToolBar@{KTool\-Bar}!toggled@{toggled}}
\index{toggled@{toggled}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::toggled (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l4}


Emitted when a toggle button changes state. 

Emitted also if you change state with {\bf set\-Button()}{\rm (p.\,\pageref{classKToolBar_a27})} or {\bf toggle\-Button()}{\rm (p.\,\pageref{classKToolBar_a26})} If you make a button normal again, with set\-Toggle(false), this signal won't be emitted. \index{KToolBar@{KTool\-Bar}!highlighted@{highlighted}}
\index{highlighted@{highlighted}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::highlighted (int {\em id}, bool {\em is\-Highlighted})\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l5}


This signal is emitted when item {\tt id} gets highlighted/unhighlighted (i.e when mouse enters/exits). 

Note that this signal is emitted from all buttons (normal, disabled and toggle) even when there is no visible change in buttons (i.e., buttons do not raise when mouse enters). The parameter {\tt is\-Highlighted} is {\tt true} when mouse enters and {\tt false} when mouse exits. \index{KToolBar@{KTool\-Bar}!highlighted@{highlighted}}
\index{highlighted@{highlighted}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::highlighted (int {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l6}


This signal is emitted when item {\tt id} gets highlighted/unhighlighted (i.e when mouse enters/exits). 

Note that this signal is emitted from all buttons (normal, disabled and toggle) even when there is no visible change in buttons (i.e., buttons do not raise when mouse enters). \index{KToolBar@{KTool\-Bar}!moved@{moved}}
\index{moved@{moved}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::moved ({\bf Bar\-Position})\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l7}


Emitted when toolbar changes position, or when an item is removed from toolbar. 

If you subclass {\bf KMain\-Window}{\rm (p.\,\pageref{classKMainWindow})} and reimplement KMain\-Window::resize\-Event() be sure to connect to this signal. Note: You can connect this signal to a slot that doesn't take parameter. \index{KToolBar@{KTool\-Bar}!modechange@{modechange}}
\index{modechange@{modechange}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::modechange ()\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l8}


This signal is emitted when toolbar detects changing of following parameters: highlighting, button-size, button-mode. 

This signal is internal, aimed to buttons. \index{KToolBar@{KTool\-Bar}!toolbarDestroyed@{toolbarDestroyed}}
\index{toolbarDestroyed@{toolbarDestroyed}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::toolbar\-Destroyed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKToolBar_l9}


This signal is emitted when the toolbar is getting deleted, and before $\sim$KToolbar finishes (so it's still time to remove widgets from the toolbar). 

Used by {\bf KWidget\-Action}{\rm (p.\,\pageref{classKWidgetAction})}. \begin{Desc}
\item[Since:]3.2 \end{Desc}


Referenced by $\sim$KTool\-Bar().\index{KToolBar@{KTool\-Bar}!highlightSetting@{highlightSetting}}
\index{highlightSetting@{highlightSetting}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar::highlight\-Setting ()\hspace{0.3cm}{\tt  [static]}}\label{classKToolBar_e0}


Returns the global setting for \char`\"{}Highlight buttons under mouse\char`\"{}. 

\begin{Desc}
\item[Returns:]global setting for \char`\"{}Highlight buttons under mouse\char`\"{} \end{Desc}


Definition at line 1477 of file ktoolbar.cpp.

References KGlobal::config(), and KConfig\-Base::read\-Bool\-Entry().

Referenced by load\-State().\index{KToolBar@{KTool\-Bar}!transparentSetting@{transparentSetting}}
\index{transparentSetting@{transparentSetting}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar::transparent\-Setting ()\hspace{0.3cm}{\tt  [static]}}\label{classKToolBar_e1}


Returns the global setting for \char`\"{}Toolbars transparent when moving\char`\"{}. 

\begin{Desc}
\item[Returns:]global setting for \char`\"{}Toolbars transparent when moving\char`\"{} \end{Desc}


Definition at line 1485 of file ktoolbar.cpp.

References KGlobal::config(), and KConfig\-Base::read\-Bool\-Entry().

Referenced by load\-State().\index{KToolBar@{KTool\-Bar}!iconTextSetting@{iconTextSetting}}
\index{iconTextSetting@{iconTextSetting}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar::Icon\-Text KTool\-Bar::icon\-Text\-Setting ()\hspace{0.3cm}{\tt  [static]}}\label{classKToolBar_e2}


Returns the global setting for \char`\"{}Icon Text\char`\"{}. 

\begin{Desc}
\item[Returns:]global setting for \char`\"{}Icon Text\char`\"{} \end{Desc}


Definition at line 1493 of file ktoolbar.cpp.

References KGlobal::config(), and KConfig\-Base::read\-Entry().

Referenced by load\-State().

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