class KPushButton

# class KPushButton | A QPushButton with drag-support and KGuiItem support. More...
Definition | `#include <kpushbutton.h>`
Inherits | QPushButton (qt) [public ]
Inherited by | KDialogBaseButton
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KPushButton ( QWidget *parent, const char *name=0 )
- KPushButton ( const QString &text, QWidget *parent, const char *name=0)
- KPushButton ( const QIconSet &icon, const QString &text, QWidget *parent, const char *name=0 )
- KPushButton ( const KGuiItem &item, QWidget *parent, const char *name = 0 )
- ~KPushButton ()
- void setDragEnabled ( bool enable )
- bool isDragEnabled () const
- void setGuiItem ( const KGuiItem& item )

#### Protected Methods

- virtual QDragObject * dragObject ()
- virtual void mousePressEvent ( QMouseEvent * )
- virtual void mouseMoveEvent ( QMouseEvent * )
- virtual void startDrag ()
- virtual void virtual_hook ( int id, void* data )

## Detailed Description

This is nothing but a QPushButton with drag-support and KGuiItem support. You have to call setDragEnabled( true ) and override the virtual method dragObject() to specify the QDragObject to be used.

KPushButton ( QWidget *parent, const char *name=0 ) | ### KPushButton

Default constructor.

KPushButton ( const QString &text, QWidget *parent, const char *name=0) | ### KPushButton

Constructor, that sets the button-text to `text`

KPushButton ( const QIconSet &icon, const QString &text, QWidget *parent, const char *name=0 ) | ### KPushButton

Constructor, that sets an icon and the button-text to `text`

KPushButton ( const KGuiItem &item, QWidget *parent, const char *name = 0 ) | ### KPushButton

Constructor that takes a KGuiItem for the text, the icon, the tooltip and the what's this help

~KPushButton () | ### ~KPushButton

Destructs the button.

void setDragEnabled ( bool enable ) | ### setDragEnabled

Enables/disables drag-support. Default is enabled.

bool isDragEnabled () | ### isDragEnabled

[const]

Returns: if drag support is enabled or not.

void setGuiItem ( const KGuiItem& item ) | ### setGuiItem

Sets the KGuiItem for this button.

QDragObject * dragObject () | ### dragObject

[protected virtual]

Reimplement this and return the QDragObject that should be used for the drag. Default implementation returns 0L, so that no drag is initiated.

void mousePressEvent ( QMouseEvent * ) | ### mousePressEvent

[protected virtual]

Reimplemented to add drag-support

void mouseMoveEvent ( QMouseEvent * ) | ### mouseMoveEvent

[protected virtual]

Reimplemented to add drag-support

void startDrag () | ### startDrag

[protected virtual]

Starts a drag (dragCopy() by default) using dragObject()

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

- Author: Carsten Pfeiffer
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.