lib
TKToolBarButton Class Reference
List of all members.Detailed Description
Definition at line 34 of file tktoolbarbutton.h.
Public Slots | |
void | modeChange () |
Signals | |
void | buttonClicked () |
void | buttonPressed () |
void | buttonReleased () |
void | buttonToggled () |
Public Member Functions | |
TKToolBarButton (const QString &icon, const QString &txt, QWidget *parent=0, const char *name=0L, KInstance *_instance=KGlobal::instance()) | |
TKToolBarButton (const QPixmap &, const QString &, QWidget *parent=0, const char *name=0) | |
~TKToolBarButton () | |
void | setIconMode (TK::IconMode) |
void | setRaised (bool) |
void | setAutoRaised (bool) |
void | setEnabled (bool enable=true) |
virtual void | setPixmap (const QPixmap &pixmap) |
virtual void | setPixmap (const QPixmap &pixmap, bool generate) |
virtual void | setDefaultPixmap (const QPixmap &pixmap) |
virtual void | setDisabledPixmap (const QPixmap &pixmap) |
virtual void | setText (const QString &text) |
QString | text () |
virtual void | setIcon (const QString &icon) |
virtual void | setDefaultIcon (const QString &icon) |
virtual void | setDisabledIcon (const QString &icon) |
void | on (bool flag=true) |
void | toggle () |
void | setToggle (bool toggle=true) |
QPopupMenu * | popup () |
void | setPopup (QPopupMenu *p) |
void | setDelayedPopup (QPopupMenu *p, bool toggle=false) |
QPixmap | getActivePixmap () const |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
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 () |
void | makeDefaultPixmap () |
void | makeDisabledPixmap () |
bool | arrowPressed (const QPoint &pos) |
Member Function Documentation
void TKToolBarButton::setEnabled | ( | bool | enable = true |
) |
Enable/Disable this button.
- Parameters:
-
enable Defaults to true
Definition at line 173 of file tktoolbarbutton.cpp.
void TKToolBarButton::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:
-
pixmap The active pixmap
Definition at line 217 of file tktoolbarbutton.cpp.
void TKToolBarButton::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:
-
pixmap The active pixmap generate If true, then the other pixmaps will be automatically generated using configurable effects
Definition at line 222 of file tktoolbarbutton.cpp.
void TKToolBarButton::setDefaultPixmap | ( | const QPixmap & | pixmap | ) | [virtual] |
Force the button to use this pixmap as the default one rather then generating it using effects.
- Parameters:
-
pixmap The pixmap to use as the default (normal) one
Definition at line 242 of file tktoolbarbutton.cpp.
void TKToolBarButton::setDisabledPixmap | ( | const QPixmap & | pixmap | ) | [virtual] |
Force the button to use this pixmap when disabled one rather then generating it using effects.
- Parameters:
-
pixmap The pixmap to use when disabled
Definition at line 248 of file tktoolbarbutton.cpp.
void TKToolBarButton::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:
-
text The button (or tooltip) text
Definition at line 182 of file tktoolbarbutton.cpp.
void TKToolBarButton::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:
-
icon The name of the active pixmap
Definition at line 188 of file tktoolbarbutton.cpp.
void TKToolBarButton::setDefaultIcon | ( | const QString & | icon | ) | [virtual] |
Force the button to use this icon as the default one rather then generating it using effects.
- Parameters:
-
icon The icon to use as the default (normal) one
Definition at line 205 of file tktoolbarbutton.cpp.
void TKToolBarButton::setDisabledIcon | ( | const QString & | icon | ) | [virtual] |
Force the button to use this icon when disabled one rather then generating it using effects.
- Parameters:
-
icon The icon to use when disabled
Definition at line 198 of file tktoolbarbutton.cpp.
void TKToolBarButton::on | ( | bool | flag = true |
) |
Turn this button on or off.
- Parameters:
-
flag true or false
Definition at line 502 of file tktoolbarbutton.cpp.
void TKToolBarButton::toggle | ( | ) |
void TKToolBarButton::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:
-
toggle true or false
Definition at line 513 of file tktoolbarbutton.cpp.
QPopupMenu * TKToolBarButton::popup | ( | ) |
Return a pointer to this button's popup menu (if it exists).
Definition at line 263 of file tktoolbarbutton.cpp.
void TKToolBarButton::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:
-
p The new popup menu
Definition at line 254 of file tktoolbarbutton.cpp.
void TKToolBarButton::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:
-
p the new popup menu toggle if true, makes the button "sticky" (toggled)
Definition at line 268 of file tktoolbarbutton.cpp.
The documentation for this class was generated from the following files: