#include <ThymioButtons.h>
Signals | |
void | stateChanged () |
Public Member Functions | |
void | addSibling (ThymioClickableButton *s) |
QRectF | boundingRect () const |
int | getNumStates () const |
int | isClicked () |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
void | setBeginButtonColor (QColor color) |
void | setButtonColor (QColor color) |
void | setClicked (int clicked) |
void | setNumStates (int num) |
void | setToggleState (bool state) |
ThymioClickableButton (QRectF rect, ThymioButtonType type, int nstates=2, QGraphicsItem *parent=0) | |
Protected Member Functions | |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
Protected Attributes | |
QRectF | boundingRectangle |
QColor | buttonBeginColor |
int | buttonClicked |
QColor | buttonColor |
ThymioButtonType | buttonType |
int | numStates |
QList< ThymioClickableButton * > | siblings |
bool | toggleState |
Definition at line 37 of file ThymioButtons.h.
Aseba::ThymioClickableButton::ThymioClickableButton | ( | QRectF | rect, |
ThymioButtonType | type, | ||
int | nstates = 2 , |
||
QGraphicsItem * | parent = 0 |
||
) |
Definition at line 16 of file ThymioButtons.cpp.
void Aseba::ThymioClickableButton::addSibling | ( | ThymioClickableButton * | s | ) | [inline] |
Definition at line 55 of file ThymioButtons.h.
QRectF Aseba::ThymioClickableButton::boundingRect | ( | ) | const [inline] |
Definition at line 51 of file ThymioButtons.h.
int Aseba::ThymioClickableButton::getNumStates | ( | ) | const [inline] |
Definition at line 49 of file ThymioButtons.h.
int Aseba::ThymioClickableButton::isClicked | ( | ) | [inline] |
Definition at line 45 of file ThymioButtons.h.
void Aseba::ThymioClickableButton::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
Definition at line 62 of file ThymioButtons.cpp.
void Aseba::ThymioClickableButton::paint | ( | QPainter * | painter, |
const QStyleOptionGraphicsItem * | option, | ||
QWidget * | widget = 0 |
||
) |
Reimplemented in Aseba::ThymioFaceButton.
Definition at line 32 of file ThymioButtons.cpp.
void Aseba::ThymioClickableButton::setBeginButtonColor | ( | QColor | color | ) | [inline] |
Definition at line 53 of file ThymioButtons.h.
void Aseba::ThymioClickableButton::setButtonColor | ( | QColor | color | ) | [inline] |
Definition at line 52 of file ThymioButtons.h.
void Aseba::ThymioClickableButton::setClicked | ( | int | clicked | ) | [inline] |
Definition at line 46 of file ThymioButtons.h.
void Aseba::ThymioClickableButton::setNumStates | ( | int | num | ) | [inline] |
Definition at line 48 of file ThymioButtons.h.
void Aseba::ThymioClickableButton::setToggleState | ( | bool | state | ) | [inline] |
Definition at line 47 of file ThymioButtons.h.
void Aseba::ThymioClickableButton::stateChanged | ( | ) | [signal] |
QRectF Aseba::ThymioClickableButton::boundingRectangle [protected] |
Definition at line 66 of file ThymioButtons.h.
QColor Aseba::ThymioClickableButton::buttonBeginColor [protected] |
Definition at line 68 of file ThymioButtons.h.
int Aseba::ThymioClickableButton::buttonClicked [protected] |
Definition at line 62 of file ThymioButtons.h.
QColor Aseba::ThymioClickableButton::buttonColor [protected] |
Definition at line 67 of file ThymioButtons.h.
Definition at line 61 of file ThymioButtons.h.
int Aseba::ThymioClickableButton::numStates [protected] |
Definition at line 64 of file ThymioButtons.h.
QList<ThymioClickableButton*> Aseba::ThymioClickableButton::siblings [protected] |
Definition at line 70 of file ThymioButtons.h.
bool Aseba::ThymioClickableButton::toggleState [protected] |
Definition at line 63 of file ThymioButtons.h.