\section{KAction\-Collection Class Reference}
\label{classKActionCollection}\index{KActionCollection@{KActionCollection}}
A managed set of {\bf KAction}{\rm (p.\,\pageref{classKAction})} objects.  


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

Inheritance diagram for KAction\-Collection:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=68pt]{classKActionCollection__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAction\-Collection:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=68pt]{classKActionCollection__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf clear} ()
\begin{CompactList}\small\item\em Clears the entire action\-Collection, deleting all actions. \item\end{CompactList}\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf inserted} ({\bf KAction} $\ast$)\label{classKActionCollection_l0}

\item 
void {\bf removed} ({\bf KAction} $\ast$)\label{classKActionCollection_l1}

\item 
void {\bf action\-Highlighted} ({\bf KAction} $\ast$action)\label{classKActionCollection_l2}

\item 
void {\bf action\-Highlighted} ({\bf KAction} $\ast$action, bool highlight)\label{classKActionCollection_l3}

\item 
void {\bf action\-Status\-Text} (const  {\bf QString} \&text)\label{classKActionCollection_l4}

\item 
void {\bf clear\-Status\-Text} ()\label{classKActionCollection_l5}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KAction\-Collection} ({\bf QWidget} $\ast${\bf parent}, const  char $\ast${\bf name}=0, {\bf KInstance} $\ast$instance=0)\label{classKActionCollection_a0}

\item 
{\bf KAction\-Collection} ({\bf QWidget} $\ast$watch, {\bf QObject} $\ast${\bf parent}, const  char $\ast${\bf name}=0, {\bf KInstance} $\ast$instance=0)
\begin{CompactList}\small\item\em Use this constructor if you want the collection's actions to restrict their accelerator keys to {\tt watch} rather than the {\tt parent}. \item\end{CompactList}\item 
{\bf KAction\-Collection} (const  {\bf KAction\-Collection} \&copy)\label{classKActionCollection_a2}

\item 
virtual void {\bf set\-Widget} ({\bf QWidget} $\ast$widget)
\begin{CompactList}\small\item\em This sets the widget to which the keyboard shortcuts should be attached. \item\end{CompactList}\item 
void {\bf set\-Auto\-Connect\-Shortcuts} (bool)
\begin{CompactList}\small\item\em This indicates whether new actions which are created in this collection should have their keyboard shortcuts automatically connected on construction. \item\end{CompactList}\item 
bool {\bf is\-Auto\-Connect\-Shortcuts} ()\label{classKActionCollection_a6}

\item 
bool {\bf add\-Doc\-Collection} ({\bf KAction\-Collection} $\ast$p\-Doc)
\begin{CompactList}\small\item\em Doc/View model. \item\end{CompactList}\item 
virtual {\bf KAccel} $\ast$ {\bf accel} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Deprecated because of ambiguous name. \item\end{CompactList}\item 
virtual const  {\bf KAccel} $\ast$ {\bf accel} () const \label{classKActionCollection_a9}

\item 
{\bf KAccel} $\ast$ {\bf kaccel} ()
\begin{CompactList}\small\item\em Returns the {\bf KAccel} object of the most recently set widget. \item\end{CompactList}\item 
const  {\bf KAccel} $\ast$ {\bf kaccel} () const \label{classKActionCollection_a11}

\item 
{\bf KAccel} $\ast$ {\bf builder\-KAccel} () const \label{classKActionCollection_a12}

\item 
virtual uint {\bf count} () const 
\begin{CompactList}\small\item\em Returns the {\bf KAccel} object associated with widget \#. \item\end{CompactList}\item 
bool {\bf is\-Empty} () const \label{classKActionCollection_a14}

\item 
virtual {\bf KAction} $\ast$ {\bf action} (int index) const \label{classKActionCollection_a15}

\item 
virtual {\bf KAction} $\ast$ {\bf action} (const  char $\ast${\bf name}, const  char $\ast$classname=0) const \label{classKActionCollection_a16}

\item 
virtual {\bf QString\-List} {\bf groups} () const \label{classKActionCollection_a17}

\item 
virtual {\bf KAction\-Ptr\-List} {\bf actions} (const  {\bf QString} \&group) const \label{classKActionCollection_a18}

\item 
virtual {\bf KAction\-Ptr\-List} {\bf actions} () const \label{classKActionCollection_a19}

\item 
bool {\bf read\-Shortcut\-Settings} (const  {\bf QString} \&s\-Config\-Group=QString::null, {\bf KConfig\-Base} $\ast$p\-Config=0)
\begin{CompactList}\small\item\em Used for reading shortcut configuration from a non-XML rc file. \item\end{CompactList}\item 
bool {\bf write\-Shortcut\-Settings} (const  {\bf QString} \&s\-Config\-Group=QString::null, {\bf KConfig\-Base} $\ast$p\-Config=0) const 
\begin{CompactList}\small\item\em Used for writing shortcut configuration to a non-XML rc file. \item\end{CompactList}\item 
void {\bf set\-Instance} ({\bf KInstance} $\ast$instance)\label{classKActionCollection_a22}

\item 
{\bf KInstance} $\ast$ {\bf instance} () const \label{classKActionCollection_a23}

\item 
void {\bf set\-XMLFile} (const  {\bf QString} \&)
\begin{CompactList}\small\item\em Use this to tell the KAction\-Collection what rc file its configuration is stored in. \item\end{CompactList}\item 
const  {\bf QString} \& {\bf xml\-File} () const \label{classKActionCollection_a25}

\item 
void {\bf set\-Highlighting\-Enabled} (bool enable)\label{classKActionCollection_a26}

\item 
bool {\bf highlighting\-Enabled} () const \label{classKActionCollection_a27}

\item 
void {\bf connect\-Highlight} ({\bf QWidget} $\ast$container, {\bf KAction} $\ast$action)\label{classKActionCollection_a28}

\item 
void {\bf disconnect\-Highlight} ({\bf QWidget} $\ast$container, {\bf KAction} $\ast$action)\label{classKActionCollection_a29}

\item 
{\bf KAction\-Collection} ({\bf QObject} $\ast${\bf parent}, const  char $\ast${\bf name}=0, {\bf KInstance} $\ast$instance=0)\label{classKActionCollection_a30}

\item 
void {\bf insert} ({\bf KAction} $\ast$)\label{classKActionCollection_a31}

\item 
void {\bf remove} ({\bf KAction} $\ast$)\label{classKActionCollection_a32}

\item 
{\bf KAction} $\ast$ {\bf take} ({\bf KAction} $\ast$)\label{classKActionCollection_a33}

\item 
{\bf KAction\-Collection} {\bf operator+} (const  {\bf KAction\-Collection} \&) const \label{classKActionCollection_a34}

\item 
{\bf KAction\-Collection} \& {\bf operator=} (const  {\bf KAction\-Collection} \&)\label{classKActionCollection_a35}

\item 
{\bf KAction\-Collection} \& {\bf operator+=} (const  {\bf KAction\-Collection} \&)\label{classKActionCollection_a36}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKActionCollection_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KAction}\label{classKActionCollection_n0}

\item 
class {\bf KXMLGUIClient}\label{classKActionCollection_n1}

\end{CompactItemize}


\subsection{Detailed Description}
A managed set of {\bf KAction}{\rm (p.\,\pageref{classKAction})} objects. 



Definition at line 1761 of file kaction.h.

\subsection{Constructor \& Destructor Documentation}
\index{KActionCollection@{KAction\-Collection}!KActionCollection@{KActionCollection}}
\index{KActionCollection@{KActionCollection}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAction\-Collection::KAction\-Collection ({\bf QWidget} $\ast$ {\em watch}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0, {\bf KInstance} $\ast$ {\em instance} = 0)}\label{classKActionCollection_a1}


Use this constructor if you want the collection's actions to restrict their accelerator keys to {\tt watch} rather than the {\tt parent}. 

If you don't require shortcuts, you can pass a null to the {\tt watch} parameter. 

Definition at line 3103 of file kaction.cpp.

References KStd\-Accel::name(), and set\-Widget().

\subsection{Member Function Documentation}
\index{KActionCollection@{KAction\-Collection}!setWidget@{setWidget}}
\index{setWidget@{setWidget}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAction\-Collection::set\-Widget ({\bf QWidget} $\ast$ {\em widget})\hspace{0.3cm}{\tt  [virtual]}}\label{classKActionCollection_a4}


This sets the widget to which the keyboard shortcuts should be attached. 

You only need to call this if a null pointer was passed in the constructor. 

Definition at line 3153 of file kaction.cpp.

Referenced by KAction\-Collection(), and KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget().\index{KActionCollection@{KAction\-Collection}!setAutoConnectShortcuts@{setAutoConnectShortcuts}}
\index{setAutoConnectShortcuts@{setAutoConnectShortcuts}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAction\-Collection::set\-Auto\-Connect\-Shortcuts (bool)}\label{classKActionCollection_a5}


This indicates whether new actions which are created in this collection should have their keyboard shortcuts automatically connected on construction. 

Set to 'false' if you will be loading XML-based settings. This is automatically done by KParts. The default is 'true'. 

Definition at line 3168 of file kaction.cpp.\index{KActionCollection@{KAction\-Collection}!addDocCollection@{addDocCollection}}
\index{addDocCollection@{addDocCollection}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAction\-Collection::add\-Doc\-Collection ({\bf KAction\-Collection} $\ast$ {\em p\-Doc})}\label{classKActionCollection_a7}


Doc/View model. 

This lets you add the action collection of a document to a view's action collection. 

Definition at line 3178 of file kaction.cpp.\index{KActionCollection@{KAction\-Collection}!accel@{accel}}
\index{accel@{accel}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAccel} $\ast$ KAction\-Collection::accel ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKActionCollection_a8}


{\bf This class or method is obsolete, it is provided for compatibility only.} Deprecated because of ambiguous name. 

Use {\bf kaccel()}{\rm (p.\,\pageref{classKActionCollection_a10})} 

Definition at line 3367 of file kaction.cpp.

References kaccel().\index{KActionCollection@{KAction\-Collection}!kaccel@{kaccel}}
\index{kaccel@{kaccel}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAccel} $\ast$ KAction\-Collection::kaccel ()}\label{classKActionCollection_a10}


Returns the {\bf KAccel} object of the most recently set widget. 



Definition at line 3283 of file kaction.cpp.

Referenced by accel().\index{KActionCollection@{KAction\-Collection}!count@{count}}
\index{count@{count}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KAction\-Collection::count () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKActionCollection_a13}


Returns the {\bf KAccel} object associated with widget \#. 



Definition at line 3416 of file kaction.cpp.\index{KActionCollection@{KAction\-Collection}!readShortcutSettings@{readShortcutSettings}}
\index{readShortcutSettings@{readShortcutSettings}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAction\-Collection::read\-Shortcut\-Settings (const {\bf QString} \& {\em s\-Config\-Group} = QString::null, {\bf KConfig\-Base} $\ast$ {\em p\-Config} = 0)}\label{classKActionCollection_a20}


Used for reading shortcut configuration from a non-XML rc file. 



Definition at line 3406 of file kaction.cpp.\index{KActionCollection@{KAction\-Collection}!writeShortcutSettings@{writeShortcutSettings}}
\index{writeShortcutSettings@{writeShortcutSettings}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAction\-Collection::write\-Shortcut\-Settings (const {\bf QString} \& {\em s\-Config\-Group} = QString::null, {\bf KConfig\-Base} $\ast$ {\em p\-Config} = 0) const}\label{classKActionCollection_a21}


Used for writing shortcut configuration to a non-XML rc file. 



Definition at line 3411 of file kaction.cpp.\index{KActionCollection@{KAction\-Collection}!setXMLFile@{setXMLFile}}
\index{setXMLFile@{setXMLFile}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAction\-Collection::set\-XMLFile (const {\bf QString} \&)}\label{classKActionCollection_a24}


Use this to tell the KAction\-Collection what rc file its configuration is stored in. 



Definition at line 3471 of file kaction.cpp.

Referenced by KXMLGUIClient::set\-XMLFile().\index{KActionCollection@{KAction\-Collection}!clear@{clear}}
\index{clear@{clear}!KActionCollection@{KAction\-Collection}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAction\-Collection::clear ()\hspace{0.3cm}{\tt  [slot]}}\label{classKActionCollection_i0}


Clears the entire action\-Collection, deleting all actions. 

\begin{Desc}
\item[See also:]\#remove \end{Desc}


Definition at line 3366 of file kaction.cpp.

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