• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Member Functions | Protected Member Functions | List of all members
KPushButton Class Reference

#include <kpushbutton.h>

Inheritance diagram for KPushButton:
KDialogBaseButton

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

Author
Carsten Pfeiffer pfeif.nosp@m.fer@.nosp@m.kde.o.nosp@m.rg

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

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

◆ guiItm()

int KPushButton::guiItm ( ) const
inline

Definition at line 101 of file kpushbutton.h.

◆ isDragEnabled()

bool KPushButton::isDragEnabled ( ) const
inline
Returns
if drag support is enabled or not.

Definition at line 80 of file kpushbutton.h.

◆ mouseMoveEvent()

void KPushButton::mouseMoveEvent ( TQMouseEvent *  e)
protectedvirtual

Reimplemented to add drag-support.

Definition at line 188 of file kpushbutton.cpp.

◆ mousePressEvent()

void KPushButton::mousePressEvent ( TQMouseEvent *  e)
protectedvirtual

Reimplemented to add drag-support.

Definition at line 181 of file kpushbutton.cpp.

◆ setDragEnabled()

void KPushButton::setDragEnabled ( bool  enable)

Enables/disables drag-support.

Default is disabled.

Definition at line 176 of file kpushbutton.cpp.

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

◆ setGuiItm()

void KPushButton::setGuiItm ( int  itm)
inline

Definition at line 100 of file kpushbutton.h.

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

void KPushButton::startDrag ( )
protectedvirtual

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

Definition at line 210 of file kpushbutton.cpp.

◆ virtual_hook()

void KPushButton::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 217 of file kpushbutton.cpp.


The documentation for this class was generated from the following files:
  • kpushbutton.h
  • kpushbutton.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.