\section{KKey\-Button Class Reference}
\label{classKKeyButton}\index{KKeyButton@{KKeyButton}}
A push button that looks like a keyboard key. A push button that looks like a keyboard key.  


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

Inheritance diagram for KKey\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{classKKeyButton__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KKey\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=56pt]{classKKeyButton__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf capture\-Shortcut} ()
\begin{CompactList}\small\item\em Call this method to capture a shortcut from the keyboard. \item\end{CompactList}\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf captured\-Shortcut} (const  KShortcut \&)\label{classKKeyButton_l0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KKey\-Button} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructs key button widget. \item\end{CompactList}\item 
virtual {\bf $\sim$KKey\-Button} ()
\begin{CompactList}\small\item\em Destructs the key button widget. \item\end{CompactList}\item 
void {\bf set\-Shortcut} (const  KShortcut \&cut)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} \item\end{CompactList}\item 
void {\bf set\-Shortcut} (const  KShortcut \&cut, bool b\-Qt\-Shortcut)
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
const  KShortcut \& {\bf shortcut} () const \label{classKKeyButton_a4}

\item 
void {\bf set\-Text} (const  {\bf QString} \&{\bf text})
\begin{CompactList}\small\item\em Reimplemented for internal purposes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf draw\-Button} ({\bf QPainter} $\ast$\_\-painter)
\begin{CompactList}\small\item\em Reimplemented for internal reasons. \item\end{CompactList}\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKKeyButton_b1}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
KShortcut {\bf m\_\-cut}\label{classKKeyButton_p0}

\item 
bool {\bf m\_\-b\-Editing}\label{classKKeyButton_p1}

\end{CompactItemize}


\subsection{Detailed Description}
A push button that looks like a keyboard key. A push button that looks like a keyboard key. 

You must call {\bf set\-Shortcut()}{\rm (p.\,\pageref{classKKeyButton_a2})} to set the widget's currently displayed key. You can call {\bf capture\-Shortcut()}{\rm (p.\,\pageref{classKKeyButton_i0})} to get a new shortcut from the user. If {\bf capture\-Shortcut()}{\rm (p.\,\pageref{classKKeyButton_i0})} suceeds, then the captured\-Shortcut signal will be emitted with the value of the new shortcut. The widget containing a KKey\-Button widget must connect to this signal and check if the shortcut is valid. If it is, you will need to call {\bf set\-Shortcut()}{\rm (p.\,\pageref{classKKeyButton_a2})} with the new value in order make it the key currently displayed.

\begin{Desc}
\item[Author:]Mark Donohoe $<${\tt donohoe@kde.org}$>$ \end{Desc}




Definition at line 41 of file kkeybutton.h.

\subsection{Constructor \& Destructor Documentation}
\index{KKeyButton@{KKey\-Button}!KKeyButton@{KKeyButton}}
\index{KKeyButton@{KKeyButton}!KKeyButton@{KKey\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Button::KKey\-Button ({\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)}\label{classKKeyButton_a0}


Constructs key button widget. 



Definition at line 65 of file kkeybutton.cpp.

References capture\-Shortcut(), QPush\-Button::clicked(), KStd\-Accel::name(), and set\-Shortcut().\index{KKeyButton@{KKey\-Button}!~KKeyButton@{$\sim$KKeyButton}}
\index{~KKeyButton@{$\sim$KKeyButton}!KKeyButton@{KKey\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Button::$\sim${\bf KKey\-Button} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKKeyButton_a1}


Destructs the key button widget. 



Definition at line 75 of file kkeybutton.cpp.

\subsection{Member Function Documentation}
\index{KKeyButton@{KKey\-Button}!setShortcut@{setShortcut}}
\index{setShortcut@{setShortcut}!KKeyButton@{KKey\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Button::set\-Shortcut (const KShortcut \& {\em cut})}\label{classKKeyButton_a2}


{\bf This class or method is obsolete, it is provided for compatibility only.} 



Definition at line 89 of file kkeybutton.cpp.

References KStd\-Accel::cut().

Referenced by KKey\-Button().\index{KKeyButton@{KKey\-Button}!setShortcut@{setShortcut}}
\index{setShortcut@{setShortcut}!KKeyButton@{KKey\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Button::set\-Shortcut (const KShortcut \& {\em cut}, bool {\em b\-Qt\-Shortcut})}\label{classKKeyButton_a3}


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




Definition at line 80 of file kkeybutton.cpp.

References KStd\-Accel::cut(), QString::is\-Empty(), and set\-Text().\index{KKeyButton@{KKey\-Button}!setText@{setText}}
\index{setText@{setText}!KKeyButton@{KKey\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Button::set\-Text (const {\bf QString} \& {\em text})}\label{classKKeyButton_a5}


Reimplemented for internal purposes. 



Reimplemented from {\bf QPush\-Button}.

Definition at line 94 of file kkeybutton.cpp.

References QPush\-Button::set\-Text().

Referenced by set\-Shortcut().\index{KKeyButton@{KKey\-Button}!captureShortcut@{captureShortcut}}
\index{captureShortcut@{captureShortcut}!KKeyButton@{KKey\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Button::capture\-Shortcut ()\hspace{0.3cm}{\tt  [slot]}}\label{classKKeyButton_i0}


Call this method to capture a shortcut from the keyboard. 

If it succeeds, the captured\-Shortcut() will be emitted.

Definition at line 100 of file kkeybutton.cpp.

References KStd\-Accel::cut().

Referenced by KKey\-Button().\index{KKeyButton@{KKey\-Button}!drawButton@{drawButton}}
\index{drawButton@{drawButton}!KKeyButton@{KKey\-Button}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Button::draw\-Button ({\bf QPainter} $\ast$ {\em \_\-painter})\hspace{0.3cm}{\tt  [protected]}}\label{classKKeyButton_b0}


Reimplemented for internal reasons. 



Definition at line 115 of file kkeybutton.cpp.

References QPainter::draw\-Rect(), QPainter::draw\-Round\-Rect(), QPainter::set\-Brush(), QPainter::set\-Clipping(), QPainter::set\-Clip\-Region(), QPainter::set\-Pen(), QPoint\-Array::set\-Point(), and QPush\-Button::text().

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