KToolBarButton Class Reference
A toolbar button. More...
#include <ktoolbarbutton.h>
Inheritance diagram for KToolBarButton:

Public Slots | |
void | modeChange () |
virtual void | setTextLabel (const QString &, bool tipToo) |
Signals | |
void | clicked (int) |
void | doubleClicked (int) |
void | pressed (int) |
void | released (int) |
void | toggled (int) |
void | highlighted (int, bool) |
Public Member Functions | |
KToolBarButton (const QString &icon, int id, QWidget *parent, const char *name=0L, const QString &txt=QString::null, KInstance *_instance=KGlobal::instance()) | |
KToolBarButton (const QPixmap &pixmap, int id, QWidget *parent, const char *name=0L, const QString &txt=QString::null) | |
KToolBarButton (QWidget *parent=0L, const char *name=0L) | |
~KToolBarButton () | |
virtual void | setPixmap (const QPixmap &pixmap) KDE_DEPRECATED |
void | setDefaultPixmap (const QPixmap &pixmap) KDE_DEPRECATED |
void | setDisabledPixmap (const QPixmap &pixmap) KDE_DEPRECATED |
virtual void | setText (const QString &text) |
virtual void | setIcon (const QString &icon) |
virtual void | setIcon (const QPixmap &pixmap) |
virtual void | setIconSet (const QIconSet &iconset) |
KDE_DEPRECATED void | setIcon (const QString &icon, bool generate) |
void | setDefaultIcon (const QString &icon) KDE_DEPRECATED |
void | setDisabledIcon (const QString &icon) KDE_DEPRECATED |
void | on (bool flag=true) |
void | toggle () |
void | setToggle (bool toggle=true) |
QPopupMenu * | popup () |
int | id () const |
void | setPopup (QPopupMenu *p, bool unused=false) |
void | setDelayedPopup (QPopupMenu *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 | |
void | paletteChange (const QPalette &) |
void | leaveEvent (QEvent *e) |
void | enterEvent (QEvent *e) |
void | drawButton (QPainter *p) |
bool | eventFilter (QObject *o, QEvent *e) |
void | showMenu () |
QSize | sizeHint () const |
QSize | minimumSizeHint () const |
QSize | 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 KToolBar, use the KToolBar methods instead.
Definition at line 45 of file ktoolbarbutton.h.
Constructor & Destructor Documentation
|
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.
Definition at line 107 of file ktoolbarbutton.cpp. References KToolBarButton(), and modeChange(). Referenced by KToolBarButton(). |
|
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".
Definition at line 141 of file ktoolbarbutton.cpp. References KToolBarButton(), modeChange(), and setIconSet(). |
|
Construct a separator button.
Definition at line 97 of file ktoolbarbutton.cpp. References KToolBarButton(). |
|
Standard destructor.
Definition at line 173 of file ktoolbarbutton.cpp. |
Member Function Documentation
|
Definition at line 296 of file ktoolbarbutton.cpp. References setPixmap(). Referenced by KToolBar::setButtonPixmap(), and setPixmap(). |
|
Definition at line 308 of file ktoolbarbutton.cpp. References setDefaultPixmap(). Referenced by setDefaultPixmap(). |
|
Definition at line 315 of file ktoolbarbutton.cpp. References setDisabledPixmap(). Referenced by setDisabledPixmap(). |
|
Set the text for this button. The text will be either used as a tooltip (IconOnly) or will be along side the icon
Definition at line 270 of file ktoolbarbutton.cpp. References modeChange(), and setText(). Referenced by setText(). |
|
Set the icon for this button. The icon will be loaded internally with the correct size. This function is preferred over setIconSet
Definition at line 276 of file ktoolbarbutton.cpp. References setIcon(). Referenced by modeChange(), KToolBar::setButtonIcon(), and setIcon(). |
|
Definition at line 141 of file ktoolbarbutton.h. |
|
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.
Definition at line 290 of file ktoolbarbutton.cpp. References setIconSet(). Referenced by KToolBarButton(), KToolBar::setButtonIconSet(), and setIconSet(). |
|
Definition at line 164 of file ktoolbarbutton.h. |
|
Definition at line 322 of file ktoolbarbutton.cpp. References setDefaultIcon(). Referenced by setDefaultIcon(). |
|
Definition at line 336 of file ktoolbarbutton.cpp. References setDisabledIcon(). Referenced by setDisabledIcon(). |
|
Turn this button on or off.
Definition at line 651 of file ktoolbarbutton.cpp. References on(). Referenced by on(), and KToolBar::setButton(). |
|
Toggle this button.
Definition at line 663 of file ktoolbarbutton.cpp. Referenced by KToolBar::toggleButton(). |
|
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.
Definition at line 669 of file ktoolbarbutton.cpp. References setToggle(). Referenced by setToggle(), and KToolBar::setToggle(). |
|
Return a pointer to this button's popup menu (if it exists).
Definition at line 350 of file ktoolbarbutton.cpp. |
|
Returns the button's id.
Definition at line 708 of file ktoolbarbutton.cpp. |
|
Give this button a popup menu. There will not be a delay when you press the button. Use setDelayedPopup if you want that behavior.
Definition at line 357 of file ktoolbarbutton.cpp. References setPopup(). Referenced by KToolBar::insertButton(), KToolBarPopupAction::plug(), KActionMenu::plug(), and setPopup(). |
|
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.
Definition at line 364 of file ktoolbarbutton.cpp. References setDelayedPopup(). Referenced by setDelayedPopup(), and KToolBar::setDelayedPopup(). |
|
Turn this button into a radio button.
Definition at line 645 of file ktoolbarbutton.cpp. References setRadio(). Referenced by KToolBarRadioGroup::addButton(), and setRadio(). |
|
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.
Definition at line 636 of file ktoolbarbutton.cpp. References modeChange(), and setNoStyle(). Referenced by KToolBar::setItemNoStyle(), and setNoStyle(). |
|
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 178 of file ktoolbarbutton.cpp. References setIcon(), and KGlobalSettings::toolBarFont(). Referenced by KToolBarButton(), setNoStyle(), and setText(). |
|
Definition at line 693 of file ktoolbarbutton.cpp. |
|
Definition at line 698 of file ktoolbarbutton.cpp. |
|
Definition at line 703 of file ktoolbarbutton.cpp. |
The documentation for this class was generated from the following files: