Developer Documentation
|
#include <OpenFlipper/widgets/glWidget/QtGraphicsButton.hh>
Signals | |
void | pressed () |
signals a button press | |
Public Member Functions | |
QtGraphicsButton (const QImage &_image, QGraphicsItem *_parent=0, int _width=-1, int _height=-1) | |
virtual QRectF | boundingRect () const |
returns the bounding rect | |
virtual void | paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget=0) |
paints the button | |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *_event) |
event tracking | |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *_event) |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *_event) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *_event) |
virtual QVariant | itemChange (GraphicsItemChange _change, const QVariant &_value) |
void | setCheckable (bool _value) |
makes the button checkable | |
void | setChecked (bool _value) |
sets button checked state | |
bool | isChecked () const |
returns button checked state | |
Private Attributes | |
bool | checkable_ |
button state | |
bool | checked_ |
bool | pressed_ |
bool | over_ |
int | width_ |
button size | |
int | height_ |
QPixmap | normalPix_ |
pixmaps for different button states | |
QPixmap | overPix_ |
QPixmap | checkedPix_ |
Simple Button implementation for QGraphicsScene
Definition at line 65 of file QtGraphicsButton.hh.
QtGraphicsButton::QtGraphicsButton | ( | const QImage & | _image, |
QGraphicsItem * | _parent = 0 , |
||
int | _width = -1 , |
||
int | _height = -1 |
||
) |
Create a glViewer.
_image | button imahe |
_parent | parent graphics scene item |
_width | button width |
_height | button height |
Definition at line 61 of file QtGraphicsButton.cc.