Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KPushButton Class Reference

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

#include <kpushbutton.h>

Inheritance diagram for KPushButton:

KDialogBaseButton List of all members.

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

Detailed Description

A QPushButton with drag-support and KGuiItem support.

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.

Author:
Carsten Pfeiffer <pfeiffer@kde.org>

Definition at line 37 of file kpushbutton.h.


Constructor & Destructor Documentation

KPushButton::KPushButton QWidget *    parent,
const char *    name = 0
 

Default constructor.

KPushButton::KPushButton const QString &    text,
QWidget *    parent,
const char *    name = 0
 

Constructor, that sets the button-text to text

KPushButton::KPushButton const QIconSet &    icon,
const QString &    text,
QWidget *    parent,
const char *    name = 0
 

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

KPushButton::KPushButton const KGuiItem &    item,
QWidget *    parent,
const char *    name = 0
 

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

KPushButton::~KPushButton  
 

Destructs the button.


Member Function Documentation

virtual QDragObject* KPushButton::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.

bool KPushButton::isDragEnabled   const [inline]
 

Returns:
if drag support is enabled or not.

Definition at line 77 of file kpushbutton.h.

virtual void KPushButton::mouseMoveEvent QMouseEvent *    [protected, virtual]
 

Reimplemented to add drag-support

virtual void KPushButton::mousePressEvent QMouseEvent *    [protected, virtual]
 

Reimplemented to add drag-support

void KPushButton::setDragEnabled bool    enable
 

Enables/disables drag-support. Default is enabled.

void KPushButton::setGuiItem const KGuiItem &    item
 

Sets the KGuiItem for this button.

virtual void KPushButton::startDrag   [protected, virtual]
 

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


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:21 2003 for kdelibs by doxygen1.2.18