KKeyButton Class Reference
A push button that looks like a keyboard key. A push button that looks like a keyboard key. More...
#include <kkeybutton.h>
Inheritance diagram for KKeyButton:


Public Slots | |
void | captureShortcut () |
Call this method to capture a shortcut from the keyboard. | |
Signals | |
void | capturedShortcut (const KShortcut &) |
Public Member Functions | |
KKeyButton (QWidget *parent=0, const char *name=0) | |
Constructs key button widget. | |
virtual | ~KKeyButton () |
Destructs the key button widget. | |
void | setShortcut (const KShortcut &cut) |
This class or method is obsolete, it is provided for compatibility only. | |
void | setShortcut (const KShortcut &cut, bool bQtShortcut) |
| |
const KShortcut & | shortcut () const |
void | setText (const QString &text) |
Reimplemented for internal purposes. | |
Protected Member Functions | |
void | drawButton (QPainter *_painter) |
Reimplemented for internal reasons. | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KShortcut | m_cut |
bool | m_bEditing |
Detailed Description
A push button that looks like a keyboard key. 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() 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 setShortcut() with the new value in order make it the key currently displayed.
- Author:
- Mark Donohoe <donohoe@kde.org>
Definition at line 41 of file kkeybutton.h.
Constructor & Destructor Documentation
|
Constructs key button widget.
Definition at line 65 of file kkeybutton.cpp. References captureShortcut(), QPushButton::clicked(), KStdAccel::name(), and setShortcut(). |
|
Destructs the key button widget.
Definition at line 75 of file kkeybutton.cpp. |
Member Function Documentation
|
This class or method is obsolete, it is provided for compatibility only.
Definition at line 89 of file kkeybutton.cpp. References KStdAccel::cut(). Referenced by KKeyButton(). |
|
Definition at line 80 of file kkeybutton.cpp. References KStdAccel::cut(), QString::isEmpty(), and setText(). |
|
Reimplemented for internal purposes.
Reimplemented from QPushButton. Definition at line 94 of file kkeybutton.cpp. References QPushButton::setText(). Referenced by setShortcut(). |
|
Call this method to capture a shortcut from the keyboard. If it succeeds, the capturedShortcut() will be emitted. Definition at line 100 of file kkeybutton.cpp. References KStdAccel::cut(). Referenced by KKeyButton(). |
|
Reimplemented for internal reasons.
Definition at line 115 of file kkeybutton.cpp. References QPainter::drawRect(), QPainter::drawRoundRect(), QPainter::setBrush(), QPainter::setClipping(), QPainter::setClipRegion(), QPainter::setPen(), QPointArray::setPoint(), and QPushButton::text(). |
The documentation for this class was generated from the following files: