org.kde.koala

Class KToolBarButton

public class KToolBarButton extends QToolButton

A toolbar button. This is used internally by KToolBar, use the KToolBar methods instead. See KToolBarButtonSignals for signals emitted by KToolBarButton

UNKNOWN: A toolbar button.

Constructor Summary
protected KToolBarButton(Class dummy)
KToolBarButton(String icon, int id, QWidget parent, String name, String txt, KInstanceInterface _instance)
Construct a button with an icon loaded by the button itself.
KToolBarButton(String icon, int id, QWidget parent, String name, String txt)
KToolBarButton(String icon, int id, QWidget parent, String name)
KToolBarButton(String icon, int id, QWidget parent)
KToolBarButton(QPixmap pixmap, int id, QWidget parent, String name, String txt)
Construct a button with an existing pixmap.
KToolBarButton(QPixmap pixmap, int id, QWidget parent, String name)
KToolBarButton(QPixmap pixmap, int id, QWidget parent)
KToolBarButton(QWidget parent, String name)
Construct a separator button
KToolBarButton(QWidget parent)
KToolBarButton()
Method Summary
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voiddrawButton(QPainter p)
protected voidenterEvent(QEvent e)
booleanevent(QEvent e)
booleaneventFilter(QObject o, QEvent e)
protected voidfinalize()
Deletes the wrapped C++ instance
protected inticonTextMode()
intid()
Returns the button's id.
protected booleanisActive()
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected booleanisRaised()
protected voidleaveEvent(QEvent e)
QMetaObjectmetaObject()
QSizeminimumSize()
QSizeminimumSizeHint()
voidmodeChange()
This slot should be called whenever the toolbar mode has potentially changed.
protected voidmousePressEvent(QMouseEvent arg1)
protected voidmouseReleaseEvent(QMouseEvent arg1)
voidon(boolean flag)
Turn this button on or off
voidon()
protected voidpaletteChange(QPalette arg1)
QPopupMenupopup()
Return a pointer to this button's popup menu (if it exists)
voidsetDelayedPopup(QPopupMenu p, boolean unused)
Gives this button a delayed popup menu.
voidsetDelayedPopup(QPopupMenu p)
voidsetIcon(String icon)
Set the icon for this button.
voidsetIcon(QPixmap pixmap)
voidsetIconSet(QIconSet iconset)
Set the pixmaps for this toolbar button from a QIconSet.
voidsetNoStyle(boolean no_style)
Toolbar buttons naturally will assume the global styles concerning icons, icons sizes, etc.
voidsetNoStyle()
voidsetPopup(QPopupMenu p, boolean unused)
Give this button a popup menu.
voidsetPopup(QPopupMenu p)
voidsetRadio(boolean f)
Turn this button into a radio button
voidsetRadio()
voidsetText(String text)
Set the text for this button.
voidsetTextLabel(String arg1, boolean tipToo)
voidsetToggle(boolean toggle)
Turn this button into a toggle button or disable the toggle aspects of it.
voidsetToggle()
protected voidshowMenu()
QSizesizeHint()
protected voidslotClicked()
protected voidslotDelayTimeout()
protected voidslotPressed()
protected voidslotReleased()
protected voidslotToggled()
voidtoggle()
Toggle this button

Constructor Detail

KToolBarButton

protected KToolBarButton(Class dummy)

KToolBarButton

