.TH "KKeyButton" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KKeyButton \- A push button that looks like a keyboard key. 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
.RI "\fICall this method to capture a shortcut from the keyboard. \fP"
.in -1c
.SS "Signals"

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

.in +1c
.ti -1c
.RI "\fBKKeyButton\fP (\fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fIConstructs key button widget. \fP"
.ti -1c
.RI "virtual \fB~KKeyButton\fP ()"
.br
.RI "\fIDestructs the key button widget. \fP"
.ti -1c
.RI "void \fBsetShortcut\fP (const  KShortcut &cut)"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP \fP"
.ti -1c
.RI "void \fBsetShortcut\fP (const  KShortcut &cut, bool bQtShortcut)"
.br
.RI "\fI\fBSince:\fP
.RS 4
3.1 
.RE
.PP
\fP"
.ti -1c
.RI "const  KShortcut & \fBshortcut\fP () const "
.br
.ti -1c
.RI "void \fBsetText\fP (const  \fBQString\fP &\fBtext\fP)"
.br
.RI "\fIReimplemented for internal purposes. \fP"
.in -1c
.SS "Protected Member Functions"

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

.in +1c
.ti -1c
.RI "KShortcut \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. 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 41 of file kkeybutton.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KKeyButton::KKeyButton (\fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Constructs key button widget. Definition at line 65 of file kkeybutton.cpp.
.PP
References captureShortcut(), QPushButton::clicked(), KStdAccel::name(), and setShortcut().
.SS "KKeyButton::~\fBKKeyButton\fP ()\fC [virtual]\fP"
.PP
Destructs the key button widget. Definition at line 75 of file kkeybutton.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KKeyButton::setShortcut (const KShortcut & cut)"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP Definition at line 89 of file kkeybutton.cpp.
.PP
References KStdAccel::cut().
.PP
Referenced by KKeyButton().
.SS "void KKeyButton::setShortcut (const KShortcut & cut, bool bQtShortcut)"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 80 of file kkeybutton.cpp.
.PP
References KStdAccel::cut(), QString::isEmpty(), and setText().
.SS "void KKeyButton::setText (const \fBQString\fP & text)"
.PP
Reimplemented for internal purposes. Reimplemented from \fBQPushButton\fP.
.PP
Definition at line 94 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. If it succeeds, the \fBcapturedShortcut\fP() will be emitted.Definition at line 100 of file kkeybutton.cpp.
.PP
References KStdAccel::cut().
.PP
Referenced by KKeyButton().
.SS "void KKeyButton::drawButton (\fBQPainter\fP * _painter)\fC [protected]\fP"
.PP
Reimplemented for internal reasons. Definition at line 115 of file kkeybutton.cpp.
.PP
References QPainter::drawRect(), QPainter::drawRoundRect(), QPainter::setBrush(), QPainter::setClipping(), QPainter::setClipRegion(), QPainter::setPen(), QPointArray::setPoint(), and QPushButton::text().

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