#include <kpushbutton.h>
Public Member Functions | |
KPushButton (TQWidget *parent, const char *name=0) | |
KPushButton (const TQString &text, TQWidget *parent, const char *name=0) | |
KPushButton (const TQIconSet &icon, const TQString &text, TQWidget *parent, const char *name=0) | |
KPushButton (const KGuiItem &item, TQWidget *parent, const char *name=0) | |
~KPushButton () | |
void | setDragEnabled (bool enable) |
bool | isDragEnabled () const |
void | setGuiItem (const KGuiItem &item) |
void | setGuiItem (KStdGuiItem::StdItem item) |
KStdGuiItem::StdItem | guiItem () const |
void | setGuiItm (int itm) |
int | guiItm () const |
void | setIconSet (const TQIconSet &iconSet) |
void | setText (const TQString &text) |
Protected Member Functions | |
virtual TQDragObject * | dragObject () |
virtual void | mousePressEvent (TQMouseEvent *) |
virtual void | mouseMoveEvent (TQMouseEvent *) |
virtual void | startDrag () |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
This is nothing but a TQPushButton with drag-support and KGuiItem support.
You have to call setDragEnabled( true ) and override the virtual method dragObject() to specify the TQDragObject to be used.
A TQPushButton with drag-support and KGuiItem support
Definition at line 37 of file kpushbutton.h.
Constructor & Destructor Documentation
◆ KPushButton() [1/4]
KPushButton::KPushButton | ( | TQWidget * | parent, |
const char * | name = 0 |
||
) |
Default constructor.
Definition at line 43 of file kpushbutton.cpp.
◆ KPushButton() [2/4]
KPushButton::KPushButton | ( | const TQString & | text, |
TQWidget * | parent, | ||
const char * | name = 0 |
||
) |
Constructor, that sets the button-text to text
.
Definition at line 50 of file kpushbutton.cpp.
◆ KPushButton() [3/4]
KPushButton::KPushButton | ( | const TQIconSet & | icon, |
const TQString & | text, | ||
TQWidget * | parent, | ||
const char * | name = 0 |
||
) |
Constructor, that sets an icon and the button-text to text
.
Definition at line 58 of file kpushbutton.cpp.
◆ KPushButton() [4/4]
KPushButton::KPushButton | ( | const KGuiItem & | item, |
TQWidget * | parent, | ||
const char * | name = 0 |
||
) |
Constructor that takes a KGuiItem for the text, the icon, the tooltip and the what's this help.
Definition at line 66 of file kpushbutton.cpp.
◆ ~KPushButton()
KPushButton::~KPushButton | ( | ) |
Destructs the button.
Definition at line 74 of file kpushbutton.cpp.
Member Function Documentation
◆ dragObject()
|
protectedvirtual |
Reimplement this and return the TQDragObject that should be used for the drag.
Default implementation returns 0L, so that no drag is initiated.
Definition at line 205 of file kpushbutton.cpp.
◆ guiItem()
KStdGuiItem::StdItem KPushButton::guiItem | ( | ) | const |
Reads the standard KGuiItem for this button.
- Since
- 3.4
Definition at line 143 of file kpushbutton.cpp.
◆ isDragEnabled()
|
inline |
- Returns
- if drag support is enabled or not.
Definition at line 80 of file kpushbutton.h.
◆ mouseMoveEvent()
|
protectedvirtual |
Reimplemented to add drag-support.
Definition at line 188 of file kpushbutton.cpp.
◆ mousePressEvent()
|
protectedvirtual |
Reimplemented to add drag-support.
Definition at line 181 of file kpushbutton.cpp.
◆ setDragEnabled()
void KPushButton::setDragEnabled | ( | bool | enable | ) |
◆ setGuiItem() [1/2]
void KPushButton::setGuiItem | ( | const KGuiItem & | item | ) |
Sets the KGuiItem for this button.
Definition at line 120 of file kpushbutton.cpp.
◆ setGuiItem() [2/2]
void KPushButton::setGuiItem | ( | KStdGuiItem::StdItem | item | ) |
Sets the standard KGuiItem for this button.
- Since
- 3.4
Definition at line 137 of file kpushbutton.cpp.
◆ setIconSet()
void KPushButton::setIconSet | ( | const TQIconSet & | iconSet | ) |
Sets the Icon Set for this button.
It also takes into account hte TDEGlobalSettings::showIconsOnPushButtons() setting.
Definition at line 160 of file kpushbutton.cpp.
◆ setText()
void KPushButton::setText | ( | const TQString & | text | ) |
Sets the text of the button.
Definition at line 148 of file kpushbutton.cpp.
◆ startDrag()
|
protectedvirtual |
Starts a drag (dragCopy() by default) using dragObject()
Definition at line 210 of file kpushbutton.cpp.
The documentation for this class was generated from the following files: