Plasma
Plasma::ToolButton Class Reference
Provides a plasma-themed QToolButton. More...
#include <Plasma/Widgets/ToolButton>

Signals | |
void | clicked () |
Public Member Functions | |
QAction * | action () const |
bool | autoRaise () const |
QIcon | icon () const |
QString | image () const |
QToolButton * | nativeWidget () const |
void | setAction (QAction *action) |
void | setAutoRaise (bool raise) |
void | setIcon (const QIcon &icon) |
void | setImage (const QString &path) |
void | setStyleSheet (const QString &stylesheet) |
void | setText (const QString &text) |
QString | styleSheet () |
QString | text () const |
ToolButton (QGraphicsWidget *parent=0) | |
~ToolButton () | |
Protected Member Functions | |
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
void | resizeEvent (QGraphicsSceneResizeEvent *event) |
Properties | |
QAction | action |
bool | autoRaise |
QString | image |
QToolButton | nativeWidget |
QGraphicsWidget | parentWidget |
QString | stylesheet |
QString | text |
Detailed Description
Provides a plasma-themed QToolButton.
Definition at line 39 of file toolbutton.h.
Constructor & Destructor Documentation
Plasma::ToolButton::ToolButton | ( | QGraphicsWidget * | parent = 0 |
) | [explicit] |
Definition at line 153 of file toolbutton.cpp.
Plasma::ToolButton::~ToolButton | ( | ) |
Definition at line 172 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::clicked | ( | ) | [signal] |
void Plasma::ToolButton::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 341 of file toolbutton.cpp.
void Plasma::ToolButton::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 361 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.
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 288 of file toolbutton.cpp.
void Plasma::ToolButton::resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | [protected] |
Definition at line 265 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 177 of file toolbutton.cpp.
void Plasma::ToolButton::setAutoRaise | ( | bool | raise | ) |
Sets if the toolbutton has an autoraise behaviour.
- raise
Definition at line 187 of file toolbutton.cpp.
void Plasma::ToolButton::setIcon | ( | const QIcon & | icon | ) |
sets the icon for this toolbutton
- icon the icon we want to use
- Since:
- 4.3
Definition at line 235 of file toolbutton.cpp.
void Plasma::ToolButton::setImage | ( | const QString & | path | ) |
Sets the path to an image to display.
- path the path to the image; if a relative path, then a themed image will be loaded.
Definition at line 207 of file toolbutton.cpp.
void Plasma::ToolButton::setStyleSheet | ( | const QString & | stylesheet | ) |
Sets the stylesheet used to control the visual display of this ToolButton.
- stylesheet a CSS string
Definition at line 250 of file toolbutton.cpp.
void Plasma::ToolButton::setText | ( | const QString & | text | ) |
Sets the display text for this ToolButton.
- text the text to display; should be translated.
Definition at line 197 of file toolbutton.cpp.
QString Plasma::ToolButton::styleSheet | ( | ) |
- Returns:
- the stylesheet currently used with this widget
Definition at line 255 of file toolbutton.cpp.
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.
bool Plasma::ToolButton::autoRaise [read, write] |
Definition at line 45 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: