\section{KShortcut\-List Class Reference}
\label{classKShortcutList}\index{KShortcutList@{KShortcutList}}
KShortcut\-List is an abstract base class for {\bf KAccel\-Shortcut\-List}{\rm (p.\,\pageref{classKAccelShortcutList})} and {\bf KStd\-Accel::Shortcut\-List}{\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList})}. Base class for accessing accelerator lists.  


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

Inheritance diagram for KShortcut\-List:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=137pt]{classKShortcutList__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Other} 
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KShortcut\-List} ()
\item 
virtual uint {\bf count} () const =0
\item 
virtual {\bf QString} {\bf name} (uint index) const =0
\item 
virtual {\bf QString} {\bf label} (uint index) const =0
\item 
virtual {\bf QString} {\bf whats\-This} (uint index) const =0
\item 
virtual const {\bf KShortcut} \& {\bf shortcut} (uint index) const =0
\item 
virtual const {\bf KShortcut} \& {\bf shortcut\-Default} (uint index) const =0
\item 
virtual bool {\bf is\-Configurable} (uint index) const =0
\item 
virtual bool {\bf set\-Shortcut} (uint index, const {\bf KShortcut} \&shortcut)=0
\item 
virtual bool {\bf is\-Global} (uint index) const 
\item 
virtual int {\bf index} (const {\bf QString} \&s\-Name) const 
\item 
virtual int {\bf index} (const {\bf KKey\-Sequence} \&key\-Seq) const 
\item 
virtual const {\bf KInstance} $\ast$ {\bf instance} () const 
\item 
virtual {\bf QVariant} {\bf get\-Other} (Other, uint index) const =0\label{classKShortcutList_a14}

\item 
virtual bool {\bf set\-Other} (Other, uint index, {\bf QVariant})=0\label{classKShortcutList_a15}

\item 
virtual bool {\bf save} () const =0
\item 
virtual bool {\bf read\-Settings} (const {\bf QString} \&s\-Config\-Group=QString::null, {\bf KConfig\-Base} $\ast$p\-Config=0)
\item 
virtual bool {\bf write\-Settings} (const {\bf QString} \&s\-Config\-Group=QString::null, {\bf KConfig\-Base} $\ast$p\-Config=0, bool b\-Write\-All=false, bool b\-Global=false) const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)
\end{CompactItemize}


\subsection{Detailed Description}
KShortcut\-List is an abstract base class for {\bf KAccel\-Shortcut\-List}{\rm (p.\,\pageref{classKAccelShortcutList})} and {\bf KStd\-Accel::Shortcut\-List}{\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList})}. Base class for accessing accelerator lists. 

It gives you an unified interface for accessing the accelerator lists of {\bf KAccel}{\rm (p.\,\pageref{classKAccel})} (using {\bf KAccel\-Shortcut\-List}{\rm (p.\,\pageref{classKAccelShortcutList})}), {\bf KGlobal\-Accel}{\rm (p.\,\pageref{classKGlobalAccel})} (using {\bf KAccel\-Shortcut\-List}{\rm (p.\,\pageref{classKAccelShortcutList})}), and {\bf KStd\-Accel}{\rm (p.\,\pageref{namespaceKStdAccel})} (using {\bf KStd\-Accel::Shortcut\-List}{\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList})}).



Definition at line 48 of file kshortcutlist.h.

\subsection{Constructor \& Destructor Documentation}
\index{KShortcutList@{KShortcut\-List}!KShortcutList@{KShortcutList}}
\index{KShortcutList@{KShortcutList}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KShortcut\-List::KShortcut\-List ()}\label{classKShortcutList_a0}


Default constructor. 



Definition at line 18 of file kshortcutlist.cpp.

\subsection{Member Function Documentation}
\index{KShortcutList@{KShortcut\-List}!count@{count}}
\index{count@{count}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual uint KShortcut\-List::count () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a2}


Returns the number of entries. 

\begin{Desc}
\item[Returns:]the number of entries\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a4})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a2})}.

