libplasma
Plasma::RadioButton Class Reference
#include <radiobutton.h>

Detailed Description
This class emulates a QRadioButton.You will be able to add radio buttons as childrens of a QGraphicsItem, so only one radio button will be checked at a time. If you don't add them as siblings (adding all them as childrens of the same QGraphicsItem), then you can add them directly to a scene, where they will be siblings too. This way you can have groups of radio buttons.
- Note:
- Please before working with radio buttons, add them to a scene or as childrens of another QGraphicsItem.
Definition at line 52 of file radiobutton.h.
Public Slots | |
| void | dataUpdated (const QString &, const Plasma::DataEngine::Data &data) |
Signals | |
| void | clicked () |
Public Member Functions | |
| RadioButton (QGraphicsItem *parent=0) | |
| virtual | ~RadioButton () |
| QRectF | boundingRect () const |
| void | paintWidget (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| bool | isChecked () const |
| const QString & | text () const |
| void | setChecked (bool checked) |
| void | setText (const QString &text) |
Protected Member Functions | |
| virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| virtual void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) |
| virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
Properties | |
| QString | text |
| bool | checked |
Constructor & Destructor Documentation
| Plasma::RadioButton::RadioButton | ( | QGraphicsItem * | parent = 0 |
) |
| Plasma::RadioButton::~RadioButton | ( | ) | [virtual] |
Definition at line 73 of file radiobutton.cpp.
Member Function Documentation
| QRectF Plasma::RadioButton::boundingRect | ( | ) | const [virtual] |
Set the font for this widget.
- Parameters:
-
font the new font
- Returns:
- the bounding rectangle for this Plasma::Widget
Reimplemented from Plasma::Widget.
Definition at line 78 of file radiobutton.cpp.
| void Plasma::RadioButton::paintWidget | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | option, | |||
| QWidget * | widget = 0 | |||
| ) | [virtual] |
Paints the widget.
- Parameters:
-
painter the QPainter to use to paint. option the style option used to give specific info on the item being dawn. widget the parent QWidget (most likely the Corona)
Reimplemented from Plasma::Widget.
Definition at line 83 of file radiobutton.cpp.
| bool Plasma::RadioButton::isChecked | ( | ) | const |
Definition at line 98 of file radiobutton.cpp.
| const QString& Plasma::RadioButton::text | ( | ) | const |
| void Plasma::RadioButton::setChecked | ( | bool | checked | ) |
Definition at line 108 of file radiobutton.cpp.
| void Plasma::RadioButton::setText | ( | const QString & | text | ) |
Definition at line 146 of file radiobutton.cpp.
| void Plasma::RadioButton::dataUpdated | ( | const QString & | , | |
| const Plasma::DataEngine::Data & | data | |||
| ) | [slot] |
Definition at line 152 of file radiobutton.cpp.
| void Plasma::RadioButton::clicked | ( | ) | [signal] |
| void Plasma::RadioButton::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
| void Plasma::RadioButton::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
| void Plasma::RadioButton::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
| void Plasma::RadioButton::hoverMoveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected, virtual] |
| void Plasma::RadioButton::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected, virtual] |
| void Plasma::RadioButton::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected, virtual] |
Property Documentation
const QString & Plasma::RadioButton::text [read, write] |
Definition at line 55 of file radiobutton.h.
bool Plasma::RadioButton::checked [read, write] |
Definition at line 56 of file radiobutton.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference