.TH "KPushButton" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KPushButton \- This is nothing but a \fBQPushButton\fP with drag-support and KGuiItem support. A \fBQPushButton\fP with drag-support and KGuiItem support.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kpushbutton.h>\fP
.PP
Inherits \fBQPushButton\fP.
.PP
Inherited by \fBKDialogBaseButton\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKPushButton\fP (\fBQWidget\fP *parent, const  char *name=0)"
.br
.RI "\fIDefault constructor. \fP"
.ti -1c
.RI "\fBKPushButton\fP (const  \fBQString\fP &\fBtext\fP, \fBQWidget\fP *parent, const  char *name=0)"
.br
.RI "\fIConstructor, that sets the button-text to \fCtext\fP. \fP"
.ti -1c
.RI "\fBKPushButton\fP (const  \fBQIconSet\fP &icon, const  \fBQString\fP &\fBtext\fP, \fBQWidget\fP *parent, const  char *name=0)"
.br
.RI "\fIConstructor, that sets an icon and the button-text to \fCtext\fP. \fP"
.ti -1c
.RI "\fBKPushButton\fP (const  KGuiItem &item, \fBQWidget\fP *parent, const  char *name=0)"
.br
.RI "\fIConstructor that takes a KGuiItem for the text, the icon, the tooltip and the what's this help. \fP"
.ti -1c
.RI "\fB~KPushButton\fP ()"
.br
.RI "\fIDestructs the button. \fP"
.ti -1c
.RI "void \fBsetDragEnabled\fP (bool enable)"
.br
.RI "\fIEnables/disables drag-support. \fP"
.ti -1c
.RI "bool \fBisDragEnabled\fP () const "
.br
.ti -1c
.RI "void \fBsetGuiItem\fP (const  KGuiItem &item)"
.br
.RI "\fISets the KGuiItem for this button. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual \fBQDragObject\fP * \fBdragObject\fP ()"
.br
.RI "\fIReimplement this and return the \fBQDragObject\fP that should be used for the drag. \fP"
.ti -1c
.RI "virtual void \fBmousePressEvent\fP (\fBQMouseEvent\fP *)"
.br
.RI "\fIReimplemented to add drag-support. \fP"
.ti -1c
.RI "virtual void \fBmouseMoveEvent\fP (\fBQMouseEvent\fP *)"
.br
.RI "\fIReimplemented to add drag-support. \fP"
.ti -1c
.RI "virtual void \fBstartDrag\fP ()"
.br
.RI "\fIStarts a drag (dragCopy() by default) using \fBdragObject\fP(). \fP"
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This is nothing but a \fBQPushButton\fP with drag-support and KGuiItem support. A \fBQPushButton\fP with drag-support and KGuiItem support. 

You have to call \fBsetDragEnabled\fP( true ) and override the virtual method \fBdragObject\fP() to specify the \fBQDragObject\fP to be used.
.PP
\fBAuthor:\fP
.RS 4
Carsten Pfeiffer <pfeiffer@kde.org> 
.RE
.PP

.PP
Definition at line 37 of file kpushbutton.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KPushButton::KPushButton (\fBQWidget\fP * parent, const char * name = 0)"
.PP
Default constructor. Definition at line 37 of file kpushbutton.cpp.
.PP
References KStdAccel::name().
.SS "KPushButton::KPushButton (const \fBQString\fP & text, \fBQWidget\fP * parent, const char * name = 0)"
.PP
Constructor, that sets the button-text to \fCtext\fP. Definition at line 44 of file kpushbutton.cpp.
.PP
References KStdAccel::name().
.SS "KPushButton::KPushButton (const \fBQIconSet\fP & icon, const \fBQString\fP & text, \fBQWidget\fP * parent, const char * name = 0)"
.PP
Constructor, that sets an icon and the button-text to \fCtext\fP. Definition at line 52 of file kpushbutton.cpp.
.PP
References KStdAccel::name().
.SS "KPushButton::KPushButton (const KGuiItem & item, \fBQWidget\fP * parent, const char * name = 0)"
.PP
Constructor that takes a KGuiItem for the text, the icon, the tooltip and the what's this help. Definition at line 60 of file kpushbutton.cpp.
.PP
References KStdAccel::name().
.SS "KPushButton::~\fBKPushButton\fP ()"
.PP
Destructs the button. Definition at line 68 of file kpushbutton.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KPushButton::setDragEnabled (bool enable)"
.PP
Enables/disables drag-support. Default is enabled. Definition at line 130 of file kpushbutton.cpp.
.SS "bool KPushButton::isDragEnabled () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
if drag support is enabled or not. 
.RE
.PP
Definition at line 77 of file kpushbutton.h.
.SS "void KPushButton::setGuiItem (const KGuiItem & item)"
.PP
Sets the KGuiItem for this button. Definition at line 113 of file kpushbutton.cpp.
.PP
References QPushButton::setIconSet(), and QPushButton::setText().
.SS "\fBQDragObject\fP * KPushButton::dragObject ()\fC [protected, virtual]\fP"
.PP
Reimplement this and return the \fBQDragObject\fP that should be used for the drag. Default implementation returns 0L, so that no drag is initiated. Definition at line 158 of file kpushbutton.cpp.
.PP
Referenced by startDrag().
.SS "void KPushButton::mousePressEvent (\fBQMouseEvent\fP *)\fC [protected, virtual]\fP"
.PP
Reimplemented to add drag-support. Definition at line 135 of file kpushbutton.cpp.
.PP
References QMouseEvent::pos().
.SS "void KPushButton::mouseMoveEvent (\fBQMouseEvent\fP *)\fC [protected, virtual]\fP"
.PP
Reimplemented to add drag-support. Definition at line 142 of file kpushbutton.cpp.
.PP
References KGlobalSettings::dndEventDelay(), QMouseEvent::pos(), QPushButton::setDown(), startDrag(), and QMouseEvent::state().
.SS "void KPushButton::startDrag ()\fC [protected, virtual]\fP"
.PP
Starts a drag (dragCopy() by default) using \fBdragObject\fP(). Definition at line 163 of file kpushbutton.cpp.
.PP
References QDragObject::dragCopy(), and dragObject().
.PP
Referenced by mouseMoveEvent().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
