KKeyButton Class Reference
#include <kkeybutton.h>
Inheritance diagram for KKeyButton:

Detailed Description
A push button that looks like a keyboard key.You must call setShortcut() to set the widget's currently displayed key. You can call captureShortcut() to get a new shortcut from the user. If captureShortcut() succeeds, 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 setShortcut() with the new value in order make it the key currently displayed.
- Author:
- Mark Donohoe <donohoe@kde.org>
For internal use only.
Definition at line 40 of file kkeybutton.h.
Public Slots | |
void | captureShortcut () |
Signals | |
void | capturedShortcut (const KShortcut &) |
Public Member Functions | |
KKeyButton (QWidget *parent=0, const char *name=0) | |
virtual | ~KKeyButton () |
void | setShortcut (const KShortcut &cut) KDE_DEPRECATED |
void | setShortcut (const KShortcut &cut, bool bQtShortcut) |
const KShortcut & | shortcut () const |
void | setText (const QString &text) |
Protected Member Functions | |
void | drawButton (QPainter *_painter) |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KShortcut | m_cut |
bool | m_bEditing |
Constructor & Destructor Documentation
KKeyButton::KKeyButton | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
KKeyButton::~KKeyButton | ( | ) | [virtual] |
Member Function Documentation
void KKeyButton::captureShortcut | ( | ) | [slot] |
Call this method to capture a shortcut from the keyboard.
If it succeeds, the capturedShortcut() signal will be emitted.
Definition at line 104 of file kkeybutton.cpp.
void KKeyButton::drawButton | ( | QPainter * | _painter | ) | [protected] |
void KKeyButton::setShortcut | ( | const KShortcut & | cut, | |
bool | bQtShortcut | |||
) |
void KKeyButton::setShortcut | ( | const KShortcut & | cut | ) |
void KKeyButton::setText | ( | const QString & | text | ) |
Reimplemented for internal purposes.
Reimplemented from QPushButton.
Definition at line 98 of file kkeybutton.cpp.
The documentation for this class was generated from the following files: