\section{KTool\-Bar Class Reference}
\label{classKToolBar}\index{KToolBar@{KToolBar}}
A KDE-style toolbar. 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=284pt]{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}
 \}
\begin{CompactList}\small\item\em The state of the status bar. \item\end{CompactList}\item 
enum {\bf Bar\-Position} \{ \par
{\bf Unmanaged}, 
{\bf Floating}, 
{\bf Top}, 
{\bf Bottom}, 
\par
{\bf Right}, 
{\bf Left}, 
{\bf Flat}
 \}
\begin{CompactList}\small\item\em Possible bar positions. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Emitted when button {\tt id} is clicked. \item\end{CompactList}\item 
void {\bf double\-Clicked} (int id)
\begin{CompactList}\small\item\em Emitted when button {\tt id} is double-clicked. \item\end{CompactList}\item 
void {\bf pressed} (int)
\begin{CompactList}\small\item\em Emitted when button {\tt id} is pressed. \item\end{CompactList}\item 
void {\bf released} (int)
\begin{CompactList}\small\item\em Emits when button {\tt id} is released. \item\end{CompactList}\item 
void {\bf toggled} (int)
\begin{CompactList}\small\item\em Emitted when a toggle button changes state. \item\end{CompactList}\item 
void {\bf highlighted} (int id, bool is\-Highlighted)
\begin{CompactList}\small\item\em This signal is emitted when item id gets highlighted/unhighlighted (i.e when mouse enters/exits). \item\end{CompactList}\item 
void {\bf highlighted} (int id)
\begin{CompactList}\small\item\em This signal is emitted when item id gets highlighted/unhighlighted (i.e when mouse enters/exits). \item\end{CompactList}\item 
void {\bf moved} ({\bf Bar\-Position})
\begin{CompactList}\small\item\em Emitted when toolbar changes position, or when an item is removed from toolbar. \item\end{CompactList}\item 
void {\bf modechange} ()\label{classKToolBar_l8}

