#include <ThymioButtons.h>
Classes | |
class | ThymioBody |
Signals | |
void | stateChanged () |
Public Member Functions | |
QRectF | boundingRect () const |
QColor | getButtonColor () const |
ThymioIRButton * | getIRButton () |
QString | getName () const |
virtual int | getNumButtons () |
int | getParentID () const |
int | getState () const |
QString | getType () const |
virtual QPixmap | image (bool on=true) |
virtual int | isClicked (int i) |
virtual bool | isValid () |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
void | setAdvanced (bool advanced) |
void | setButtonColor (QColor color) |
virtual void | setClicked (int i, int status) |
void | setParentID (int id) |
void | setScaleFactor (qreal factor) |
void | setState (int val) |
ThymioButton (bool eventButton=true, qreal scale=1.0, bool up=true, bool advanced=false, QGraphicsItem *parent=0) | |
~ThymioButton () | |
Protected Member Functions | |
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
Protected Attributes | |
QColor | buttonColor |
ThymioIRButton * | buttonIR |
QPointF | dragStartPosition |
int | parentID |
qreal | scaleFactor |
QList< ThymioClickableButton * > | stateButtons |
ThymioBody * | thymioBody |
QList< ThymioClickableButton * > | thymioButtons |
qreal | trans |
Private Slots | |
void | updateIRButton () |
Definition at line 89 of file ThymioButtons.h.
Aseba::ThymioButton::ThymioButton | ( | bool | eventButton = true , |
qreal | scale = 1.0 , |
||
bool | up = true , |
||
bool | advanced = false , |
||
QGraphicsItem * | parent = 0 |
||
) |
Definition at line 154 of file ThymioButtons.cpp.
Definition at line 187 of file ThymioButtons.cpp.
QRectF Aseba::ThymioButton::boundingRect | ( | ) | const [inline] |
Definition at line 111 of file ThymioButtons.h.
QColor Aseba::ThymioButton::getButtonColor | ( | ) | const [inline] |
Definition at line 114 of file ThymioButtons.h.
Definition at line 206 of file ThymioButtons.cpp.
QString Aseba::ThymioButton::getName | ( | ) | const [inline] |
Definition at line 121 of file ThymioButtons.h.
virtual int Aseba::ThymioButton::getNumButtons | ( | ) | [inline, virtual] |
Reimplemented in Aseba::ThymioColorAction, and Aseba::ThymioMoveAction.
Definition at line 122 of file ThymioButtons.h.
int Aseba::ThymioButton::getParentID | ( | ) | const [inline] |
Definition at line 119 of file ThymioButtons.h.
int Aseba::ThymioButton::getState | ( | ) | const |
Definition at line 372 of file ThymioButtons.cpp.
QString Aseba::ThymioButton::getType | ( | ) | const [inline] |
Definition at line 120 of file ThymioButtons.h.
QPixmap Aseba::ThymioButton::image | ( | bool | on = true | ) | [virtual] |
Reimplemented in Aseba::ThymioSoundAction, Aseba::ThymioColorAction, and Aseba::ThymioMoveAction.
Definition at line 277 of file ThymioButtons.cpp.
virtual int Aseba::ThymioButton::isClicked | ( | int | i | ) | [inline, virtual] |
Reimplemented in Aseba::ThymioColorAction, and Aseba::ThymioMoveAction.
Definition at line 116 of file ThymioButtons.h.
bool Aseba::ThymioButton::isValid | ( | ) | [virtual] |
Definition at line 330 of file ThymioButtons.cpp.
void Aseba::ThymioButton::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
Definition at line 408 of file ThymioButtons.cpp.
void Aseba::ThymioButton::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
Definition at line 398 of file ThymioButtons.cpp.
void Aseba::ThymioButton::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
Definition at line 403 of file ThymioButtons.cpp.
void Aseba::ThymioButton::paint | ( | QPainter * | painter, |
const QStyleOptionGraphicsItem * | option, | ||
QWidget * | widget = 0 |
||
) | [virtual] |
Reimplemented in Aseba::ThymioColorAction, and Aseba::ThymioMoveAction.
Definition at line 265 of file ThymioButtons.cpp.
void Aseba::ThymioButton::setAdvanced | ( | bool | advanced | ) |
Definition at line 343 of file ThymioButtons.cpp.
void Aseba::ThymioButton::setButtonColor | ( | QColor | color | ) | [inline] |
Definition at line 113 of file ThymioButtons.h.
void Aseba::ThymioButton::setClicked | ( | int | i, |
int | status | ||
) | [virtual] |
Reimplemented in Aseba::ThymioColorAction, and Aseba::ThymioMoveAction.
Definition at line 198 of file ThymioButtons.cpp.
void Aseba::ThymioButton::setParentID | ( | int | id | ) | [inline] |
Definition at line 118 of file ThymioButtons.h.
void Aseba::ThymioButton::setScaleFactor | ( | qreal | factor | ) |
Definition at line 193 of file ThymioButtons.cpp.
void Aseba::ThymioButton::setState | ( | int | val | ) |
Definition at line 384 of file ThymioButtons.cpp.
void Aseba::ThymioButton::stateChanged | ( | ) | [signal] |
void Aseba::ThymioButton::updateIRButton | ( | ) | [private, slot] |
Definition at line 252 of file ThymioButtons.cpp.
QColor Aseba::ThymioButton::buttonColor [protected] |
Definition at line 145 of file ThymioButtons.h.
ThymioIRButton* Aseba::ThymioButton::buttonIR [protected] |
Definition at line 144 of file ThymioButtons.h.
QPointF Aseba::ThymioButton::dragStartPosition [protected] |
Definition at line 150 of file ThymioButtons.h.
int Aseba::ThymioButton::parentID [protected] |
Definition at line 146 of file ThymioButtons.h.
qreal Aseba::ThymioButton::scaleFactor [protected] |
Definition at line 147 of file ThymioButtons.h.
QList<ThymioClickableButton*> Aseba::ThymioButton::stateButtons [protected] |
Definition at line 142 of file ThymioButtons.h.
ThymioBody* Aseba::ThymioButton::thymioBody [protected] |
Definition at line 143 of file ThymioButtons.h.
QList<ThymioClickableButton*> Aseba::ThymioButton::thymioButtons [protected] |
Definition at line 141 of file ThymioButtons.h.
qreal Aseba::ThymioButton::trans [protected] |
Definition at line 148 of file ThymioButtons.h.