#include <Plasma/Widgets/ToolButton>

Signals | |
| void | clicked () |
| void | pressed () |
| void | released () |
Public Member Functions | |
| ToolButton (QGraphicsWidget *parent=0) | |
| ~ToolButton () | |
| QAction * | action () const |
| bool | autoRaise () const |
| QIcon | icon () const |
| QString | image () const |
| bool | isDown () const |
| QToolButton * | nativeWidget () const |
| void | setAction (QAction *action) |
| void | setAutoRaise (bool raise) |
| void | setDown (bool down) |
| void | setIcon (const QIcon &icon) |
| void | setImage (const QString &path) |
| void | setImage (const QString &path, const QString &elementid) |
| void | setStyleSheet (const QString &stylesheet) |
| void | setText (const QString &text) |
| QString | styleSheet () |
| QString | text () const |
Protected Member Functions | |
| void | changeEvent (QEvent *event) |
| void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| void | resizeEvent (QGraphicsSceneResizeEvent *event) |
| QSizeF | sizeHint (Qt::SizeHint which, const QSizeF &constraint) const |
Properties | |
| QAction | action |
| qreal | animationUpdate |
| bool | autoRaise |
| bool | down |
| QString | image |
| QToolButton | nativeWidget |
| QGraphicsWidget | parentWidget |
| QString | styleSheet |
| QString | text |
Detailed Description
Provides a plasma-themed QToolButton.
Definition at line 32 of file toolbutton.h.
Constructor & Destructor Documentation
| Plasma::ToolButton::ToolButton | ( | QGraphicsWidget * | parent = 0 | ) | [explicit] |
Definition at line 156 of file toolbutton.cpp.
| Plasma::ToolButton::~ToolButton | ( | ) |
Definition at line 185 of file toolbutton.cpp.
Member Function Documentation
| QAction* Plasma::ToolButton::action | ( | ) | const |
- Returns:
- the currently associated action, if any.
- Since:
- 4.3
| bool Plasma::ToolButton::autoRaise | ( | ) | const |
- Returns:
- true if the toolbutton has an autoraise behaviour
| void Plasma::ToolButton::changeEvent | ( | QEvent * | event | ) | [protected] |
Definition at line 428 of file toolbutton.cpp.
| void Plasma::ToolButton::clicked | ( | ) | [signal] |
| void Plasma::ToolButton::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 385 of file toolbutton.cpp.
| void Plasma::ToolButton::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 406 of file toolbutton.cpp.
| QIcon Plasma::ToolButton::icon | ( | ) | const |
| QString Plasma::ToolButton::image | ( | ) | const |
- Returns:
- the image path being displayed currently, or an empty string if none.
| bool Plasma::ToolButton::isDown | ( | ) | const |
| QVariant Plasma::ToolButton::itemChange | ( | GraphicsItemChange | change, |
| const QVariant & | value | ||
| ) | [protected] |
Definition at line 439 of file toolbutton.cpp.
| QToolButton* Plasma::ToolButton::nativeWidget | ( | ) | const |
- Returns:
- the native widget wrapped by this ToolButton
| void Plasma::ToolButton::paint | ( | QPainter * | painter, |
| const QStyleOptionGraphicsItem * | option, | ||
| QWidget * | widget = 0 |
||
| ) | [protected] |
Definition at line 329 of file toolbutton.cpp.
| void Plasma::ToolButton::pressed | ( | ) | [signal] |
- Since:
- 4.4
| void Plasma::ToolButton::released | ( | ) | [signal] |
- Since:
- 4.4
| void Plasma::ToolButton::resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | [protected] |
Definition at line 306 of file toolbutton.cpp.
| void Plasma::ToolButton::setAction | ( | QAction * | action | ) |
Associate an action with this IconWidget this makes the button follow the state of the action, using its icon, text, etc.
when the button is clicked, it will also trigger the action.
- Since:
- 4.3
Definition at line 201 of file toolbutton.cpp.
| void Plasma::ToolButton::setAutoRaise | ( | bool | raise | ) |
Sets if the toolbutton has an autoraise behaviour.
- Parameters:
-
raise
Definition at line 211 of file toolbutton.cpp.
| void Plasma::ToolButton::setDown | ( | bool | down | ) |
Sets the status of the button to pressed.
- Parameters:
-
down
- Since:
- 4.5
Definition at line 281 of file toolbutton.cpp.
| void Plasma::ToolButton::setIcon | ( | const QIcon & | icon | ) |
sets the icon for this toolbutton
- Parameters:
-
icon the icon we want to use
- Since:
- 4.3
Definition at line 266 of file toolbutton.cpp.
| void Plasma::ToolButton::setImage | ( | const QString & | path | ) |
Sets the path to an image to display.
- Parameters:
-
path the path to the image; if a relative path, then a themed image will be loaded.
Definition at line 232 of file toolbutton.cpp.
| void Plasma::ToolButton::setImage | ( | const QString & | path, |
| const QString & | elementid | ||
| ) |
Sets the path to an svg image to display and the id of the used svg element, if necessary.
- Parameters:
-
path the path to the image; if a relative path, then a themed image will be loaded. elementid the id of a svg element.
- Since:
- 4.4
Definition at line 260 of file toolbutton.cpp.
| void Plasma::ToolButton::setStyleSheet | ( | const QString & | stylesheet | ) |
Sets the stylesheet used to control the visual display of this ToolButton.
- Parameters:
-
stylesheet a CSS string
Definition at line 291 of file toolbutton.cpp.
| void Plasma::ToolButton::setText | ( | const QString & | text | ) |
Sets the display text for this ToolButton.
- Parameters:
-
text the text to display; should be translated.
Definition at line 221 of file toolbutton.cpp.
| QSizeF Plasma::ToolButton::sizeHint | ( | Qt::SizeHint | which, |
| const QSizeF & | constraint | ||
| ) | const [protected] |
Definition at line 450 of file toolbutton.cpp.
| QString Plasma::ToolButton::styleSheet | ( | ) |
- Returns:
- the stylesheet currently used with this widget
| QString Plasma::ToolButton::text | ( | ) | const |
- Returns:
- the display text
Property Documentation
QAction * Plasma::ToolButton::action [read, write] |
Definition at line 49 of file toolbutton.h.
qreal Plasma::ToolButton::animationUpdate [read, write] |
Definition at line 52 of file toolbutton.h.
bool Plasma::ToolButton::autoRaise [read, write] |
Definition at line 45 of file toolbutton.h.
bool Plasma::ToolButton::down [read, write] |
Definition at line 50 of file toolbutton.h.
QString Plasma::ToolButton::image [read, write] |
Definition at line 46 of file toolbutton.h.
QToolButton * Plasma::ToolButton::nativeWidget [read] |
Definition at line 48 of file toolbutton.h.
QGraphicsWidget Plasma::ToolButton::parentWidget [read] |
Definition at line 43 of file toolbutton.h.
QString Plasma::ToolButton::styleSheet [read, write] |
Definition at line 47 of file toolbutton.h.
QString Plasma::ToolButton::text [read, write] |
Definition at line 44 of file toolbutton.h.
The documentation for this class was generated from the following files:
KDE 4.7 API Reference