.TH "KKeyButton" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KKeyButton \- A push button that looks like a keyboard key.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kkeybutton.h>\fP
.PP
Inherits \fBQPushButton\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBcaptureShortcut\fP ()"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBcapturedShortcut\fP (const \fBKShortcut\fP &)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKKeyButton\fP (\fBQWidget\fP *parent=0, const char *name=0)"
.br
.ti -1c
.RI "virtual \fB~KKeyButton\fP ()"
.br
.ti -1c
.RI "void \fBsetShortcut\fP (const \fBKShortcut\fP &cut) KDE_DEPRECATED"
.br
.ti -1c
.RI "void \fBsetShortcut\fP (const \fBKShortcut\fP &cut, bool bQtShortcut)"
.br
.ti -1c
.RI "const \fBKShortcut\fP & \fBshortcut\fP () const "
.br
.ti -1c
.RI "void \fBsetText\fP (const \fBQString\fP &\fBtext\fP)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBdrawButton\fP (\fBQPainter\fP *_painter)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKShortcut\fP \fBm_cut\fP"
.br
.ti -1c
.RI "bool \fBm_bEditing\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
A push button that looks like a keyboard key. 

You must call \fBsetShortcut()\fP to set the widget's currently displayed key. You can call \fBcaptureShortcut()\fP to get a new shortcut from the user. If \fBcaptureShortcut()\fP suceeds, then the capturedShortcut signal will be emitted with the value of the new shortcut. The widget containing a KKeyButton widget must connect to this signal and check if the shortcut is valid. If it is, you will need to call \fBsetShortcut()\fP with the new value in order make it the key currently displayed.
.PP
\fBAuthor:\fP
.RS 4
Mark Donohoe <donohoe@kde.org> 
.RE
.PP

.PP
Definition at line 40 of file kkeybutton.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KKeyButton::KKeyButton (\fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructs key button widget. 
.PP

.PP
Definition at line 68 of file kkeybutton.cpp.
.PP
References captureShortcut(), QPushButton::clicked(), and setShortcut().
.SS "KKeyButton::~\fBKKeyButton\fP ()\fC [virtual]\fP"
.PP
Destructs the key button widget. 
.PP

.PP
Definition at line 78 of file kkeybutton.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KKeyButton::setShortcut (const \fBKShortcut\fP & cut)"
.PP
\fBDeprecated\fP
.RS 4
Use setShortcut( cut, false ) instead
.RE
.PP

.PP
Definition at line 93 of file kkeybutton.cpp.
.PP
Referenced by KKeyButton().
.SS "void KKeyButton::setShortcut (const \fBKShortcut\fP & cut, bool bQtShortcut)"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 83 of file kkeybutton.cpp.
.PP
References QString::isEmpty(), QString::replace(), setText(), and KShortcut::toString().
.SS "void KKeyButton::setText (const \fBQString\fP & text)"
.PP
Reimplemented for internal purposes. 
.PP

.PP
Reimplemented from \fBQPushButton\fP.
.PP
Definition at line 98 of file kkeybutton.cpp.
.PP
References QPushButton::setText().
.PP
Referenced by setShortcut().
.SS "void KKeyButton::captureShortcut ()\fC [slot]\fP"
.PP
Call this method to capture a shortcut from the keyboard. 
.PP
If it succeeds, the capturedShortcut() will be emitted.
.PP
Definition at line 104 of file kkeybutton.cpp.
.PP
References KShortcut::isNull().
.PP
Referenced by KKeyButton().
.SS "void KKeyButton::drawButton (\fBQPainter\fP * _painter)\fC [protected]\fP"
.PP
Reimplemented for internal reasons. 
.PP

.PP
Definition at line 123 of file kkeybutton.cpp.
.PP
References QPointArray::setPoint(), and QPushButton::text().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