Referenced by index(), read\-Settings(), and write\-Settings().\index{KShortcutList@{KShortcut\-List}!name@{name}}
\index{name@{name}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KShortcut\-List::name (uint {\em index}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a3}


Returns the name of the shortcut with the given {\tt index}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the name of the shortcut\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a5})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a3})}.

Referenced by index(), read\-Settings(), and write\-Settings().\index{KShortcutList@{KShortcut\-List}!label@{label}}
\index{label@{label}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KShortcut\-List::label (uint {\em index}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a4}


Returns the (i18n'd) label of the shortcut with the given {\tt index}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the label (i18n'd) of the shortcut\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a6})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a4})}.\index{KShortcutList@{KShortcut\-List}!whatsThis@{whatsThis}}
\index{whatsThis@{whatsThis}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KShortcut\-List::whats\-This (uint {\em index}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a5}


Returns the (i18n'd) What's This text of the shortcut with the given {\tt index}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the What's This text (i18n'd) of the shortcut\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a7})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a5})}.\index{KShortcutList@{KShortcut\-List}!shortcut@{shortcut}}
\index{shortcut@{shortcut}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual const {\bf KShortcut}\& KShortcut\-List::shortcut (uint {\em index}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a6}


Returns the shortcut with the given {\tt index}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the shortcut \end{Desc}
\begin{Desc}
\item[See also:]{\bf shortcut\-Default()}{\rm (p.\,\pageref{classKShortcutList_a7})}\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a8})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a6})}.

Referenced by index(), and write\-Settings().\index{KShortcutList@{KShortcut\-List}!shortcutDefault@{shortcutDefault}}
\index{shortcutDefault@{shortcutDefault}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual const {\bf KShortcut}\& KShortcut\-List::shortcut\-Default (uint {\em index}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a7}


Returns default shortcut with the given {\tt index}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the default shortcut \end{Desc}
\begin{Desc}
\item[See also:]{\bf shortcut()}{\rm (p.\,\pageref{classKShortcutList_a6})}\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a9})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a7})}.

Referenced by read\-Settings(), and write\-Settings().\index{KShortcutList@{KShortcut\-List}!isConfigurable@{isConfigurable}}
\index{isConfigurable@{isConfigurable}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KShortcut\-List::is\-Configurable (uint {\em index}) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a8}


Checks whether the shortcut with the given {\tt index} is configurable. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if configurable, false otherwise\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a10})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a8})}.

Referenced by read\-Settings(), and write\-Settings().\index{KShortcutList@{KShortcut\-List}!setShortcut@{setShortcut}}
\index{setShortcut@{setShortcut}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KShortcut\-List::set\-Shortcut (uint {\em index}, const {\bf KShortcut} \& {\em shortcut})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a9}


Sets the shortcut of the given entry. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \item[{\em shortcut}]the shortcut\end{description}
\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a11})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a9})}.

Referenced by read\-Settings().\index{KShortcutList@{KShortcut\-List}!isGlobal@{isGlobal}}
\index{isGlobal@{isGlobal}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShortcut\-List::is\-Global (uint {\em index}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKShortcutList_a10}


Checks whether the shortcut with the given {\tt index} is saved in the global configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]the index of the shortcut (must be $<$ {\bf count()}{\rm (p.\,\pageref{classKShortcutList_a2})}) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if global, false otherwise\end{Desc}


Reimplemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a12})}.

Definition at line 26 of file kshortcutlist.cpp.\index{KShortcutList@{KShortcut\-List}!index@{index}}
\index{index@{index}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KShortcut\-List::index (const {\bf QString} \& {\em s\-Name}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKShortcutList_a11}


Returns the index of the shortcut with he given name. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Name}]the name of the shortcut to search \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the index of the shortcut, of -1 if not found\end{Desc}


Definition at line 31 of file kshortcutlist.cpp.

