\section{KKey\-Button Class Reference}
\label{classKKeyButton}\index{KKeyButton@{KKeyButton}}
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=55pt]{classKKeyButton__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KKey\-Button:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=100pt]{classKKeyButton__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf capture\-Shortcut} ()
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf captured\-Shortcut} (const {\bf 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)
\item 
virtual {\bf $\sim$KKey\-Button} ()
\item 
void {\bf set\-Shortcut} (const {\bf KShortcut} \&cut) KDE\_\-DEPRECATED
\item 
void {\bf set\-Shortcut} (const {\bf KShortcut} \&cut, bool b\-Qt\-Shortcut)
\item 
const {\bf KShortcut} \& {\bf shortcut} () const \label{classKKeyButton_a4}

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

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf 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. 

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 40 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} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKKeyButton_a0}


Constructs key button widget. 



Definition at line 68 of file kkeybutton.cpp.

References capture\-Shortcut(), QPush\-Button::clicked(), 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 78 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 {\bf KShortcut} \& {\em cut})}\label{classKKeyButton_a2}


\begin{Desc}
\item[{\bf Deprecated}]Use set\-Shortcut( cut, false ) instead\end{Desc}


Definition at line 93 of file kkeybutton.cpp.

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 {\bf KShortcut} \& {\em cut}, bool {\em b\-Qt\-Shortcut})}\label{classKKeyButton_a3}


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




Definition at line 83 of file kkeybutton.cpp.

References QString::is\-Empty(), QString::replace(), set\-Text(), and KShortcut::to\-String().\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 98 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 104 of file kkeybutton.cpp.

References KShortcut::is\-Null().

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 123 of file kkeybutton.cpp.

References 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}
