\section{KKey\-Chooser Class Reference}
\label{classKKeyChooser}\index{KKeyChooser@{KKeyChooser}}
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=57pt]{classKKeyChooser__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KKey\-Chooser:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=105pt]{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} ()
\item 
void {\bf set\-Prefer\-Four\-Modifier\-Keys} (bool prefer\-Four\-Modifier\-Keys)
\item 
void {\bf list\-Sync} ()
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf key\-Change} ()
\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)
\item 
{\bf KKey\-Chooser} ({\bf KAction\-Collection} $\ast$coll, {\bf QWidget} $\ast$parent, bool b\-Allow\-Letter\-Shortcuts=true)
\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$)
\item 
bool {\bf insert} ({\bf KAction\-Collection} $\ast$, const {\bf QString} \&title)
\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} ()
\item 
void {\bf save} ()
\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*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static bool {\bf check\-Global\-Shortcuts\-Conflict} (const {\bf KShortcut} \&cut, bool warn\-User, {\bf QWidget} $\ast$parent)
\item 
static bool {\bf check\-Standard\-Shortcuts\-Conflict} (const {\bf KShortcut} \&cut, bool warn\-User, {\bf QWidget} $\ast$parent)
\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 {\bf 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)
\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 {\bf KShortcut} \&cut)\label{classKKeyChooser_b8}

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

\item 
bool {\bf is\-Key\-Present\-Locally} (const {\bf 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}
Widget for configuration of {\bf KAccel} and {\bf KGlobal\-Accel}. 

Configure dictionaries of key/action associations for {\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[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} = {\tt Application}, bool {\em b\-Allow\-Letter\-Shortcuts} = {\tt true})}\label{classKKeyChooser_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]the parent widget for this widget \item[{\em type}]the Action\-Type for this KKey\-Chooser \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 154 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 KAction\-Collection} $\ast$ {\em coll}, {\bf QWidget} $\ast$ {\em parent}, bool {\em b\-Allow\-Letter\-Shortcuts} = {\tt true})}\label{classKKeyChooser_a1}


This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]parent widget \item[{\em coll}]the {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} to configure \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 160 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 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} = {\tt false})}\label{classKKeyChooser_a11}


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


Definition at line 188 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} = {\tt false})}\label{classKKeyChooser_a12}


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


Definition at line 204 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 233 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 238 of file kkeydialog.cpp.

References QString::append(), and build\-List\-View().\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 273 of file kkeydialog.cpp.

References endl(), and kd\-Debug().

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 285 of file kkeydialog.cpp.

References commit\-Changes().\index{KKeyChooser@{KKey\-Chooser}!checkGlobalShortcutsConflict@{checkGlobalShortcutsConflict}}
\index{checkGlobalShortcutsConflict@{checkGlobalShortcutsConflict}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Chooser::check\-Global\-Shortcuts\-Conflict (const {\bf KShortcut} \& {\em cut}, bool {\em warn\-User}, {\bf QWidget} $\ast$ {\em parent})\hspace{0.3cm}{\tt  [static]}}\label{classKKeyChooser_e0}


Checks whether the given shortcut conflicts with global keyboard shortcuts. 

If yes, and the warn\-User argument is true, warns the user and gives them a chance to reassign the shortcut from the global shortcut.

\begin{Desc}
\item[Returns:]true if there was conflict (and the user didn't reassign the shortcut) \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cut}]the shortcut that will be checked for conflicts \item[{\em warn\-User}]if true, the user will be warned about a conflict and given a chance to reassign the shortcut \item[{\em parent}]parent widget for the warning dialog\end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 850 of file kkeydialog.cpp.\index{KKeyChooser@{KKey\-Chooser}!checkStandardShortcutsConflict@{checkStandardShortcutsConflict}}
\index{checkStandardShortcutsConflict@{checkStandardShortcutsConflict}!KKeyChooser@{KKey\-Chooser}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Chooser::check\-Standard\-Shortcuts\-Conflict (const {\bf KShortcut} \& {\em cut}, bool {\em warn\-User}, {\bf QWidget} $\ast$ {\em parent})\hspace{0.3cm}{\tt  [static]}}\label{classKKeyChooser_e1}


Checks whether the given shortcut conflicts with standard keyboard shortcuts. 

If yes, and the warn\-User argument is true, warns the user and gives them a chance to reassign the shortcut from the standard shortcut.

\begin{Desc}
\item[Returns:]true if there was conflict (and the user didn't reassign the shortcut) \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cut}]the shortcut that will be checked for conflicts \item[{\em warn\-User}]if true, the user will be warned about a conflict and given a chance to reassign the shortcut \item[{\em parent}]parent widget for the warning dialog\end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 832 of file kkeydialog.cpp.

References KShortcut::count(), KStd\-Accel::find\-Std\-Accel(), and KShortcut::seq().\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 616 of file kkeydialog.cpp.

References endl(), kd\-Debug(), 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 648 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} = {\tt QString::null})\hspace{0.3cm}{\tt  [protected]}}\label{classKKeyChooser_b4}


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




Definition at line 462 of file kkeydialog.cpp.

References KShortcut\-List::count(), endl(), QList\-View\-Item::first\-Child(), KShortcut\-List::is\-Configurable(), QString::is\-Empty(), kd\-Debug(), KShortcut\-List::label(), KShortcut\-List::name(), QList\-View\-Item::set\-Expandable(), QList\-View\-Item::set\-Open(), QList\-View\-Item::set\-Pixmap(), 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 663 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}
