• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kdeui

KKeyButton Class Reference

A push button that looks like a keyboard key. More...

#include <kkeybutton.h>

Inheritance diagram for KKeyButton:

Inheritance graph
[legend]

List of all members.


Public Slots

void captureShortcut ()

Signals

void capturedShortcut (const KShortcut &)

Public Member Functions

 KKeyButton (QWidget *parent=0, const char *name=0)
void setShortcut (const KShortcut &cut, bool bQtShortcut)
void setShortcut (const KShortcut &cut) KDE_DEPRECATED
void setText (const QString &text)
const KShortcut & shortcut () const
virtual ~KKeyButton ()

Protected Member Functions

void drawButton (QPainter *_painter)
virtual void virtual_hook (int id, void *data)

Protected Attributes

bool m_bEditing
KShortcut m_cut

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.


Constructor & Destructor Documentation

KKeyButton::KKeyButton ( QWidget *  parent = 0,
const char *  name = 0 
)

Constructs key button widget.

Definition at line 68 of file kkeybutton.cpp.

KKeyButton::~KKeyButton (  )  [virtual]

Destructs the key button widget.

Definition at line 78 of file kkeybutton.cpp.


Member Function Documentation

void KKeyButton::capturedShortcut ( const KShortcut &   )  [signal]

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]

Reimplemented for internal reasons.

Definition at line 123 of file kkeybutton.cpp.

void KKeyButton::setShortcut ( const KShortcut &  cut,
bool  bQtShortcut 
)

Since:
3.1

Definition at line 83 of file kkeybutton.cpp.

void KKeyButton::setShortcut ( const KShortcut &  cut  ) 

Deprecated:
Use setShortcut( cut, false ) instead

Definition at line 93 of file kkeybutton.cpp.

void KKeyButton::setText ( const QString &  text  ) 

Reimplemented for internal purposes.

Reimplemented from QPushButton.

Definition at line 98 of file kkeybutton.cpp.

const KShortcut& KKeyButton::shortcut (  )  const [inline]

Definition at line 58 of file kkeybutton.h.

void KKeyButton::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Definition at line 175 of file kkeybutton.cpp.


Member Data Documentation

bool KKeyButton::m_bEditing [protected]

Definition at line 78 of file kkeybutton.h.

KShortcut KKeyButton::m_cut [protected]

Definition at line 77 of file kkeybutton.h.


The documentation for this class was generated from the following files:
  • kkeybutton.h
  • kkeybutton.cpp

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal