class KToolBarButton

A toolbar button. More...

Internal Use Only
Definition#include <ktoolbarbutton.h>
InheritsQToolButton
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Protected Methods

Protected Slots


Detailed Description

A toolbar button. This is used internally by KToolBar, use the KToolBar methods instead.

 KToolBarButton (const QString& icon, int id, QWidget *parent, const char *name=0L, const QString &txt=QString::null, KInstance *_instance = KGlobal::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:

 KToolBarButton (const QPixmap& pixmap, int id, QWidget *parent, const char *name=0L, const QString &txt=QString::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:

 KToolBarButton (QWidget *parent=0L, const char *name=0L)

Construct a separator button

Parameters:

KToolBarButton ()

Standard destructor

void  setEnabled (bool enable = true)

Enable/Disable this button

Parameters:

void  setPixmap (const QPixmap &pixmap)

[virtual]

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:

void  setPixmap (const QPixmap &pixmap, bool generate)

[virtual]

Set the pixmap directly for this button. This pixmap should be the active one.. however, the disabled and default pixmaps will only be constructed if generate is true. In any event, don't use this function unless you are positive that you don't want to use setIcon.

Parameters:

void  setDefaultPixmap (const QPixmap& pixmap)

[virtual]

Force the button to use this pixmap as the default one rather then generating it using effects.

Parameters:

void  setDisabledPixmap (const QPixmap& pixmap)

[virtual]

Force the button to use this pixmap when disabled one rather then generating it using effects.

Parameters:

void  setText (const QString &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:

void  setIcon (const QString &icon)

[virtual]

Set the icon for this button. This icon should be the active one... the dimmed and disabled icons are constructed based on this one. The actual pixmap will be loaded internally. This function is preferred over setPixmap

Parameters:

void  setIcon (const QString &icon, bool generate)

[virtual]

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:

void  setDefaultIcon (const QString& icon)

[virtual]

Force the button to use this icon as the default one rather then generating it using effects.

Parameters:

void  setDisabledIcon (const QString& icon)

[virtual]

Force the button to use this icon when disabled one rather then generating it using effects.

Parameters:

void  on (bool flag = true)

Turn this button on or off

Parameters:

void  toggle ()

Toggle this button

void  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:

QPopupMenupopup ()

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

void  setPopup (QPopupMenu *p)

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:

void  setDelayedPopup (QPopupMenu *p, bool toggle = 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. You can also make the poup-menu "sticky", i.e. visible until a selection is made or the mouse is clikced elsewhere, by simply setting the second argument to true. This "sticky" button feature allows you to make a selection without having to press and hold down the mouse while making a selection.

Parameters:

void  setRadio (bool f = true)

Turn this button into a radio button

Parameters:

void  setNoStyle (bool no_style = true)

Toolbar buttons naturally will assume the global styles concerning icons, icons sizes, etc. You can use this function to explicitely turn this off, if you like.

Parameters:

void  clicked (int)

[signal]

void  doubleClicked (int)

[signal]

void  pressed (int)

[signal]

void  released (int)

[signal]

void  toggled (int)

[signal]

void  highlighted (int, bool)

[signal]

void  modeChange ()

[slot]

This slot should be called whenever the toolbar mode has potentially changed. This includes such events as text changing, orientation changing, etc.

void  setTextLabel (const QString&)

[virtual slot]

void  paletteChange (const QPalette &)

[protected]

void  leaveEvent (QEvent *e)

[protected]

void  enterEvent (QEvent *e)

[protected]

void  drawButton (QPainter *p)

[protected]

bool  eventFilter (QObject *o, QEvent *e)

[protected]

void  showMenu ()

[protected]

void  makeDefaultPixmap ()

[protected]

void  makeDisabledPixmap ()

[protected]

void  slotClicked ()

[protected slot]

void  slotPressed ()

[protected slot]

void  slotReleased ()

[protected slot]

void  slotToggled ()

[protected slot]

void  slotDelayTimeout ()

[protected slot]


Generated by: baudens@ke.mandrakesoft.com on Thu Oct 26 17:36:26 2000, using kdoc 2.0a40.