liblancelot
#include <Widget.h>
Base class for Widgets that want to use Lancelot framework.
- Author
- Ivan Cukic
Definition at line 37 of file Widget.h.
Lancelot::Widget::Widget |
( |
QGraphicsItem * |
parent = 0 | ) |
|
Lancelot::Widget::~Widget |
( |
| ) |
|
|
virtual |
void Lancelot::Widget::clicked |
( |
| ) |
|
|
signal |
Emitted when the button is clicked.
You should use the activated() signal instead if you want to support other activation methods beside clicking.
- Parameters
-
checked | true if the button is checked |
Group* Lancelot::Widget::group |
( |
| ) |
const |
Returns this widget's group.
QString Lancelot::Widget::groupName |
( |
| ) |
const |
- Returns
- this widget's group's name.
Definition at line 126 of file Widget.cpp.
void Lancelot::Widget::hideEvent |
( |
QHideEvent * |
event | ) |
|
|
protected |
void Lancelot::Widget::hoverEnterEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
void Lancelot::Widget::hoverLeaveEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
bool Lancelot::Widget::isDown |
( |
| ) |
const |
- Returns
- whether the button is down
Definition at line 251 of file Widget.cpp.
bool Lancelot::Widget::isHovered |
( |
| ) |
const |
Returns whether the mouse cursor is hovering the widget.
Definition at line 121 of file Widget.cpp.
void Lancelot::Widget::mouseHoverEnter |
( |
| ) |
|
|
signal |
This signal is emitted when the mouse cursor enters the widget.
void Lancelot::Widget::mouseHoverLeave |
( |
| ) |
|
|
signal |
This signal is emitted when the mouse cursor leaves the widget.
void Lancelot::Widget::mousePressEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
protected |
void Lancelot::Widget::mouseReleaseEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
protected |
void Lancelot::Widget::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionGraphicsItem * |
option, |
|
|
QWidget * |
widget = 0 |
|
) |
| |
|
protected |
void Lancelot::Widget::paintBackground |
( |
QPainter * |
painter | ) |
|
|
protected |
Paints the widget background using the widget's SVG.
Element name is calculated according to widget's state
- Parameters
-
painter | painter to paint on |
Definition at line 158 of file Widget.cpp.
void Lancelot::Widget::paintBackground |
( |
QPainter * |
painter, |
|
|
const QString & |
element |
|
) |
| |
|
protected |
Paints the widget background using the specified element from widget's SVG.
- Parameters
-
painter | painter to paint on |
element | element to paint |
Definition at line 174 of file Widget.cpp.
void Lancelot::Widget::pressed |
( |
| ) |
|
|
signal |
This signal is emitted when the button is pressed down.
void Lancelot::Widget::released |
( |
| ) |
|
|
signal |
This signal is emitted when the button is released.
void Lancelot::Widget::setDown |
( |
bool |
value | ) |
|
|
protected |
Sets whether the widget is down (pressed).
This function exists only as a hack if you need a way to artificially force this value.
Definition at line 92 of file Widget.cpp.
void Lancelot::Widget::setGroup |
( |
Group * |
group = NULL | ) |
|
|
virtual |
void Lancelot::Widget::setGroupByName |
( |
const QString & |
groupName | ) |
|
|
virtual |
Sets this widget's group by group name.
- Parameters
-
groupName | name of the group |
Definition at line 134 of file Widget.cpp.
void Lancelot::Widget::setHovered |
( |
bool |
value | ) |
|
|
protected |
Sets whether the widget is hovered.
This function exists only as a hack if you need a way to artificially force this value.
Definition at line 83 of file Widget.cpp.
void Lancelot::Widget::setPaintBackwardsWhenRTL |
( |
bool |
value | ) |
|
|
protected |
QSizeF Lancelot::Widget::sizeHint |
( |
Qt::SizeHint |
which, |
|
|
const QSizeF & |
constraint = QSizeF() |
|
) |
| const |
|
protected |
bool Lancelot::Widget::down |
|
readwrite |
Group * Lancelot::Widget::group |
|
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 Mon Oct 13 2014 22:55:08 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.