# class KPushButton | A QPushButton with drag-support. More...
Definition | `#include <kpushbutton.h>`
Inherits | QPushButton (qt) [public ]
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 ()
- void setDragEnabled ( bool enable )
- bool isDragEnabled () const

#### Protected Methods

- virtual QDragObject * dragObject ()
- virtual void mousePressEvent ( QMouseEvent * )
- virtual void mouseMoveEvent ( QMouseEvent * )
- virtual void startDrag ()

## Detailed Description

This is nothing but a QPushButton with drag-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 () | ### ~KPushButton

Destroys 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.

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()

- Author: Carsten Pfeiffer <pfeiffer@kde.org>
- Generated: root@sparc.ports.openbsd.org on Wed May 2 09:37:45 2001, using kdoc 2.0a53.