#include <Plasma/Widgets/PushButton>
Provides a plasma-themed KPushButton.
Definition at line 41 of file pushbutton.h.
Plasma::PushButton::~PushButton |
( |
| ) |
|
QAction* Plasma::PushButton::action |
( |
| ) |
const |
- Returns
- the currently associated action, if any.
- Since
- 4.3
void Plasma::PushButton::changeEvent |
( |
QEvent * |
event | ) |
|
|
protected |
void Plasma::PushButton::click |
( |
| ) |
|
|
slot |
Performs a visual click and emits the associated signals.
- Since
- 4.6
Definition at line 324 of file pushbutton.cpp.
void Plasma::PushButton::clicked |
( |
| ) |
|
|
signal |
Emitted when the button is pressed then released, completing a click.
void Plasma::PushButton::hoverEnterEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
void Plasma::PushButton::hoverLeaveEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
QIcon Plasma::PushButton::icon |
( |
| ) |
const |
- Returns
- the icon of this button
- Since
- 4.3
QString Plasma::PushButton::image |
( |
| ) |
const |
- Returns
- the image path being displayed currently, or an empty string if none.
bool Plasma::PushButton::isCheckable |
( |
| ) |
const |
bool Plasma::PushButton::isChecked |
( |
| ) |
const |
- Returns
- true if the button is checked; requires setIsCheckable(true) to be called
- Since
- 4.3
Definition at line 329 of file pushbutton.cpp.
bool Plasma::PushButton::isDown |
( |
| ) |
const |
- Returns
- true if the button is pressed down
- Since
- 4.4
Definition at line 334 of file pushbutton.cpp.
KPushButton* Plasma::PushButton::nativeWidget |
( |
| ) |
const |
- Returns
- the native widget wrapped by this PushButton
void Plasma::PushButton::pressed |
( |
| ) |
|
|
signal |
Emitted when the button is pressed down; usually the clicked() signal will suffice, however.
- Since
- 4.4
void Plasma::PushButton::released |
( |
| ) |
|
|
signal |
Emitted when the button is released; usually the clicked() signal will suffice, however.
- Since
- 4.4
void Plasma::PushButton::resizeEvent |
( |
QGraphicsSceneResizeEvent * |
event | ) |
|
|
protected |
void Plasma::PushButton::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 284 of file pushbutton.cpp.
void Plasma::PushButton::setCheckable |
( |
bool |
checkable | ) |
|
Sets whether or not this button can be toggled on/off.
- Since
- 4.3
Definition at line 309 of file pushbutton.cpp.
void Plasma::PushButton::setChecked |
( |
bool |
checked | ) |
|
|
slot |
Sets whether or not this button is checked.
Implies setIsCheckable(true).
- Since
- 4.3
Definition at line 319 of file pushbutton.cpp.
void Plasma::PushButton::setIcon |
( |
const QIcon & |
icon | ) |
|
sets the icon for this push button
- Parameters
-
- Since
- 4.3
Definition at line 299 of file pushbutton.cpp.
void Plasma::PushButton::setIcon |
( |
const KIcon & |
icon | ) |
|
sets the icon for this push button using a KIcon
- Parameters
-
- Since
- 4.4
Definition at line 294 of file pushbutton.cpp.
void Plasma::PushButton::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 234 of file pushbutton.cpp.
void Plasma::PushButton::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 262 of file pushbutton.cpp.
void Plasma::PushButton::setStyleSheet |
( |
const QString & |
stylesheet | ) |
|
void Plasma::PushButton::setText |
( |
const QString & |
text | ) |
|
Sets the display text for this PushButton.
- Parameters
-
text | the text to display; should be translated. |
Definition at line 223 of file pushbutton.cpp.
QSizeF Plasma::PushButton::sizeHint |
( |
Qt::SizeHint |
which, |
|
|
const QSizeF & |
constraint |
|
) |
| const |
|
protected |
QString Plasma::PushButton::styleSheet |
( |
| ) |
|
- Returns
- the stylesheet currently used with this widget
QString Plasma::PushButton::text |
( |
| ) |
const |
void Plasma::PushButton::toggled |
( |
bool |
| ) |
|
|
signal |
Emitted when the button changes state from up to down.
QAction * Plasma::PushButton::action |
|
readwrite |
bool Plasma::PushButton::checkable |
|
readwrite |
bool Plasma::PushButton::checked |
|
readwrite |
bool Plasma::PushButton::down |
|
read |
QIcon Plasma::PushButton::icon |
|
readwrite |
QString Plasma::PushButton::image |
|
readwrite |
KPushButton * Plasma::PushButton::nativeWidget |
|
read |
QString Plasma::PushButton::styleSheet |
|
readwrite |
QString Plasma::PushButton::text |
|
readwrite |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.