class KPushButton

A QPushButton with drag-support and KGuiItem support. More...

Definition#include <kpushbutton.h>
InheritsQPushButton (qt) [public ]
Inherited byKDialogBaseButton
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


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]