References count(), and name().\index{KShortcutList@{KShortcut\-List}!index@{index}}
\index{index@{index}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KShortcut\-List::index (const {\bf KKey\-Sequence} \& {\em key\-Seq}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKShortcutList_a12}


Returns the index of the shortcut with he given key sequence. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key\-Seq}]the key sequence to search for \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the index of the shortcut, of -1 if not found\end{Desc}


Definition at line 42 of file kshortcutlist.cpp.

References KShortcut::contains(), count(), and shortcut().\index{KShortcutList@{KShortcut\-List}!instance@{instance}}
\index{instance@{instance}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KInstance} $\ast$ KShortcut\-List::instance () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKShortcutList_a13}


The {\bf KInstance}{\rm (p.\,\pageref{classKInstance})}. 

\begin{Desc}
\item[Returns:]the {\bf KInstance}{\rm (p.\,\pageref{classKInstance})} of the list, can be 0 if not available\end{Desc}


Definition at line 56 of file kshortcutlist.cpp.\index{KShortcutList@{KShortcut\-List}!save@{save}}
\index{save@{save}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KShortcut\-List::save () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKShortcutList_a16}


Save the shortcut list. 

\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Implemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_a15})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_a12})}.\index{KShortcutList@{KShortcut\-List}!readSettings@{readSettings}}
\index{readSettings@{readSettings}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShortcut\-List::read\-Settings (const {\bf QString} \& {\em s\-Config\-Group} = {\tt QString::null}, {\bf KConfig\-Base} $\ast$ {\em p\-Config} = {\tt 0})\hspace{0.3cm}{\tt  [virtual]}}\label{classKShortcutList_a17}


Loads the shortcuts from the given configuration file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Config\-Group}]the group in the configuration file \item[{\em p\-Config}]the configuration file to load from \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 71 of file kshortcutlist.cpp.

References KGlobal::config(), count(), endl(), is\-Configurable(), QString::is\-Empty(), name(), set\-Shortcut(), and shortcut\-Default().\index{KShortcutList@{KShortcut\-List}!writeSettings@{writeSettings}}
\index{writeSettings@{writeSettings}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KShortcut\-List::write\-Settings (const {\bf QString} \& {\em s\-Config\-Group} = {\tt QString::null}, {\bf KConfig\-Base} $\ast$ {\em p\-Config} = {\tt 0}, bool {\em b\-Write\-All} = {\tt false}, bool {\em b\-Global} = {\tt false}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKShortcutList_a18}


Writes the shortcuts to the given configuration file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s\-Config\-Group}]the group in the configuration file \item[{\em p\-Config}]the configuration file to save to \item[{\em b\-Write\-All}]true to write all actions \item[{\em b\-Global}]true to write to the global configuration file \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 109 of file kshortcutlist.cpp.

References KGlobal::config(), count(), KConfig\-Base::delete\-Group(), endl(), is\-Configurable(), QString::is\-Empty(), name(), shortcut(), shortcut\-Default(), and KShortcut::to\-String\-Internal().

Referenced by KStd\-Accel::Shortcut\-List::save(), and KAccel\-Shortcut\-List::save().\index{KShortcutList@{KShortcut\-List}!virtual_hook@{virtual\_\-hook}}
\index{virtual_hook@{virtual\_\-hook}!KShortcutList@{KShortcut\-List}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KShortcut\-List::virtual\_\-hook (int {\em id}, void $\ast$ {\em data})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKShortcutList_b0}


used to extend the interface with virtuals without breaking binary compatibility 



Reimplemented in {\bf KAccel\-Shortcut\-List} {\rm (p.\,\pageref{classKAccelShortcutList_b0})}, and {\bf KStd\-Accel::Shortcut\-List} {\rm (p.\,\pageref{classKStdAccel_1_1ShortcutList_b0})}.

Definition at line 212 of file kshortcutlist.cpp.

Referenced by KStd\-Accel::Shortcut\-List::virtual\_\-hook(), and KAccel\-Shortcut\-List::virtual\_\-hook().

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