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

tdeui

Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
TDEToolBarButton Class Reference

#include <tdetoolbarbutton.h>

Inherits TQToolButton.

Public Slots

void modeChange ()
 
virtual void setTextLabel (const TQString &, bool tipToo)
 

Signals

void clicked (int)
 
void buttonClicked (int, TQt::ButtonState state)
 
void doubleClicked (int)
 
void pressed (int)
 
void released (int)
 
void toggled (int)
 
void highlighted (int, bool)
 

Public Member Functions

 TDEToolBarButton (const TQString &icon, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null, TDEInstance *_instance=TDEGlobal::instance())
 
 TDEToolBarButton (const TQPixmap &pixmap, int id, TQWidget *parent, const char *name=0L, const TQString &txt=TQString::null)
 
 TDEToolBarButton (TQWidget *parent=0L, const char *name=0L)
 
 ~TDEToolBarButton ()
 
virtual void setPixmap (const TQPixmap &pixmap) TDE_DEPRECATED
 
void setDefaultPixmap (const TQPixmap &pixmap) TDE_DEPRECATED
 
void setDisabledPixmap (const TQPixmap &pixmap) TDE_DEPRECATED
 
virtual void setText (const TQString &text)
 
virtual void setIcon (const TQString &icon)
 
virtual void setIcon (const TQPixmap &pixmap)
 
virtual void setIconSet (const TQIconSet &iconset)
 
TDE_DEPRECATED void setIcon (const TQString &icon, bool generate)
 
void setDefaultIcon (const TQString &icon) TDE_DEPRECATED
 
void setDisabledIcon (const TQString &icon) TDE_DEPRECATED
 
void on (bool flag=true)
 
void toggle ()
 
void setToggle (bool toggle=true)
 
TQPopupMenu * popup ()
 
int id () const
 
void setPopup (TQPopupMenu *p, bool unused=false)
 
void setDelayedPopup (TQPopupMenu *p, bool unused=false)
 
void setRadio (bool f=true)
 
void setNoStyle (bool no_style=true)
 

Protected Slots

void slotClicked ()
 
void slotPressed ()
 
void slotReleased ()
 
void slotToggled ()
 
void slotDelayTimeout ()
 

Protected Member Functions

bool event (TQEvent *e)
 
void paletteChange (const TQPalette &)
 
void leaveEvent (TQEvent *e)
 
void enterEvent (TQEvent *e)
 
void drawButton (TQPainter *p)
 
bool eventFilter (TQObject *o, TQEvent *e)
 
void mousePressEvent (TQMouseEvent *)
 
void mouseReleaseEvent (TQMouseEvent *)
 
void showMenu ()
 
TQSize sizeHint () const
 
TQSize minimumSizeHint () const
 
TQSize minimumSize () const
 
bool isRaised () const
 
bool isActive () const
 
int iconTextMode () const
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

A toolbar button.

This is used internally by TDEToolBar, use the TDEToolBar methods instead.

Definition at line 44 of file tdetoolbarbutton.h.

Constructor & Destructor Documentation

◆ TDEToolBarButton() [1/3]

TDEToolBarButton::TDEToolBarButton ( const TQString &  icon,
int  id,
TQWidget *  parent,
const char *  name = 0L,
const TQString &  txt = TQString::null,
TDEInstance *  _instance = TDEGlobal::instance() 
)

Construct a button with an icon loaded by the button itself.

This will trust the button to load the correct icon with the correct size.

Parameters
iconName of icon to load (may be absolute or relative)
idId of this button
parentThis button's parent
nameThis button's internal name
txtThis button's text (in a tooltip or otherwise)
_instancethe instance to use for this button

Definition at line 115 of file tdetoolbarbutton.cpp.

◆ TDEToolBarButton() [2/3]

TDEToolBarButton::TDEToolBarButton ( const TQPixmap &  pixmap,
int  id,
TQWidget *  parent,
const char *  name = 0L,
const TQString &  txt = TQString::null 
)

Construct a button with an existing pixmap.

It is not recommended that you use this as the internal icon loading code will almost always get it "right".

Parameters
pixmapName of icon to load (may be absolute or relative)
idId of this button
parentThis button's parent
nameThis button's internal name
txtThis button's text (in a tooltip or otherwise)

Definition at line 149 of file tdetoolbarbutton.cpp.

◆ TDEToolBarButton() [3/3]

TDEToolBarButton::TDEToolBarButton ( TQWidget *  parent = 0L,
const char *  name = 0L 
)

Construct a separator button.

Parameters
parentThis button's parent
nameThis button's internal name

Definition at line 105 of file tdetoolbarbutton.cpp.

◆ ~TDEToolBarButton()

TDEToolBarButton::~TDEToolBarButton ( )

Standard destructor.

Definition at line 181 of file tdetoolbarbutton.cpp.

Member Function Documentation

◆ buttonClicked

void TDEToolBarButton::buttonClicked ( int  ,
TQt::ButtonState  state 
)
signal

Emitted when the toolbar button is clicked (with any mouse button)

Parameters
statemakes it possible to find out which button was pressed, and whether any keyboard modifiers were held.
Since
3.4

◆ clicked

void TDEToolBarButton::clicked ( int  )
signal

Emitted when the toolbar button is clicked (with LMB or MMB)

◆ drawButton()

void TDEToolBarButton::drawButton ( TQPainter *  p)
protected

Definition at line 487 of file tdetoolbarbutton.cpp.

◆ enterEvent()

void TDEToolBarButton::enterEvent ( TQEvent *  e)
protected

Definition at line 390 of file tdetoolbarbutton.cpp.

◆ event()

bool TDEToolBarButton::event ( TQEvent *  e)
protected

Definition at line 646 of file tdetoolbarbutton.cpp.

◆ eventFilter()

bool TDEToolBarButton::eventFilter ( TQObject *  o,
TQEvent *  e 
)
protected

Definition at line 411 of file tdetoolbarbutton.cpp.

◆ iconTextMode()

int TDEToolBarButton::iconTextMode ( ) const
protected
Since
3.1

Definition at line 767 of file tdetoolbarbutton.cpp.

◆ id()

int TDEToolBarButton::id ( ) const

Returns the button's id.

Since
3.2

Definition at line 772 of file tdetoolbarbutton.cpp.

◆ isActive()

bool TDEToolBarButton::isActive ( ) const
protected
Since
3.1

Definition at line 762 of file tdetoolbarbutton.cpp.

◆ isRaised()

bool TDEToolBarButton::isRaised ( ) const
protected
Since
3.1

Definition at line 757 of file tdetoolbarbutton.cpp.

◆ leaveEvent()

void TDEToolBarButton::leaveEvent ( TQEvent *  e)
protected

Definition at line 378 of file tdetoolbarbutton.cpp.

◆ minimumSize()

TQSize TDEToolBarButton::minimumSize ( ) const
protected

Definition at line 752 of file tdetoolbarbutton.cpp.

◆ minimumSizeHint()

TQSize TDEToolBarButton::minimumSizeHint ( void  ) const
protected

Definition at line 747 of file tdetoolbarbutton.cpp.

◆ modeChange

void TDEToolBarButton::modeChange ( )
slot

This slot should be called whenever the toolbar mode has potentially changed.

This includes such events as text changing, orientation changing, etc.

Definition at line 186 of file tdetoolbarbutton.cpp.

◆ mousePressEvent()

void TDEToolBarButton::mousePressEvent ( TQMouseEvent *  e)
protected
Since
3.4

Definition at line 454 of file tdetoolbarbutton.cpp.

◆ mouseReleaseEvent()

void TDEToolBarButton::mouseReleaseEvent ( TQMouseEvent *  e)
protected
Since
3.4

Definition at line 468 of file tdetoolbarbutton.cpp.

◆ on()

void TDEToolBarButton::on ( bool  flag = true)

Turn this button on or off.

Parameters
flagtrue or false

Definition at line 715 of file tdetoolbarbutton.cpp.

◆ paletteChange()

void TDEToolBarButton::paletteChange ( const TQPalette &  )
protected

Definition at line 637 of file tdetoolbarbutton.cpp.

◆ popup()

TQPopupMenu * TDEToolBarButton::popup ( )

Return a pointer to this button's popup menu (if it exists)

Definition at line 358 of file tdetoolbarbutton.cpp.

◆ setDefaultIcon()

void TDEToolBarButton::setDefaultIcon ( const TQString &  icon)
Deprecated:
Force the button to use this icon as the default one rather then generating it using effects.
Parameters
iconThe icon to use as the default (normal) one

Definition at line 330 of file tdetoolbarbutton.cpp.

◆ setDefaultPixmap()

void TDEToolBarButton::setDefaultPixmap ( const TQPixmap &  pixmap)
Deprecated:
Force the button to use this pixmap as the default one rather then generating it using effects.
Parameters
pixmapThe pixmap to use as the default (normal) one

Definition at line 316 of file tdetoolbarbutton.cpp.

◆ setDelayedPopup()

void TDEToolBarButton::setDelayedPopup ( TQPopupMenu *  p,
bool  unused = false 
)

Gives this button a delayed popup menu.

This function allows you to add a delayed popup menu to the button. The popup menu is then only displayed when the button is pressed and held down for about half a second.

Parameters
pthe new popup menu
unusedHas no effect - ignore it.

Definition at line 372 of file tdetoolbarbutton.cpp.

◆ setDisabledIcon()

void TDEToolBarButton::setDisabledIcon ( const TQString &  icon)
Deprecated:
Force the button to use this icon when disabled one rather then generating it using effects.
Parameters
iconThe icon to use when disabled

Definition at line 344 of file tdetoolbarbutton.cpp.

◆ setDisabledPixmap()

void TDEToolBarButton::setDisabledPixmap ( const TQPixmap &  pixmap)
Deprecated:
Force the button to use this pixmap when disabled one rather then generating it using effects.
Parameters
pixmapThe pixmap to use when disabled

Definition at line 323 of file tdetoolbarbutton.cpp.

◆ setIcon() [1/3]

virtual void TDEToolBarButton::setIcon ( const TQPixmap &  pixmap)
inlinevirtual
Since
3.1

Definition at line 142 of file tdetoolbarbutton.h.

◆ setIcon() [2/3]

void TDEToolBarButton::setIcon ( const TQString &  icon)
virtual

Set the icon for this button.

The icon will be loaded internally with the correct size. This function is preferred over setIconSet

Parameters
iconThe name of the icon

Definition at line 284 of file tdetoolbarbutton.cpp.

◆ setIcon() [3/3]

TDE_DEPRECATED void TDEToolBarButton::setIcon ( const TQString &  icon,
bool  generate 
)
inline
Deprecated:
Set the active icon for this button. The pixmap itself is loaded internally based on the icon size... .. the disabled and default pixmaps, however will only be constructed if generate is true. This function is preferred over setPixmap
Parameters
iconThe name of the active icon
generateIf true, then the other icons are automagically generated from this one

Definition at line 165 of file tdetoolbarbutton.h.

◆ setIconSet()

void TDEToolBarButton::setIconSet ( const TQIconSet &  iconset)
virtual

Set the pixmaps for this toolbar button from a TQIconSet.

If you call this you don't need to call any of the other methods that set icons or pixmaps.

Parameters
iconsetThe iconset to use

Definition at line 298 of file tdetoolbarbutton.cpp.

◆ setNoStyle()

void TDEToolBarButton::setNoStyle ( bool  no_style = true)

Toolbar buttons naturally will assume the global styles concerning icons, icons sizes, etc.

You can use this function to explicitly turn this off, if you like.

Parameters
no_styleWill disable styles if true

Definition at line 700 of file tdetoolbarbutton.cpp.

◆ setPixmap()

void TDEToolBarButton::setPixmap ( const TQPixmap &  pixmap)
virtual
Deprecated:
Set the pixmap directly for this button. This pixmap should be the active one... the dimmed and disabled pixmaps are constructed based on this one. However, don't use this function unless you are positive that you don't want to use setIcon.
Parameters
pixmapThe active pixmap

Definition at line 304 of file tdetoolbarbutton.cpp.

◆ setPopup()

void TDEToolBarButton::setPopup ( TQPopupMenu *  p,
bool  unused = false 
)

Give this button a popup menu.

There will not be a delay when you press the button. Use setDelayedPopup if you want that behavior.

Parameters
pThe new popup menu
unusedHas no effect - ignore it.

Definition at line 365 of file tdetoolbarbutton.cpp.

◆ setRadio()

void TDEToolBarButton::setRadio ( bool  f = true)

Turn this button into a radio button.

Parameters
ftrue or false

Definition at line 709 of file tdetoolbarbutton.cpp.

◆ setText()

void TDEToolBarButton::setText ( const TQString &  text)
virtual

Set the text for this button.

The text will be either used as a tooltip (IconOnly) or will be along side the icon

Parameters
textThe button (or tooltip) text

Definition at line 278 of file tdetoolbarbutton.cpp.

◆ setTextLabel

void TDEToolBarButton::setTextLabel ( const TQString &  text,
bool  tipToo 
)
virtualslot

Definition at line 265 of file tdetoolbarbutton.cpp.

◆ setToggle()

void TDEToolBarButton::setToggle ( bool  toggle = true)

Turn this button into a toggle button or disable the toggle aspects of it.

This does not toggle the button itself. Use toggle() for that.

Parameters
toggletrue or false

Definition at line 733 of file tdetoolbarbutton.cpp.

◆ showMenu()

void TDEToolBarButton::showMenu ( )
protected

Definition at line 660 of file tdetoolbarbutton.cpp.

◆ sizeHint()

TQSize TDEToolBarButton::sizeHint ( void  ) const
protected

Definition at line 742 of file tdetoolbarbutton.cpp.

◆ slotClicked

void TDEToolBarButton::slotClicked ( )
protectedslot

Definition at line 672 of file tdetoolbarbutton.cpp.

◆ slotDelayTimeout

void TDEToolBarButton::slotDelayTimeout ( )
protectedslot

Definition at line 666 of file tdetoolbarbutton.cpp.

◆ slotPressed

void TDEToolBarButton::slotPressed ( )
protectedslot

Definition at line 685 of file tdetoolbarbutton.cpp.

◆ slotReleased

void TDEToolBarButton::slotReleased ( )
protectedslot

Definition at line 690 of file tdetoolbarbutton.cpp.

◆ slotToggled

void TDEToolBarButton::slotToggled ( )
protectedslot

Definition at line 695 of file tdetoolbarbutton.cpp.

◆ toggle()

void TDEToolBarButton::toggle ( )

Toggle this button.

Definition at line 727 of file tdetoolbarbutton.cpp.

◆ virtual_hook()

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

Definition at line 783 of file tdetoolbarbutton.cpp.


The documentation for this class was generated from the following files:
  • tdetoolbarbutton.h
  • tdetoolbarbutton.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.