public KToolBarButton(String icon, int id, QWidget parent, String name, String txt, KInstanceInterface _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: icon Name of icon to load (may be absolute or relative) id Id of this button parent This button's parent name This button's internal name txt This button's text (in a tooltip or otherwise) _instance the instance to use for this button

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

KToolBarButton

public KToolBarButton(String icon, int id, QWidget parent, String name, String txt)

KToolBarButton

public KToolBarButton(String icon, int id, QWidget parent, String name)

KToolBarButton

public KToolBarButton(String icon, int id, QWidget parent)

KToolBarButton

public KToolBarButton(QPixmap pixmap, int id, QWidget parent, String name, String txt)
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: pixmap Name of icon to load (may be absolute or relative) id Id of this button parent This button's parent name This button's internal name txt This button's text (in a tooltip or otherwise)

UNKNOWN: Construct a button with an existing pixmap.

KToolBarButton

public KToolBarButton(QPixmap pixmap, int id, QWidget parent, String name)

KToolBarButton

public KToolBarButton(QPixmap pixmap, int id, QWidget parent)

KToolBarButton

public KToolBarButton(QWidget parent, String name)
Construct a separator button

Parameters: parent This button's parent name This button's internal name

UNKNOWN: Construct a separator button

KToolBarButton

public KToolBarButton(QWidget parent)

KToolBarButton

public KToolBarButton()

Method Detail

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

drawButton

protected void drawButton(QPainter p)

enterEvent

protected void enterEvent(QEvent e)

event

public boolean event(QEvent e)

eventFilter

public boolean eventFilter(QObject o, QEvent e)

finalize

protected void finalize()
Deletes the wrapped C++ instance

iconTextMode

protected int iconTextMode()

id

public int id()
Returns the button's id.

UNKNOWN: Returns the button's id.

isActive

protected boolean isActive()

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isRaised

protected boolean isRaised()

leaveEvent

protected void leaveEvent(QEvent e)

metaObject

public QMetaObject metaObject()

minimumSize

public QSize minimumSize()

minimumSizeHint

public QSize minimumSizeHint()

modeChange

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

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

mousePressEvent

protected void mousePressEvent(QMouseEvent arg1)

mouseReleaseEvent

protected void mouseReleaseEvent(QMouseEvent arg1)

on

public void on(boolean flag)
Turn this button on or off

Parameters: flag true or false

UNKNOWN: Turn this button on or off

on

public void on()

paletteChange

protected void paletteChange(QPalette arg1)

popup

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

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

setDelayedPopup

public void setDelayedPopup(QPopupMenu p, boolean unused)
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: p the new popup menu unused Has no effect - ignore it.

UNKNOWN: Gives this button a delayed popup menu.

setDelayedPopup

public void setDelayedPopup(QPopupMenu p)

setIcon

public void setIcon(String icon)
Set the icon for this button. The icon will be loaded internally with the correct size. This function is preferred over setIconSet

Parameters: icon The name of the icon

UNKNOWN: Set the icon for this button.

setIcon

public void setIcon(QPixmap pixmap)

setIconSet

public void setIconSet(QIconSet iconset)
Set the pixmaps for this toolbar button from a QIconSet. If you call this you don't need to call any of the other methods that set icons or pixmaps.

Parameters: iconset The iconset to use

UNKNOWN: Set the pixmaps for this toolbar button from a QIconSet.

setNoStyle

public void setNoStyle(boolean no_style)
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_style Will disable styles if true

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

setNoStyle

public void setNoStyle()

setPopup

public void setPopup(QPopupMenu p, boolean unused)
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: p The new popup menu unused Has no effect - ignore it.

UNKNOWN: Give this button a popup menu.

setPopup

public void setPopup(QPopupMenu p)

setRadio

public void setRadio(boolean f)
Turn this button into a radio button

Parameters: f true or false

UNKNOWN: Turn this button into a radio button

setRadio

public void setRadio()

setText

public void setText(String text)
Set the text for this button. The text will be either used as a tooltip (IconOnly) or will be along side the icon

Parameters: text The button (or tooltip) text

UNKNOWN: Set the text for this button.

setTextLabel

public void setTextLabel(String arg1, boolean tipToo)

setToggle

public void setToggle(boolean toggle)
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: toggle true or false

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

setToggle

public void setToggle()

showMenu

protected void showMenu()

sizeHint

public QSize sizeHint()

slotClicked

protected void slotClicked()

slotDelayTimeout

protected void slotDelayTimeout()

slotPressed

protected void slotPressed()

slotReleased

protected void slotReleased()

slotToggled

protected void slotToggled()

toggle

public void toggle()
Toggle this button

UNKNOWN: Toggle this button