\section{KAccel Class Reference}
\label{classKAccel}\index{KAccel@{KAccel}}
Handle shortcuts. Configurable shortcut support for widgets.  


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

Inheritance diagram for KAccel:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=42pt]{classKAccel__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAccel:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=42pt]{classKAccel__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf keycode\-Changed} ()
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KAccel} ({\bf QWidget} $\ast$p\-Parent, const char $\ast$ps\-Name=0)
\item 
{\bf KAccel} ({\bf QWidget} $\ast$watch, {\bf QObject} $\ast$parent, const char $\ast$ps\-Name=0)
\item 
KAccel\-Actions \& {\bf actions} ()\label{classKAccel_a3}

\item 
const KAccel\-Actions \& {\bf actions} () const \label{classKAccel_a4}

\item 
bool {\bf is\-Enabled} ()
\item 
void {\bf set\-Enabled} (bool b\-Enabled)
\item 
bool {\bf set\-Auto\-Update} (bool b\-Auto)
\item 
KAccel\-Action $\ast$ {\bf insert} (const {\bf QString} \&s\-Action, const {\bf QString} \&s\-Label, const {\bf QString} \&s\-Whats\-This, const {\bf KShortcut} \&cut\-Def, const {\bf QObject} $\ast$p\-Obj\-Slot, const char $\ast$ps\-Method\-Slot, bool b\-Configurable=true, bool b\-Enabled=true)
\item 
KAccel\-Action $\ast$ {\bf insert} (const {\bf QString} \&s\-Action, const {\bf QString} \&s\-Label, const {\bf QString} \&s\-Whats\-This, const {\bf KShortcut} \&cut\-Def3, const {\bf KShortcut} \&cut\-Def4, const {\bf QObject} $\ast$p\-Obj\-Slot, const char $\ast$ps\-Method\-Slot, bool b\-Configurable=true, bool b\-Enabled=true)
\item 
KAccel\-Action $\ast$ {\bf insert} (const char $\ast$ps\-Action, const {\bf KShortcut} \&cut\-Def, const {\bf QObject} $\ast$p\-Obj\-Slot, const char $\ast$ps\-Method\-Slot, bool b\-Configurable=true, bool b\-Enabled=true)
\item 
KAccel\-Action $\ast$ {\bf insert} ({\bf KStd\-Accel::Std\-Accel} id, const {\bf QObject} $\ast$p\-Obj\-Slot, const char $\ast$ps\-Method\-Slot, bool b\-Configurable=true, bool b\-Enabled=true)
\item 
bool {\bf remove} (const {\bf QString} \&s\-Action)
\item 
bool {\bf update\-Connections} ()
\item 
const {\bf KShortcut} \& {\bf shortcut} (const {\bf QString} \&s\-Action) const 
\item 
bool {\bf set\-Shortcut} (const {\bf QString} \&s\-Action, const {\bf KShortcut} \&shortcut)
\item 
bool {\bf set\-Slot} (const {\bf QString} \&s\-Action, const {\bf QObject} $\ast$p\-Obj\-Slot, const char $\ast$ps\-Method\-Slot)
\item 
bool {\bf set\-Enabled} (const {\bf QString} \&s\-Action, bool b\-Enabled)
\item 
const {\bf QString} \& {\bf config\-Group} () const 
\item 
void {\bf set\-Config\-Group} (const {\bf QString} \&name)
\item 
bool {\bf read\-Settings} ({\bf KConfig\-Base} $\ast$p\-Config=0)
\item 
bool {\bf write\-Settings} ({\bf KConfig\-Base} $\ast$p\-Config=0) const 
\item 
void {\bf emit\-Keycode\-Changed} ()
\item 
bool {\bf insert\-Item} (const {\bf QString} \&s\-Label, const {\bf QString} \&s\-Action, const char $\ast$ps\-Key, int n\-IDMenu=0, {\bf QPopup\-Menu} $\ast$p\-Menu=0, bool b\-Configurable=true) KDE\_\-DEPRECATED
\item 
bool {\bf insert\-Item} (const {\bf QString} \&s\-Label, const {\bf QString} \&s\-Action, int {\bf key}, int n\-IDMenu=0, {\bf QPopup\-Menu} $\ast$p\-Menu=0, bool b\-Configurable=true) KDE\_\-DEPRECATED
\item 
bool {\bf insert\-Std\-Item} ({\bf KStd\-Accel::Std\-Accel} id, const {\bf QString} \&descr=QString::null) KDE\_\-DEPRECATED
\item 
bool {\bf connect\-Item} (const {\bf QString} \&s\-Action, const {\bf QObject} $\ast$p\-Obj\-Slot, const char $\ast$ps\-Method\-Slot, bool b\-Activate=true) KDE\_\-DEPRECATED
\item 
KDE\_\-DEPRECATED bool {\bf connect\-Item} ({\bf KStd\-Accel::Std\-Accel} accel, const {\bf QObject} $\ast$p\-Obj\-Slot, const char $\ast$ps\-Method\-Slot)
\item 
bool {\bf remove\-Item} (const {\bf QString} \&s\-Action) KDE\_\-DEPRECATED
\item 
bool {\bf set\-Item\-Enabled} (const {\bf QString} \&s\-Action, bool b\-Enable) KDE\_\-DEPRECATED
\item 
void {\bf change\-Menu\-Accel} ({\bf QPopup\-Menu} $\ast$menu, int id, const {\bf QString} \&action) KDE\_\-DEPRECATED
\item 
void {\bf change\-Menu\-Accel} ({\bf QPopup\-Menu} $\ast$menu, int id, {\bf KStd\-Accel::Std\-Accel} accel) KDE\_\-DEPRECATED
\item 
int {\bf current\-Key} (const {\bf QString} \&action) const KDE\_\-DEPRECATED
\item 
{\bf QString} {\bf find\-Key} (int {\bf key}) const KDE\_\-DEPRECATED
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static int {\bf string\-To\-Key} (const {\bf QString} \&) KDE\_\-DEPRECATED
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKAccel_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KAccel\-Private}\label{classKAccel_n0}

\end{CompactItemize}


\subsection{Detailed Description}
Handle shortcuts. Configurable shortcut support for widgets. 

Allow a user to configure shortcuts through application configuration files or through the {\bf KKey\-Chooser} GUI.

A KAccel contains a list of accelerator actions.

For example, CTRL+Key\_\-P could be a shortcut for printing a document. The key codes are listed in qnamespace.h. \char`\"{}Print\char`\"{} could be the action name for printing. The action name identifies the shortcut in configuration files and the {\bf KKey\-Chooser} GUI.

A KAccel object handles key events sent to its parent widget and to all children of this parent widget. The most recently created KAccel object has precedence over any KAccel objects created before it. When a shortcut pressed, KAccel calls the slot to which it has been connected. If you want to set global accelerators, independent of the window which has the focus, use {\bf KGlobal\-Accel}{\rm (p.\,\pageref{classKGlobalAccel})}.

Reconfiguration of a given shortcut can be prevented by specifying that an accelerator item is not configurable when it is inserted. A special group of non-configurable key bindings are known as the standard accelerators.

The standard accelerators appear repeatedly in applications for standard document actions such as printing and saving. A convenience method is available to insert and connect these accelerators which are configurable on a desktop-wide basis.

It is possible for a user to choose to have no key associated with an action.

The translated first argument for {\bf insert\-Item()}{\rm (p.\,\pageref{classKAccel_a23})} is used only in the configuration dialog. 

\footnotesize\begin{verbatim} KAccel* pAccel = new KAccel( this );

 // Insert an action "Scroll Up" which is associated with the "Up" key:
 pAccel->insert( "Scroll Up", i18n("Scroll up"),
                       i18n("Scroll up the current document by one line."),
                       Qt::Key_Up, this, SLOT(slotScrollUp()) );
 // Insert an standard acclerator action.
 pAccel->insert( KStdAccel::Print, this, SLOT(slotPrint()) );

 // Update the shortcuts by read any user-defined settings from the
 //  application's config file.
 pAccel->readSettings();
 *
\end{verbatim}
\normalsize


\begin{Desc}
\item[See also:]{\bf KGlobal\-Accel}{\rm (p.\,\pageref{classKGlobalAccel})} 

{\bf KAccel\-Shortcut\-List}{\rm (p.\,\pageref{classKAccelShortcutList})} 

{\bf KKey\-Chooser} 

{\bf KKey\-Dialog} \end{Desc}




Definition at line 93 of file kaccel.h.

\subsection{Constructor \& Destructor Documentation}
\index{KAccel@{KAccel}!KAccel@{KAccel}}
\index{KAccel@{KAccel}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAccel::KAccel ({\bf QWidget} $\ast$ {\em p\-Parent}, const char $\ast$ {\em ps\-Name} = {\tt 0})}\label{classKAccel_a0}


Creates a new KAccel that watches {\tt p\-Parent}, which is also the QObject's parent. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Parent}]the parent and widget to watch for key strokes \item[{\em ps\-Name}]the name of the {\bf QObject}\end{description}
\end{Desc}


Definition at line 373 of file kaccel.cpp.

References endl().\index{KAccel@{KAccel}!KAccel@{KAccel}}
\index{KAccel@{KAccel}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAccel::KAccel ({\bf QWidget} $\ast$ {\em watch}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em ps\-Name} = {\tt 0})}\label{classKAccel_a1}


Creates a new KAccel that watches {\tt watch}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em watch}]the widget to watch for key strokes \item[{\em parent}]the parent of the {\bf QObject} \item[{\em ps\-Name}]the name of the {\bf QObject}\end{description}
\end{Desc}


Definition at line 380 of file kaccel.cpp.

References endl().

\subsection{Member Function Documentation}
\index{KAccel@{KAccel}!isEnabled@{isEnabled}}
\index{isEnabled@{isEnabled}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::is\-Enabled ()}\label{classKAccel_a5}


Checks whether the KAccel is active. 

\begin{Desc}
\item[Returns:]true if the {\bf QAccel} is enabled\end{Desc}


Definition at line 397 of file kaccel.cpp.\index{KAccel@{KAccel}!setEnabled@{setEnabled}}
\index{setEnabled@{setEnabled}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAccel::set\-Enabled (bool {\em b\-Enabled})}\label{classKAccel_a6}


Enables or disables the KAccel. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em b\-Enabled}]true to enable, false to disable\end{description}
\end{Desc}


Reimplemented from {\bf QAccel}.

Definition at line 398 of file kaccel.cpp.

Referenced by set\-Item\-Enabled().\index{KAccel@{KAccel}!setAutoUpdate@{setAutoUpdate}}
\index{setAutoUpdate@{setAutoUpdate}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::set\-Auto\-Update (bool {\em b\-Auto})}\label{classKAccel_a7}


Enable auto-update of connections. 

This means that the signals are automatically disconnected when you disable an action, and re-enabled when you enable it. By default auto update is turned on. If you disable auto-update, you need to call {\bf update\-Connections()}{\rm (p.\,\pageref{classKAccel_a13})} after changing actions.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em b\-Auto}]true to enable, false to disable \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the value of the flag before this call\end{Desc}


Definition at line 399 of file kaccel.cpp.\index{KAccel@{KAccel}!insert@{insert}}
\index{insert@{insert}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAccel\-Action $\ast$ KAccel::insert (const {\bf QString} \& {\em s\-Action}, const {\bf QString} \& {\em s\-Label}, const {\bf QString} \& {\em s\-Whats\-This}, const {\bf KShortcut} \& {\em cut\-Def}, const {\bf QObject} $\ast$ {\em p\-Obj\-Slot}, const char $\ast$ {\em ps\-Method\-Slot}, bool {\em b\-Configurable} = {\tt true}, bool {\em b\-Enabled} = {\tt true})}\label{classKAccel_a8}


Create an accelerator action. 

Usage: 

\footnotesize\begin{verbatim} insert( "Do Something", i18n("Do Something"),
   i18n("This action allows you to do something really great with this program to "
        "the currently open document."),
   ALT+Key_D, this, SLOT(slotDoSomething()) );
     *
\end{verbatim}
\normalsize


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Action}]The internal name of the action. \item[{\em s\-Label}]An i18n'ized short description of the action displayed when using {\bf KKey\-Chooser} to reconfigure the shortcuts. \item[{\em s\-Whats\-This}]An extended description of the action. \item[{\em cut\-Def}]The default shortcut. \item[{\em p\-Obj\-Slot}]Pointer to the slot object. \item[{\em ps\-Method\-Slot}]Pointer to the slot method. \item[{\em b\-Configurable}]Allow the user to change this shortcut if set to 'true'. \item[{\em b\-Enabled}]The action will be activated by the shortcut if set to 'true'.\end{description}
\end{Desc}


Definition at line 401 of file kaccel.cpp.\index{KAccel@{KAccel}!insert@{insert}}
\index{insert@{insert}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAccel\-Action $\ast$ KAccel::insert (const {\bf QString} \& {\em s\-Action}, const {\bf QString} \& {\em s\-Label}, const {\bf QString} \& {\em s\-Whats\-This}, const {\bf KShortcut} \& {\em cut\-Def3}, const {\bf KShortcut} \& {\em cut\-Def4}, const {\bf QObject} $\ast$ {\em p\-Obj\-Slot}, const char $\ast$ {\em ps\-Method\-Slot}, bool {\em b\-Configurable} = {\tt true}, bool {\em b\-Enabled} = {\tt true})}\label{classKAccel_a9}


Same as first {\bf insert()}{\rm (p.\,\pageref{classKAccel_a8})}, but with separate shortcuts defined for 3- and 4- modifier defaults. 



Definition at line 412 of file kaccel.cpp.\index{KAccel@{KAccel}!insert@{insert}}
\index{insert@{insert}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAccel\-Action $\ast$ KAccel::insert (const char $\ast$ {\em ps\-Action}, const {\bf KShortcut} \& {\em cut\-Def}, const {\bf QObject} $\ast$ {\em p\-Obj\-Slot}, const char $\ast$ {\em ps\-Method\-Slot}, bool {\em b\-Configurable} = {\tt true}, bool {\em b\-Enabled} = {\tt true})}\label{classKAccel_a10}


This is an overloaded function provided for convenience. 

The advantage of this is when you want to use the same text for the name of the action as for the user-visible label.

Usage: 

\footnotesize\begin{verbatim} insert( i18n("Do Something"), ALT+Key_D, this, SLOT(slotDoSomething()) );
\end{verbatim}
\normalsize


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ps\-Action}]The name AND label of the action. \item[{\em cut\-Def}]The default shortcut for this action. \item[{\em p\-Obj\-Slot}]Pointer to the slot object. \item[{\em ps\-Method\-Slot}]Pointer to the slot method. \item[{\em b\-Configurable}]Allow the user to change this shortcut if set to 'true'. \item[{\em b\-Enabled}]The action will be activated by the shortcut if set to 'true'.\end{description}
\end{Desc}


Definition at line 423 of file kaccel.cpp.\index{KAccel@{KAccel}!insert@{insert}}
\index{insert@{insert}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAccel\-Action $\ast$ KAccel::insert ({\bf KStd\-Accel::Std\-Accel} {\em id}, const {\bf QObject} $\ast$ {\em p\-Obj\-Slot}, const char $\ast$ {\em ps\-Method\-Slot}, bool {\em b\-Configurable} = {\tt true}, bool {\em b\-Enabled} = {\tt true})}\label{classKAccel_a11}


Similar to the first {\bf insert()}{\rm (p.\,\pageref{classKAccel_a8})} method, but with the action name, short description, help text, and default shortcuts all set according to one of the standard accelerators. 

\begin{Desc}
\item[See also:]{\bf KStd\-Accel}{\rm (p.\,\pageref{namespaceKStdAccel})}.\end{Desc}


Definition at line 433 of file kaccel.cpp.

References QString::insert(), QString::is\-Empty(), and KStd\-Accel::name().\index{KAccel@{KAccel}!remove@{remove}}
\index{remove@{remove}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::remove (const {\bf QString} \& {\em s\-Action})}\label{classKAccel_a12}


Removes the accelerator action identified by the name. 

Remember to also call {\bf update\-Connections()}{\rm (p.\,\pageref{classKAccel_a13})}. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Action}]the name of the action to remove \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 451 of file kaccel.cpp.\index{KAccel@{KAccel}!updateConnections@{updateConnections}}
\index{updateConnections@{updateConnections}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::update\-Connections ()}\label{classKAccel_a13}


Updates the connections of the accelerations after changing them. 

This is only necessary if you have disabled auto updates which are on by default. \begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Auto\-Update()}{\rm (p.\,\pageref{classKAccel_a7})} 

get\-Auto\-Update()\end{Desc}


Definition at line 453 of file kaccel.cpp.\index{KAccel@{KAccel}!shortcut@{shortcut}}
\index{shortcut@{shortcut}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KShortcut} \& KAccel::shortcut (const {\bf QString} \& {\em s\-Action}) const}\label{classKAccel_a14}


Return the shortcut associated with the action named by {\tt s\-Action}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Action}]the name of the action \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the action's shortcut, or a null shortcut if not found\end{Desc}


Definition at line 456 of file kaccel.cpp.

References KShortcut::null().\index{KAccel@{KAccel}!setShortcut@{setShortcut}}
\index{setShortcut@{setShortcut}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::set\-Shortcut (const {\bf QString} \& {\em s\-Action}, const {\bf KShortcut} \& {\em shortcut})}\label{classKAccel_a15}


Set the shortcut to be associated with the action named by {\tt s\-Action}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Action}]the name of the action \item[{\em shortcut}]the shortcut to set \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 468 of file kaccel.cpp.

References endl().\index{KAccel@{KAccel}!setSlot@{setSlot}}
\index{setSlot@{setSlot}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::set\-Slot (const {\bf QString} \& {\em s\-Action}, const {\bf QObject} $\ast$ {\em p\-Obj\-Slot}, const char $\ast$ {\em ps\-Method\-Slot})}\label{classKAccel_a16}


Set the slot to be called when the shortcut of the action named by {\tt s\-Action} is pressed. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Action}]the name of the action \item[{\em p\-Obj\-Slot}]the owner of the slot \item[{\em ps\-Method\-Slot}]the name of the slot \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 462 of file kaccel.cpp.

Referenced by connect\-Item().\index{KAccel@{KAccel}!setEnabled@{setEnabled}}
\index{setEnabled@{setEnabled}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::set\-Enabled (const {\bf QString} \& {\em s\-Action}, bool {\em b\-Enabled})}\label{classKAccel_a17}


Enable or disable the action named by {\tt s\-Action}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Action}]the action to en-/disable \item[{\em b\-Enabled}]true to enable, false to disable \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 465 of file kaccel.cpp.\index{KAccel@{KAccel}!configGroup@{configGroup}}
\index{configGroup@{configGroup}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QString} \& KAccel::config\-Group () const}\label{classKAccel_a18}


Returns the configuration group of the settings. 

\begin{Desc}
\item[Returns:]the configuration group \end{Desc}
\begin{Desc}
\item[See also:]{\bf KConfig}{\rm (p.\,\pageref{classKConfig})}\end{Desc}


Definition at line 480 of file kaccel.cpp.\index{KAccel@{KAccel}!setConfigGroup@{setConfigGroup}}
\index{setConfigGroup@{setConfigGroup}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAccel::set\-Config\-Group (const {\bf QString} \& {\em name})}\label{classKAccel_a19}


Returns the configuration group of the settings. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the new configuration group \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf KConfig}{\rm (p.\,\pageref{classKConfig})}\end{Desc}


Definition at line 483 of file kaccel.cpp.\index{KAccel@{KAccel}!readSettings@{readSettings}}
\index{readSettings@{readSettings}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::read\-Settings ({\bf KConfig\-Base} $\ast$ {\em p\-Config} = {\tt 0})}\label{classKAccel_a20}


Read all shortcuts from {\tt p\-Config}, or (if {\tt p\-Config} is zero) from the application's configuration file {\bf KGlobal::config()}{\rm (p.\,\pageref{classKGlobal_e2})}. 

The group in which the configuration is stored can be set with {\bf set\-Config\-Group()}{\rm (p.\,\pageref{classKAccel_a19})}. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Config}]the configuration file, or 0 for the application configuration file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 486 of file kaccel.cpp.\index{KAccel@{KAccel}!writeSettings@{writeSettings}}
\index{writeSettings@{writeSettings}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::write\-Settings ({\bf KConfig\-Base} $\ast$ {\em p\-Config} = {\tt 0}) const}\label{classKAccel_a21}


Write the current shortcuts to {\tt p\-Config}, or (if {\tt p\-Config} is zero) to the application's configuration file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Config}]the configuration file, or 0 for the application configuration file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 492 of file kaccel.cpp.\index{KAccel@{KAccel}!emitKeycodeChanged@{emitKeycodeChanged}}
\index{emitKeycodeChanged@{emitKeycodeChanged}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAccel::emit\-Keycode\-Changed ()}\label{classKAccel_a22}


Emits the {\bf keycode\-Changed()}{\rm (p.\,\pageref{classKAccel_l0})} signal. 



Definition at line 495 of file kaccel.cpp.

References endl(), and keycode\-Changed().\index{KAccel@{KAccel}!keycodeChanged@{keycodeChanged}}
\index{keycodeChanged@{keycodeChanged}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAccel::keycode\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKAccel_l0}


Emitted when one of the key codes has changed. 



Referenced by emit\-Keycode\-Changed().\index{KAccel@{KAccel}!insertItem@{insertItem}}
\index{insertItem@{insertItem}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::insert\-Item (const {\bf QString} \& {\em s\-Label}, const {\bf QString} \& {\em s\-Action}, const char $\ast$ {\em ps\-Key}, int {\em n\-IDMenu} = {\tt 0}, {\bf QPopup\-Menu} $\ast$ {\em p\-Menu} = {\tt 0}, bool {\em b\-Configurable} = {\tt true})}\label{classKAccel_a23}


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


Definition at line 506 of file kaccel.cpp.\index{KAccel@{KAccel}!insertItem@{insertItem}}
\index{insertItem@{insertItem}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::insert\-Item (const {\bf QString} \& {\em s\-Label}, const {\bf QString} \& {\em s\-Action}, int {\em key}, int {\em n\-IDMenu} = {\tt 0}, {\bf QPopup\-Menu} $\ast$ {\em p\-Menu} = {\tt 0}, bool {\em b\-Configurable} = {\tt true})}\label{classKAccel_a24}


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


Definition at line 518 of file kaccel.cpp.\index{KAccel@{KAccel}!insertStdItem@{insertStdItem}}
\index{insertStdItem@{insertStdItem}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::insert\-Std\-Item ({\bf KStd\-Accel::Std\-Accel} {\em id}, const {\bf QString} \& {\em descr} = {\tt QString::null})}\label{classKAccel_a25}


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


Definition at line 532 of file kaccel.cpp.

References KAction::set\-Shortcut().\index{KAccel@{KAccel}!connectItem@{connectItem}}
\index{connectItem@{connectItem}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::connect\-Item (const {\bf QString} \& {\em s\-Action}, const {\bf QObject} $\ast$ {\em p\-Obj\-Slot}, const char $\ast$ {\em ps\-Method\-Slot}, bool {\em b\-Activate} = {\tt true})}\label{classKAccel_a26}


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


Definition at line 543 of file kaccel.cpp.

References endl(), and set\-Slot().\index{KAccel@{KAccel}!connectItem@{connectItem}}
\index{connectItem@{connectItem}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED bool KAccel::connect\-Item ({\bf KStd\-Accel::Std\-Accel} {\em accel}, const {\bf QObject} $\ast$ {\em p\-Obj\-Slot}, const char $\ast$ {\em ps\-Method\-Slot})\hspace{0.3cm}{\tt  [inline]}}\label{classKAccel_a27}


\begin{Desc}
\item[{\bf Deprecated}]use insert( accel, p\-Obj\-Slot, ps\-Method\-Slot ); \end{Desc}


Definition at line 341 of file kaccel.h.\index{KAccel@{KAccel}!removeItem@{removeItem}}
\index{removeItem@{removeItem}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::remove\-Item (const {\bf QString} \& {\em s\-Action})}\label{classKAccel_a28}


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


Definition at line 554 of file kaccel.cpp.\index{KAccel@{KAccel}!setItemEnabled@{setItemEnabled}}
\index{setItemEnabled@{setItemEnabled}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAccel::set\-Item\-Enabled (const {\bf QString} \& {\em s\-Action}, bool {\em b\-Enable})}\label{classKAccel_a29}


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


Definition at line 557 of file kaccel.cpp.

References set\-Enabled().\index{KAccel@{KAccel}!changeMenuAccel@{changeMenuAccel}}
\index{changeMenuAccel@{changeMenuAccel}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAccel::change\-Menu\-Accel ({\bf QPopup\-Menu} $\ast$ {\em menu}, int {\em id}, const {\bf QString} \& {\em action})}\label{classKAccel_a30}


\begin{Desc}
\item[{\bf Deprecated}]see KDE3PORTING.html \end{Desc}


Definition at line 560 of file kaccel.cpp.

References QString::find(), QString::is\-Empty(), QPixmap::is\-Null(), QString::length(), and QString::replace().

Referenced by change\-Menu\-Accel().\index{KAccel@{KAccel}!changeMenuAccel@{changeMenuAccel}}
\index{changeMenuAccel@{changeMenuAccel}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAccel::change\-Menu\-Accel ({\bf QPopup\-Menu} $\ast$ {\em menu}, int {\em id}, {\bf KStd\-Accel::Std\-Accel} {\em accel})}\label{classKAccel_a31}


\begin{Desc}
\item[{\bf Deprecated}]see KDE3PORTING.html \end{Desc}


Definition at line 587 of file kaccel.cpp.

References change\-Menu\-Accel().\index{KAccel@{KAccel}!stringToKey@{stringToKey}}
\index{stringToKey@{stringToKey}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KAccel::string\-To\-Key (const {\bf QString} \&)\hspace{0.3cm}{\tt  [static]}}\label{classKAccel_e0}


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


Definition at line 592 of file kaccel.cpp.\index{KAccel@{KAccel}!currentKey@{currentKey}}
\index{currentKey@{currentKey}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KAccel::current\-Key (const {\bf QString} \& {\em action}) const}\label{classKAccel_a32}


\begin{Desc}
\item[{\bf Deprecated}]Use {\bf shortcut()}{\rm (p.\,\pageref{classKAccel_a14})}. \end{Desc}
Retrieve the key code of the accelerator item with the action name {\tt action}, or zero if either the action name cannot be found or the current key is set to no key.

Definition at line 597 of file kaccel.cpp.\index{KAccel@{KAccel}!findKey@{findKey}}
\index{findKey@{findKey}!KAccel@{KAccel}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KAccel::find\-Key (int {\em key}) const}\label{classKAccel_a33}


\begin{Desc}
\item[{\bf Deprecated}]Use actions().action\-Ptr(). \end{Desc}
Return the name of the accelerator item with the keycode {\tt key}, or QString::null if the item cannot be found.

Definition at line 605 of file kaccel.cpp.

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