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

Signals | |
void | clicked () |
Public Member Functions | |
QString | image () const |
KPushButton * | nativeWidget () const |
PushButton (QGraphicsWidget *parent=0) | |
void | setImage (const QString &path) |
void | setStyleSheet (const QString &stylesheet) |
void | setText (const QString &text) |
QString | styleSheet () |
QString | text () const |
~PushButton () | |
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 | |
QString | image |
KPushButton | nativeWidget |
QGraphicsWidget | parentWidget |
QString | stylesheet |
QString | text |
Detailed Description
Provides a plasma-themed KPushButton.Definition at line 39 of file pushbutton.h.
Constructor & Destructor Documentation
Plasma::PushButton::PushButton | ( | QGraphicsWidget * | parent = 0 |
) | [explicit] |
Definition at line 140 of file pushbutton.cpp.
Plasma::PushButton::~PushButton | ( | ) |
Definition at line 158 of file pushbutton.cpp.
Member Function Documentation
void Plasma::PushButton::clicked | ( | ) | [signal] |
void Plasma::PushButton::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 358 of file pushbutton.cpp.
void Plasma::PushButton::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 378 of file pushbutton.cpp.
QString Plasma::PushButton::image | ( | ) | const |
- Returns:
- the image path being displayed currently, or an empty string if none.
KPushButton* Plasma::PushButton::nativeWidget | ( | ) | const |
- Returns:
- the native widget wrapped by this PushButton
void Plasma::PushButton::paint | ( | QPainter * | painter, | |
const QStyleOptionGraphicsItem * | option, | |||
QWidget * | widget = 0 | |||
) | [protected] |
Definition at line 244 of file pushbutton.cpp.
void Plasma::PushButton::resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | [protected] |
Definition at line 221 of file pushbutton.cpp.
void Plasma::PushButton::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 173 of file pushbutton.cpp.
void Plasma::PushButton::setStyleSheet | ( | const QString & | stylesheet | ) |
Sets the stylesheet used to control the visual display of this PushButton.
- stylesheet a CSS string
Definition at line 206 of file pushbutton.cpp.
void Plasma::PushButton::setText | ( | const QString & | text | ) |
Sets the display text for this PushButton.
- text the text to display; should be translated.
Definition at line 163 of file pushbutton.cpp.
QString Plasma::PushButton::styleSheet | ( | ) |
- Returns:
- the stylesheet currently used with this widget
Definition at line 211 of file pushbutton.cpp.
QString Plasma::PushButton::text | ( | ) | const |
- Returns:
- the display text
Property Documentation
QString Plasma::PushButton::image [read, write] |
Definition at line 45 of file pushbutton.h.
KPushButton * Plasma::PushButton::nativeWidget [read] |
Definition at line 47 of file pushbutton.h.
QGraphicsWidget Plasma::PushButton::parentWidget [read] |
Definition at line 43 of file pushbutton.h.
QString Plasma::PushButton::stylesheet [read, write] |
Definition at line 46 of file pushbutton.h.
QString Plasma::PushButton::text [read, write] |
Definition at line 44 of file pushbutton.h.
The documentation for this class was generated from the following files: