\section{KKey\-Chooser Class Reference}
\label{classKKeyChooser}\index{KKeyChooser@{KKeyChooser}}
Configure dictionaries of key/action associations for {\bf KAccel} and {\bf KGlobal\-Accel}. Widget for configuration of {\bf KAccel} and {\bf KGlobal\-Accel}.  


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

Inheritance diagram for KKey\-Chooser:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=58pt]{classKKeyChooser__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KKey\-Chooser:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=116pt]{classKKeyChooser__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Action\-Type} \{ {\bf Application}, 
{\bf Application\-Global}, 
{\bf Standard}, 
{\bf Global}
 \}
\end{CompactItemize}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf all\-Default} ()
\begin{CompactList}\small\item\em Set all keys to their default values (bindings). \item\end{CompactList}\item 
void {\bf set\-Prefer\-Four\-Modifier\-Keys} (bool prefer\-Four\-Modifier\-Keys)
\begin{CompactList}\small\item\em Specifies whether to use the 3 or 4 modifier key scheme. \item\end{CompactList}\item 
void {\bf list\-Sync} ()
\begin{CompactList}\small\item\em Rebuild list entries based on underlying map. \item\end{CompactList}\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf key\-Change} ()
\begin{CompactList}\small\item\em Emitted when an action's shortcut has been changed. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KKey\-Chooser} ({\bf QWidget} $\ast$parent, Action\-Type type=Application, bool b\-Allow\-Letter\-Shortcuts=true)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
{\bf KKey\-Chooser} ({\bf KAction\-Collection} $\ast$coll, {\bf QWidget} $\ast$parent, bool b\-Allow\-Letter\-Shortcuts=true)\label{classKKeyChooser_a1}

\item 
{\bf KKey\-Chooser} ({\bf KAccel} $\ast$actions, {\bf QWidget} $\ast$parent, bool b\-Allow\-Letter\-Shortcuts=true)\label{classKKeyChooser_a2}

\item 
{\bf KKey\-Chooser} ({\bf KGlobal\-Accel} $\ast$actions, {\bf QWidget} $\ast$parent)\label{classKKeyChooser_a3}

\item 
{\bf KKey\-Chooser} ({\bf KShortcut\-List} $\ast$, {\bf QWidget} $\ast$parent, Action\-Type type=Application, bool b\-Allow\-Letter\-Shortcuts=true)\label{classKKeyChooser_a4}

\item 
bool {\bf insert} ({\bf KAction\-Collection} $\ast$)
\begin{CompactList}\small\item\em Insert an action collection, i.e. \item\end{CompactList}\item 
bool {\bf insert} ({\bf KAction\-Collection} $\ast$, const  {\bf QString} \&title)
\begin{CompactList}\small\item\em Insert an action collection, i.e. \item\end{CompactList}\item 
void {\bf sync\-To\-Config} (const  {\bf QString} \&s\-Config\-Group, {\bf KConfig\-Base} $\ast$p\-Config, bool b\-Clear\-Unset)\label{classKKeyChooser_a8}

\item 
void {\bf commit\-Changes} ()
\begin{CompactList}\small\item\em This function writes any shortcut changes back to the original action set(s). \item\end{CompactList}\item 
void {\bf save} ()
\begin{CompactList}\small\item\em This commits and then saves the actions to disk. \item\end{CompactList}\item 
{\bf KKey\-Chooser} ({\bf KAccel} $\ast$actions, {\bf QWidget} $\ast$parent, bool b\-Check\-Against\-Std\-Keys, bool b\-Allow\-Letter\-Shortcuts, bool b\-Allow\-Win\-Key=false)
\item 
{\bf KKey\-Chooser} ({\bf KGlobal\-Accel} $\ast$actions, {\bf QWidget} $\ast$parent, bool b\-Check\-Against\-Std\-Keys, bool b\-Allow\-Letter\-Shortcuts, bool b\-Allow\-Win\-Key=false)
\end{CompactItemize}
\subsection*{Protected Types}
\begin{CompactItemize}
\item 
enum \{ {\bf No\-Key} =  1, 
{\bf Default\-Key}, 
{\bf Custom\-Key}
 \}
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-No\-Key} ()\label{classKKeyChooser_j0}

\item 
void {\bf slot\-Default\-Key} ()\label{classKKeyChooser_j1}

\item 
void {\bf slot\-Custom\-Key} ()\label{classKKeyChooser_j2}

\item 
void {\bf slot\-List\-Item\-Selected} ({\bf QList\-View\-Item} $\ast$item)\label{classKKeyChooser_j3}

\item 
void {\bf captured\-Shortcut} (const  KShortcut \&cut)\label{classKKeyChooser_j4}

\item 
void {\bf slot\-Settings\-Changed} (int)\label{classKKeyChooser_j5}

\item 
void {\bf slot\-List\-Item\-Double\-Clicked} ({\bf QList\-View\-Item} $\ast$ipo\-QList\-View\-Item, const  {\bf QPoint} \&ipo\-QPoint, int c)\label{classKKeyChooser_j6}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf init\-GUI} (Action\-Type type, bool b\-Allow\-Letter\-Shortcuts)\label{classKKeyChooser_b0}

\item 
bool {\bf insert} ({\bf KAccel} $\ast$)\label{classKKeyChooser_b1}

\item 
bool {\bf insert} ({\bf KGlobal\-Accel} $\ast$)\label{classKKeyChooser_b2}

\item 
bool {\bf insert} ({\bf KShortcut\-List} $\ast$)\label{classKKeyChooser_b3}

\item 
void {\bf build\-List\-View} (uint i\-List, const  {\bf QString} \&title=QString::null)
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
void {\bf read\-Global\-Keys} ()\label{classKKeyChooser_b5}

\item 
void {\bf update\-Buttons} ()\label{classKKeyChooser_b6}

\item 
void {\bf font\-Change} (const  {\bf QFont} \&\_\-font)\label{classKKeyChooser_b7}

\item 
void {\bf set\-Shortcut} (const  KShortcut \&cut)\label{classKKeyChooser_b8}

\item 
bool {\bf is\-Key\-Present} (const  KShortcut \&cut, bool warnuser=true)\label{classKKeyChooser_b9}

\item 
bool {\bf is\-Key\-Present\-Locally} (const  KShortcut \&cut, KKey\-Chooser\-Item $\ast$ignore\-Item, const  {\bf QString} \&warn\-Text)\label{classKKeyChooser_b10}

\item 
void {\bf \_\-warning} (const  {\bf KKey\-Sequence} \&seq, {\bf QString} s\-Action, {\bf QString} s\-Title)\label{classKKeyChooser_b11}

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

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
Action\-Type {\bf m\_\-type}\label{classKKeyChooser_p0}

\item 
bool {\bf m\_\-b\-Allow\-Letter\-Shortcuts}\label{classKKeyChooser_p1}

\item 
bool {\bf m\_\-b\-Allow\-Win\-Key}\label{classKKeyChooser_p2}

\item 
bool {\bf m\_\-b\-Prefer\-Four\-Modifier\-Keys}\label{classKKeyChooser_p3}

\item 
{\bf QRadio\-Button} $\ast$ {\bf m\_\-prb\-None}\label{classKKeyChooser_p4}

\item 
{\bf QRadio\-Button} $\ast$ {\bf m\_\-prb\-Def}\label{classKKeyChooser_p5}

\item 
{\bf QRadio\-Button} $\ast$ {\bf m\_\-prb\-Custom}\label{classKKeyChooser_p6}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KKey\-Dialog}\label{classKKeyChooser_n0}

\end{CompactItemize}


\subsection{Detailed Description}
Configure dictionaries of key/action associations for {\bf KAccel} and {\bf KGlobal\-Accel}. Widget for configuration of {\bf KAccel} and {\bf KGlobal\-Accel}. 

The class takes care of all aspects of configuration, including handling key conflicts internally. Connect to the {\bf all\-Default}{\rm (p.\,\pageref{classKKeyChooser_i0})}() slot if you want to set all configurable shortcuts to their default values.

\begin{Desc}
\item[See also:]{\bf KKey\-Dialog}{\rm (p.\,\pageref{classKKeyDialog})} \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kkeydialog.h}{\rm (p.\,\pageref{kkeydialog_8h})},v 1.72.2.1 2003/04/25 07:38:44 mlaurent Exp \end{Desc}
\end{Desc}
\begin{Desc}
\item[Author:]Nicolas Hadacek $<${\tt hadacek@via.ecp.fr}$>$ \end{Desc}




Definition at line 58 of file kkeydialog.h.

\subsection{Constructor \& Destructor Documentation}
\index{KKeyChooser@{KKey\-Chooser}!KKeyChooser@{KKeyChooser}}
\index{KKeyChooser@{KKeyChooser}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Chooser::KKey\-Chooser ({\bf QWidget} $\ast$ {\em parent}, Action\-Type {\em type} = Application, bool {\em b\-Allow\-Letter\-Shortcuts} = true)}\label{classKKeyChooser_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em b\-Allow\-Letter\-Shortcuts}]Set to false if unmodified alphanumeric keys ('A', '1', etc.) are not permissible shortcuts. \end{description}
\end{Desc}


Definition at line 134 of file kkeydialog.cpp.\index{KKeyChooser@{KKey\-Chooser}!KKeyChooser@{KKeyChooser}}
\index{KKeyChooser@{KKeyChooser}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Chooser::KKey\-Chooser ({\bf KAccel} $\ast$ {\em actions}, {\bf QWidget} $\ast$ {\em parent}, bool {\em b\-Check\-Against\-Std\-Keys}, bool {\em b\-Allow\-Letter\-Shortcuts}, bool {\em b\-Allow\-Win\-Key} = false)}\label{classKKeyChooser_a11}


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


Definition at line 168 of file kkeydialog.cpp.

References insert().\index{KKeyChooser@{KKey\-Chooser}!KKeyChooser@{KKeyChooser}}
\index{KKeyChooser@{KKeyChooser}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Chooser::KKey\-Chooser ({\bf KGlobal\-Accel} $\ast$ {\em actions}, {\bf QWidget} $\ast$ {\em parent}, bool {\em b\-Check\-Against\-Std\-Keys}, bool {\em b\-Allow\-Letter\-Shortcuts}, bool {\em b\-Allow\-Win\-Key} = false)}\label{classKKeyChooser_a12}


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


Definition at line 184 of file kkeydialog.cpp.

References insert().

\subsection{Member Function Documentation}
\index{KKeyChooser@{KKey\-Chooser}!insert@{insert}}
\index{insert@{insert}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Chooser::insert ({\bf KAction\-Collection} $\ast$)}\label{classKKeyChooser_a6}


Insert an action collection, i.e. 

add all its actions to the ones already associated with the KKey\-Chooser object.

Definition at line 213 of file kkeydialog.cpp.

Referenced by KKey\-Dialog::configure(), KKey\-Dialog::insert(), and KKey\-Chooser().\index{KKeyChooser@{KKey\-Chooser}!insert@{insert}}
\index{insert@{insert}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Chooser::insert ({\bf KAction\-Collection} $\ast$, const {\bf QString} \& {\em title})}\label{classKKeyChooser_a7}


Insert an action collection, i.e. 

add all its actions to the ones already associated with the KKey\-Chooser object. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em title}]subtree title of this collection of shortcut. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1\end{Desc}


Definition at line 218 of file kkeydialog.cpp.

References KInstance::about\-Data(), build\-List\-View(), KAction\-Collection::instance(), QString::is\-Empty(), and KAbout\-Data::program\-Name().\index{KKeyChooser@{KKey\-Chooser}!commitChanges@{commitChanges}}
\index{commitChanges@{commitChanges}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Chooser::commit\-Changes ()}\label{classKKeyChooser_a9}


This function writes any shortcut changes back to the original action set(s). 



Definition at line 253 of file kkeydialog.cpp.

References QList\-View\-Item\-Iterator::current().

Referenced by KKey\-Dialog::commit\-Changes(), and save().\index{KKeyChooser@{KKey\-Chooser}!save@{save}}
\index{save@{save}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Chooser::save ()}\label{classKKeyChooser_a10}


This commits and then saves the actions to disk. 

Any {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} objects with the xml\-File() value set will be written to an xml file. All other will be written to the application's rc file.

Definition at line 265 of file kkeydialog.cpp.

References commit\-Changes().\index{KKeyChooser@{KKey\-Chooser}!keyChange@{keyChange}}
\index{keyChange@{keyChange}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Chooser::key\-Change ()\hspace{0.3cm}{\tt  [signal]}}\label{classKKeyChooser_l0}


Emitted when an action's shortcut has been changed. 



Referenced by all\-Default().\index{KKeyChooser@{KKey\-Chooser}!allDefault@{allDefault}}
\index{allDefault@{allDefault}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Chooser::all\-Default ()\hspace{0.3cm}{\tt  [slot]}}\label{classKKeyChooser_i0}


Set all keys to their default values (bindings). 



Definition at line 557 of file kkeydialog.cpp.

References QList\-View\-Item\-Iterator::current(), and key\-Change().\index{KKeyChooser@{KKey\-Chooser}!setPreferFourModifierKeys@{setPreferFourModifierKeys}}
\index{setPreferFourModifierKeys@{setPreferFourModifierKeys}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Chooser::set\-Prefer\-Four\-Modifier\-Keys (bool {\em prefer\-Four\-Modifier\-Keys})\hspace{0.3cm}{\tt  [slot]}}\label{classKKeyChooser_i1}


Specifies whether to use the 3 or 4 modifier key scheme. 

This determines which default is used when the 'Default' button is clicked.

Definition at line 587 of file kkeydialog.cpp.\index{KKeyChooser@{KKey\-Chooser}!buildListView@{buildListView}}
\index{buildListView@{buildListView}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Chooser::build\-List\-View (uint {\em i\-List}, const {\bf QString} \& {\em title} = QString::null)\hspace{0.3cm}{\tt  [protected]}}\label{classKKeyChooser_b4}


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




Definition at line 415 of file kkeydialog.cpp.

References KShortcut\-List::count(), QList\-View\-Item::first\-Child(), KShortcut\-List::is\-Configurable(), QString::is\-Empty(), KShortcut\-List::label(), KShortcut\-List::name(), QList\-View\-Item::set\-Expandable(), QList\-View\-Item::set\-Open(), QList\-View\-Item::set\-Selectable(), and QString::starts\-With().

Referenced by insert().\index{KKeyChooser@{KKey\-Chooser}!listSync@{listSync}}
\index{listSync@{listSync}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Chooser::list\-Sync ()\hspace{0.3cm}{\tt  [slot]}}\label{classKKeyChooser_i2}


Rebuild list entries based on underlying map. 

Use this if you changed the underlying map.

Definition at line 602 of file kkeydialog.cpp.

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