#include <Plasma/Widgets/PushButton>
Provides a plasma-themed KPushButton.
Definition at line 41 of file pushbutton.h.
◆ PushButton()
◆ ~PushButton()
Plasma::PushButton::~PushButton |
( |
| ) |
|
◆ action()
QAction * Plasma::PushButton::action |
( |
| ) |
const |
- Returns
- the currently associated action, if any.
- Since
- 4.3
Definition at line 289 of file pushbutton.cpp.
◆ changeEvent()
void Plasma::PushButton::changeEvent |
( |
QEvent * |
event | ) |
|
|
protected |
◆ click
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.
◆ clicked
void Plasma::PushButton::clicked |
( |
| ) |
|
|
signal |
Emitted when the button is pressed then released, completing a click.
◆ hoverEnterEvent()
void Plasma::PushButton::hoverEnterEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
◆ hoverLeaveEvent()
void Plasma::PushButton::hoverLeaveEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
◆ icon()
QIcon Plasma::PushButton::icon |
( |
| ) |
const |
- Returns
- the icon of this button
- Since
- 4.3
Definition at line 304 of file pushbutton.cpp.
◆ image()
QString Plasma::PushButton::image |
( |
| ) |
const |
- Returns
- the image path being displayed currently, or an empty string if none.
Definition at line 268 of file pushbutton.cpp.
◆ isCheckable()
bool Plasma::PushButton::isCheckable |
( |
| ) |
const |
◆ isChecked()
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.
◆ isDown()
bool Plasma::PushButton::isDown |
( |
| ) |
const |
- Returns
- true if the button is pressed down
- Since
- 4.4
Definition at line 334 of file pushbutton.cpp.
◆ nativeWidget()
KPushButton * Plasma::PushButton::nativeWidget |
( |
| ) |
const |
◆ paint()
◆ pressed
void Plasma::PushButton::pressed |
( |
| ) |
|
|
signal |
Emitted when the button is pressed down; usually the clicked() signal will suffice, however.
- Since
- 4.4
◆ released
void Plasma::PushButton::released |
( |
| ) |
|
|
signal |
Emitted when the button is released; usually the clicked() signal will suffice, however.
- Since
- 4.4
◆ resizeEvent()
void Plasma::PushButton::resizeEvent |
( |
QGraphicsSceneResizeEvent * |
event | ) |
|
|
protected |
◆ setAction()
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.
◆ setCheckable()
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.
◆ setChecked
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.
◆ setIcon() [1/2]
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.
◆ setIcon() [2/2]
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.
◆ setImage() [1/2]
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.
◆ setImage() [2/2]
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.
◆ setStyleSheet()
void Plasma::PushButton::setStyleSheet |
( |
const QString & |
stylesheet | ) |
|
◆ setText()
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.
◆ sizeHint()
QSizeF Plasma::PushButton::sizeHint |
( |
Qt::SizeHint |
which, |
|
|
const QSizeF & |
constraint |
|
) |
| const |
|
protected |
◆ styleSheet()
QString Plasma::PushButton::styleSheet |
( |
| ) |
|
- Returns
- the stylesheet currently used with this widget
◆ text()
QString Plasma::PushButton::text |
( |
| ) |
const |
◆ toggled
void Plasma::PushButton::toggled |
( |
bool |
| ) |
|
|
signal |
Emitted when the button changes state from up to down.
◆ action
QAction * Plasma::PushButton::action |
|
readwrite |
◆ checkable
bool Plasma::PushButton::checkable |
|
readwrite |
◆ checked
bool Plasma::PushButton::checked |
|
readwrite |
◆ down
bool Plasma::PushButton::down |
|
read |
◆ icon
QIcon Plasma::PushButton::icon |
|
readwrite |
◆ image
QString Plasma::PushButton::image |
|
readwrite |
◆ nativeWidget
KPushButton * Plasma::PushButton::nativeWidget |
|
read |
◆ parentWidget
◆ styleSheet
QString Plasma::PushButton::styleSheet |
|
readwrite |
◆ text
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-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by
doxygen 1.9.6 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.