\item 
void {\bf toolbar\-Destroyed} ()
\begin{CompactList}\small\item\em 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). \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Constructor for non-XML-GUI applications. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Constructor for non-XML-GUI applications. \item\end{CompactList}\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}())
\begin{CompactList}\small\item\em Insert a button (a {\bf KTool\-Bar\-Button}{\rm (p.\,\pageref{classKToolBarButton})}) with a pixmap. \item\end{CompactList}\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}())
\begin{CompactList}\small\item\em This is the same as above, but with specified signals and slots to which this button will be connected. \item\end{CompactList}\item 
int {\bf insert\-Button} (const  {\bf QPixmap} \&pixmap, int id, bool enabled=true, const  {\bf QString} \&text=QString::null, int index=-1)
\begin{CompactList}\small\item\em Inserts a button (a {\bf KTool\-Bar\-Button}{\rm (p.\,\pageref{classKToolBarButton})}) with the specified pixmap. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em This is the same as above, but with specified signals and slots to which this button will be connected. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Inserts a button with popupmenu. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Inserts a button with popupmenu. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Inserts a {\bf KLine\-Edit}{\rm (p.\,\pageref{classKLineEdit})}. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Inserts a {\bf KCombo\-Box}{\rm (p.\,\pageref{classKComboBox})} with list. \item\end{CompactList}\item 
int {\bf insert\-Combo} (const  {\bf QString} \&text, int id, bool writable, const  char $\ast$signal, {\bf QObject} $\ast$recevier, 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)
\begin{CompactList}\small\item\em Insert a {\bf KCombo\-Box}{\rm (p.\,\pageref{classKComboBox})} with text. \item\end{CompactList}\item 
int {\bf insert\-Separator} (int index=-1, int id=-1)
\begin{CompactList}\small\item\em Inserts a separator into the toolbar with the given id. \item\end{CompactList}\item 
int {\bf insert\-Line\-Separator} (int index=-1, int id=-1)
\begin{CompactList}\small\item\em Inserts a line separator into the toolbar with the given id. \item\end{CompactList}\item 
int {\bf insert\-Widget} (int id, int width, {\bf QWidget} $\ast$\_\-widget, int index=-1)
\begin{CompactList}\small\item\em Inserts a user-defined widget. \item\end{CompactList}\item 
int {\bf insert\-Animated\-Widget} (int id, {\bf QObject} $\ast$receiver, const  char $\ast$slot, const  {\bf QString} \&icons, int index=-1)
\begin{CompactList}\small\item\em Inserts an animated widget. \item\end{CompactList}\item 
{\bf KAnim\-Widget} $\ast$ {\bf animated\-Widget} (int id)
\begin{CompactList}\small\item\em This will return a pointer to the given animated widget, if it exists. \item\end{CompactList}\item 
void {\bf add\-Connection} (int id, const  char $\ast$signal, const  {\bf QObject} $\ast$receiver, const  char $\ast$slot)
\begin{CompactList}\small\item\em Adds connections to items. \item\end{CompactList}\item 
void {\bf set\-Item\-Enabled} (int id, bool enabled)
\begin{CompactList}\small\item\em Enables/disables item. \item\end{CompactList}\item 
void {\bf set\-Button\-Icon} (int id, const  {\bf QString} \&\_\-icon)
\begin{CompactList}\small\item\em Sets the icon for a button. \item\end{CompactList}\item 
void {\bf set\-Button\-Pixmap} (int id, const  {\bf QPixmap} \&\_\-pixmap)
\begin{CompactList}\small\item\em Sets button pixmap. \item\end{CompactList}\item 
void {\bf set\-Button\-Icon\-Set} (int id, const  {\bf QIcon\-Set} \&iconset)
\begin{CompactList}\small\item\em Sets a button icon from a {\bf QIcon\-Set}. \item\end{CompactList}\item 
void {\bf set\-Delayed\-Popup} (int id, {\bf QPopup\-Menu} $\ast$\_\-popup, bool toggle=false)
\begin{CompactList}\small\item\em Sets a delayed popup for a button. \item\end{CompactList}\item 
void {\bf set\-Auto\-Repeat} (int id, bool flag=true)
\begin{CompactList}\small\item\em Turns a button into an autorepeat button. \item\end{CompactList}\item 
void {\bf set\-Toggle} (int id, bool flag=true)
\begin{CompactList}\small\item\em Turns button into a toggle button if {\tt flag} is true. \item\end{CompactList}\item 
void {\bf toggle\-Button} (int id)
\begin{CompactList}\small\item\em Toggles a togglebutton. \item\end{CompactList}\item 
void {\bf set\-Button} (int id, bool flag)
\begin{CompactList}\small\item\em Sets a toggle button state. \item\end{CompactList}\item 
bool {\bf is\-Button\-On} (int id) const 
\item 
void {\bf set\-Lined\-Text} (int id, const  {\bf QString} \&text)
\begin{CompactList}\small\item\em Sets the text of a line editor. \item\end{CompactList}\item 
{\bf QString} {\bf get\-Lined\-Text} (int id) const 
\begin{CompactList}\small\item\em Returns a line editor text. \item\end{CompactList}\item 
void {\bf insert\-Combo\-Item} (int id, const  {\bf QString} \&text, int index)
\begin{CompactList}\small\item\em Inserts {\tt text} in combobox {\tt id} at position {\tt index}. \item\end{CompactList}\item 
void {\bf insert\-Combo\-List} (int id, const  {\bf QString\-List} \&list, int index)
\begin{CompactList}\small\item\em Inserts {\tt list} in combobox {\tt id} at position {\tt index}. \item\end{CompactList}\item 
void {\bf remove\-Combo\-Item} (int id, int index)
\begin{CompactList}\small\item\em Removes item {\tt index} from combobox {\tt id}. \item\end{CompactList}\item 
void {\bf set\-Current\-Combo\-Item} (int id, int index)
\begin{CompactList}\small\item\em Sets item {\tt index} to be current item in combobox {\tt id}. \item\end{CompactList}\item 
void {\bf change\-Combo\-Item} (int id, const  {\bf QString} \&text, int index=-1)
\begin{CompactList}\small\item\em Changes item {\tt index} in combobox {\tt id} to text. \item\end{CompactList}\item 
void {\bf clear\-Combo} (int id)
\begin{CompactList}\small\item\em Clears the combobox {\tt id}. \item\end{CompactList}\item 
{\bf QString} {\bf get\-Combo\-Item} (int id, int index=-1) const 
\begin{CompactList}\small\item\em Returns text of item {\tt index} from combobox {\tt id}. \item\end{CompactList}\item 
{\bf KCombo\-Box} $\ast$ {\bf get\-Combo} (int id)
\begin{CompactList}\small\item\em Returns a pointer to the combobox. \item\end{CompactList}\item 
{\bf KLine\-Edit} $\ast$ {\bf get\-Lined} (int id)
\begin{CompactList}\small\item\em Returns a pointer to KTool\-Bar\-Lined. \item\end{CompactList}\item 
{\bf KTool\-Bar\-Button} $\ast$ {\bf get\-Button} (int id)
\begin{CompactList}\small\item\em Returns a pointer to {\bf KTool\-Bar\-Button}{\rm (p.\,\pageref{classKToolBarButton})}. \item\end{CompactList}\item 
void {\bf align\-Item\-Right} (int id, bool right=true)
\begin{CompactList}\small\item\em Align item to the right. \item\end{CompactList}\item 
{\bf QWidget} $\ast$ {\bf get\-Widget} (int id)
\begin{CompactList}\small\item\em Returns a pointer to an inserted widget. \item\end{CompactList}\item 
void {\bf set\-Item\-Auto\-Sized} (int id, bool yes=true)
\begin{CompactList}\small\item\em Set item autosized. \item\end{CompactList}\item 
void {\bf clear} ()
\begin{CompactList}\small\item\em Remove all items. \item\end{CompactList}\item 
void {\bf remove\-Item} (int id)
\begin{CompactList}\small\item\em Remove item {\tt id}. \item\end{CompactList}\item 
void {\bf hide\-Item} (int id)
\begin{CompactList}\small\item\em Hide item. \item\end{CompactList}\item 
void {\bf show\-Item} (int id)
\begin{CompactList}\small\item\em Show item. \item\end{CompactList}\item 
void {\bf set\-Full\-Size} (bool flag=true)
\begin{CompactList}\small\item\em Set toolbar to full parent size (default). \item\end{CompactList}\item 
bool {\bf full\-Size} () const 
\item 
void {\bf enable\-Moving} (bool flag=true)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} use set\-Moving\-Enabled(bool) instead. \item\end{CompactList}\item 
void {\bf set\-Bar\-Pos} ({\bf Bar\-Position} bpos)
\begin{CompactList}\small\item\em Set position of toolbar. \item\end{CompactList}\item 
{\bf Bar\-Position} {\bf bar\-Pos} () const 
\begin{CompactList}\small\item\em Returns position of toolbar. \item\end{CompactList}\item 
bool {\bf enable} ({\bf Bar\-Status} stat)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Show, hide, or toggle toolbar. \item\end{CompactList}\item 
void {\bf set\-Max\-Height} (int h)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Use set\-Maximum\-Height() instead. \item\end{CompactList}\item 
int {\bf max\-Height} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Use maximum\-Height() instead. \item\end{CompactList}\item 
void {\bf set\-Max\-Width} (int dw)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Use set\-Maximum\-Width() instead. \item\end{CompactList}\item 
int {\bf max\-Width} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Use maximum\-Width() instead. \item\end{CompactList}\item 
void {\bf set\-Title} (const  {\bf QString} \&\_\-title)
\begin{CompactList}\small\item\em Set title for toolbar when it floats. \item\end{CompactList}\item 
void {\bf enable\-Floating} (bool arrrrrrgh)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Use {\bf enable\-Moving()}{\rm (p.\,\pageref{classKToolBar_a50})} instead. \item\end{CompactList}\item 
void {\bf set\-Icon\-Text} (Icon\-Text it)
\begin{CompactList}\small\item\em Set the kind of painting for buttons. \item\end{CompactList}\item 
void {\bf set\-Icon\-Text} (Icon\-Text it, bool update)
\begin{CompactList}\small\item\em Similar to {\bf set\-Icon\-Text}{\rm (p.\,\pageref{classKToolBar_a60})}(Icon\-Text it) but allows you to disable or enable updating. \item\end{CompactList}\item 
Icon\-Text {\bf icon\-Text} () const 
\item 
void {\bf set\-Icon\-Size} (int size)
\begin{CompactList}\small\item\em Set the icon size to load. \item\end{CompactList}\item 
void {\bf set\-Icon\-Size} (int size, bool update)
\begin{CompactList}\small\item\em Same as {\bf set\-Icon\-Text}{\rm (p.\,\pageref{classKToolBar_a60})}(int size) but allows you to disable the toolbar update. \item\end{CompactList}\item 
int {\bf icon\-Size} () const 
\item 
void {\bf set\-Enable\-Context\-Menu} (bool enable=true)
\begin{CompactList}\small\item\em This allows you to enable or disable the context menu. \item\end{CompactList}\item 
bool {\bf context\-Menu\-Enabled} () const 
\begin{CompactList}\small\item\em Returns whether or not the context menu is disabled. \item\end{CompactList}\item 
void {\bf set\-Item\-No\-Style} (int id, bool no\_\-style=true)
\begin{CompactList}\small\item\em This will inform a toolbar button to ignore certain style changes. \item\end{CompactList}\item 
void {\bf set\-Flat} (bool flag)\label{classKToolBar_a69}

\item 
int {\bf count} () const 
\item 
void {\bf save\-State} ()
\begin{CompactList}\small\item\em 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). \item\end{CompactList}\item 
void {\bf save\-Settings} ({\bf KConfig} $\ast$config, const  {\bf QString} \&config\-Group)
\begin{CompactList}\small\item\em Save the toolbar settings to group {\tt config\-Group} in {\tt config}. \item\end{CompactList}\item 
void {\bf apply\-Settings} ({\bf KConfig} $\ast$config, const  {\bf QString} \&config\-Group)
\begin{CompactList}\small\item\em Read the toolbar settings from group {\tt config\-Group} in {\tt config} and apply them. \item\end{CompactList}\item 
void {\bf set\-XMLGUIClient} ({\bf KXMLGUIClient} $\ast$client)
\begin{CompactList}\small\item\em Tell the toolbar what XML-GUI resource file it should use to save it's state. \item\end{CompactList}\item 
void {\bf set\-Text} (const  {\bf QString} \&txt)
\begin{CompactList}\small\item\em Assign a (translated) text to this toolbar. \item\end{CompactList}\item 
{\bf QString} {\bf text} () const 
\item 
void {\bf set\-Stretchable\-Widget} ({\bf QWidget} $\ast$w)\label{classKToolBar_a77}

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

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

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

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

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

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

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

\item 
void {\bf update\-Rects} (bool=FALSE)\label{classKToolBar_a85}

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

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

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

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
bool {\bf highlight\-Setting} ()
\item 
bool {\bf transparent\-Setting} ()
\item 
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{Detailed Description}
A KDE-style toolbar. Floatable toolbar with auto resize. 

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

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[Version:]\begin{Desc}
\item[Id]{\bf ktoolbar.h}{\rm (p.\,\pageref{ktoolbar_8h})},v 1.153.2.1 2002/12/09 23:28:37 faure Exp \end{Desc}
\end{Desc}
\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 101 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. 

{\bf This class or method is obsolete, it is provided for compatibility only.} 

Definition at line 117 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 121 of file ktoolbar.h.

Referenced by bar\-Pos().

\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} = 0, bool {\em honor\_\-style} = FALSE, bool {\em read\-Config} = TRUE)}\label{classKToolBar_a0}


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 \_\-honor\_\-mode 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 170 of file ktoolbar.cpp.

References KStd\-Accel::name().\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} = false, const char $\ast$ {\em name} = 0, bool {\em honor\_\-style} = FALSE, bool {\em read\-Config} = 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 \_\-honor\_\-mode 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 179 of file ktoolbar.cpp.

References KStd\-Accel::name().\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} = false, const char $\ast$ {\em name} = 0, bool {\em honor\_\-style} = FALSE, bool {\em read\-Config} = 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 \_\-honor\_\-mode 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 187 of file ktoolbar.cpp.

References KStd\-Accel::name().

\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} = true, const {\bf QString} \& {\em text} = QString::null, int {\em index} = -1, {\bf KInstance} $\ast$ {\em \_\-instance} = {\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).\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The item index. \end{Desc}


Definition at line 229 of file ktoolbar.cpp.

Referenced by KTool\-Bar\-Popup\-Action::plug(), KAction\-Menu::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} = true, const {\bf QString} \& {\em text} = QString::null, int {\em index} = -1, {\bf KInstance} $\ast$ {\em \_\-instance} = {\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 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 241 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} = true, const {\bf QString} \& {\em text} = QString::null, int {\em index} = -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 254 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} = true, const {\bf QString} \& {\em text} = QString::null, int {\em index} = -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 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 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 265 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} = -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 279 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} = -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 291 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} = true, const {\bf QString} \& {\em tool\-Tip\-Text} = QString::null, int {\em size} = 70, int {\em index} = -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 303 of file ktoolbar.cpp.

References QTool\-Tip::add(), QString::is\-Empty(), and QLine\-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} = true, const {\bf QString} \& {\em tooltiptext} = QString::null, int {\em size} = 70, int {\em index} = -1, QCombo\-Box::Policy {\em policy} = QCombo\-Box::At\-Bottom)}\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 322 of file ktoolbar.cpp.

References QTool\-Tip::add(), QCombo\-Box::insert\-String\-List(), QString::is\-Empty(), QString::is\-Null(), 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 recevier}, const char $\ast$ {\em slot}, bool {\em enabled} = true, const {\bf QString} \& {\em tooltiptext} = QString::null, int {\em size} = 70, int {\em index} = -1, QCombo\-Box::Policy {\em policy} = QCombo\-Box::At\-Bottom)}\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 348 of file ktoolbar.cpp.

References QTool\-Tip::add(), QCombo\-Box::insert\-Item(), QString::is\-Empty(), QString::is\-Null(), 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} = -1, int {\em id} = -1)}\label{classKToolBar_a13}


Inserts a separator into the toolbar with the given id. 

Returns the separator's index 

Definition at line 370 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} = -1, int {\em id} = -1)}\label{classKToolBar_a14}


Inserts a line separator into the toolbar with the given id. 

Returns the separator's index 

Definition at line 377 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} = -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 385 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} = -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 392 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 given animated widget, 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 404 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), and QObject::inherits().\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 430 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().\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 440 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().\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 461 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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 450 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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 471 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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} = 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 normal a button with connection (or use signals from toolbar): \small\begin{alltt}
 bar-$>$insertButton(icon, id, SIGNAL(clicked ()), this,
                   SLOT (slotClick()), true, "click or wait for popup");
 \end{alltt}\normalsize 
 And then add a delayed popup: \small\begin{alltt}
 bar-$>$setDelayedPopup (id, historyPopup); \end{alltt}\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 482 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), and KTool\-Bar\-Button::set\-Delayed\-Popup().

Referenced by KTool\-Bar\-Popup\-Action::plug(), and KAction\-Menu::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} = 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 493 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().\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} = true)}\label{classKToolBar_a25}


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



Definition at line 504 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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 515 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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 526 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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}


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


Definition at line 537 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().\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 547 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), and QLine\-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 a line editor text. 



Definition at line 558 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), and 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 568 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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 578 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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 589 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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 600 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), and QCombo\-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} = -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 611 of file ktoolbar.cpp.

References QCombo\-Box::change\-Item(), QMap::end(), and QMap::find().\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 622 of file ktoolbar.cpp.

References QCombo\-Box::clear(), QMap::end(), and QMap::find().\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} = -1) const}\label{classKToolBar_a37}


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

{\tt index} = -1 refers to current item. 

Definition at line 633 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), and 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. 

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

Definition at line 643 of file ktoolbar.cpp.

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

Referenced by KSelect\-Action::plug().\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. 

Example: \small\begin{alltt}
 {\bf KLineEdit}{\rm (p.\,\pageref{classKLineEdit})} * lined = toolbar-$>$getKTollBarLined(lined\_id);
 \end{alltt}\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 652 of file ktoolbar.cpp.

References QMap::end(), and QMap::find().\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: \small\begin{alltt}
 {\bf KToolBarButton}{\rm (p.\,\pageref{classKToolBarButton})} * button = toolbar-$>$getButton(button\_id);
 \end{alltt}\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 661 of file ktoolbar.cpp.

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

Referenced by KTool\-Bar\-Radio\-Group::add\-Button(), KTool\-Bar\-Popup\-Action::plug(), KAction\-Menu::plug(), and KAction::plug().\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} = 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 670 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 an inserted widget. 

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 682 of file ktoolbar.cpp.

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

Referenced by hide\-Item(), set\-Item\-Auto\-Sized(), 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} = 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 689 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 697 of file ktoolbar.cpp.

References QMap::clear(), QMap$<$ QWidget $\ast$, int $>$::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 705 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), QMap$<$ QWidget $\ast$, int $>$::remove(), QMap::remove(), and QPtr\-List$<$ QWidget $>$::remove\-Ref().

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


Hide item. 



Definition at line 721 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_a47}


Show item. 



Definition at line 729 of file ktoolbar.cpp.

References get\-Widget(), and QWidget::show().\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} = true)}\label{classKToolBar_a48}


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_a56})}() or {\bf set\-Max\-Height}{\rm (p.\,\pageref{classKToolBar_a54})}().

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

Definition at line 737 of file ktoolbar.cpp.\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_a49}


\begin{Desc}
\item[Returns:]{\tt true} if the full-size mode is enabled. Otherwise it returns . \end{Desc}


Definition at line 744 of file ktoolbar.cpp.\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} = true)}\label{classKToolBar_a50}


{\bf This class or method is obsolete, it is provided for compatibility only.} use set\-Moving\-Enabled(bool) instead. 

Enable or disable moving of toolbar. 

Definition at line 750 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_a51}


Set position of toolbar. 

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


Definition at line 756 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 KTool\-Bar::Bar\-Position} KTool\-Bar::bar\-Pos () const}\label{classKToolBar_a52}


Returns position of toolbar. 



Definition at line 764 of file ktoolbar.cpp.

References Bar\-Position, and QTool\-Bar::main\-Window().

Referenced by KMain\-Window::size\-For\-Central\-Widget\-Size().\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_a53}


{\bf This class or method is obsolete, it is provided for compatibility only.} 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}


Definition at line 779 of file ktoolbar.cpp.

References KIO::stat().\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_a54}


{\bf This class or method is obsolete, it is provided for compatibility only.} Use set\-Maximum\-Height() instead. 



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


{\bf This class or method is obsolete, it is provided for compatibility only.} Use maximum\-Height() instead. 

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

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


{\bf This class or method is obsolete, it is provided for compatibility only.} Use set\-Maximum\-Width() instead. 

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

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


{\bf This class or method is obsolete, it is provided for compatibility only.} Use maximum\-Width() instead. 

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

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


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 arrrrrrgh})}\label{classKToolBar_a59}


{\bf This class or method is obsolete, it is provided for compatibility only.} Use {\bf enable\-Moving()}{\rm (p.\,\pageref{classKToolBar_a50})} instead. 



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


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.\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_a61}


Similar to {\bf set\-Icon\-Text}{\rm (p.\,\pageref{classKToolBar_a60})}(Icon\-Text it) 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}KTool\-Bar::Icon\-Text KTool\-Bar::icon\-Text () const}\label{classKToolBar_a62}


\begin{Desc}
\item[Returns:]The current text style for buttons. \end{Desc}


Definition at line 858 of file ktoolbar.cpp.\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_a63}


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 864 of file ktoolbar.cpp.\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_a64}


Same as {\bf set\-Icon\-Text}{\rm (p.\,\pageref{classKToolBar_a60})}(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 869 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_a65}


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


Definition at line 895 of file ktoolbar.cpp.

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

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} = true)}\label{classKToolBar_a66}


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 908 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_a67}


Returns whether or not the context menu is disabled. 

\begin{Desc}
\item[Returns:]The context menu state \end{Desc}


Definition at line 914 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} = true)}\label{classKToolBar_a68}


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 920 of file ktoolbar.cpp.

References QMap::end(), QMap::find(), 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_a70}


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


Definition at line 945 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_a71}


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 951 of file ktoolbar.cpp.

References QDom\-Element::attribute(), KGlobal::config(), QDom\-Document::document\-Element(), KStd\-Accel::name(), KXMLGUIFactory::remove\-DOMComments(), save\-Settings(), QDom\-Document::set\-Content(), KConfig\-Base::sync(), and QDom\-Element::tag\-Name().

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


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



Definition at line 1034 of file ktoolbar.cpp.

References icon\-Size(), QString::is\-Empty(), and KConfig\-Base::write\-Entry().

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})}\label{classKToolBar_a73}


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



Definition at line 1515 of file ktoolbar.cpp.

References KConfig\-Base::has\-Group(), QString::is\-Empty(), QString::lower(), QTool\-Bar::main\-Window(), QMain\-Window::move\-Dock\-Window(), KConfig\-Base::read\-Bool\-Entry(), KConfig\-Base::read\-Entry(), KConfig\-Base::read\-Num\-Entry(), and KGlobal::static\-QString().

Referenced by KMain\-Window::apply\-Main\-Window\-Settings().\index{KToolBar@{KTool\-Bar}!setXMLGUIClient@{setXMLGUIClient}}
\index{setXMLGUIClient@{setXMLGUIClient}!KToolBar@{KTool\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar::set\-XMLGUIClient ({\bf KXMLGUIClient} $\ast$ {\em client})}\label{classKToolBar_a74}


Tell the toolbar what XML-GUI resource file it should use to save it's state. 

The state of the toolbar (position, size, etc) is saved in {\bf KConfig} files if the application does not use XML-GUI.. but if the app does, then it's saved the XML file. This function allows this to happen.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xmlfile}]The XML-GUI resource file to write to \item[{\em xml}]The DOM document for the XML-GUI building \end{description}
\end{Desc}


Definition at line 1062 of file ktoolbar.cpp.

Referenced by KXMLGUIBuilder::create\-Container().\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_a75}


Assign a (translated) text to this toolbar. 

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

Definition at line 1067 of file ktoolbar.cpp.

References QTool\-Bar::set\-Label().\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_a76}


\begin{Desc}
\item[Returns:]the toolbar's text. \end{Desc}


Definition at line 1073 of file ktoolbar.cpp.

References QTool\-Bar::label().\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 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 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}!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}
\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}


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


Definition at line 1378 of file ktoolbar.cpp.

References KGlobal::config(), QString::from\-Latin1(), and KConfig\-Base::read\-Bool\-Entry().\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}


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


Definition at line 1386 of file ktoolbar.cpp.

References KGlobal::config(), QString::from\-Latin1(), and KConfig\-Base::read\-Bool\-Entry().\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}


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


Definition at line 1394 of file ktoolbar.cpp.

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

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