Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QtGraphicsButton Class Reference

#include <OpenFlipper/widgets/glWidget/QtGraphicsButton.hh>

Inheritance diagram for QtGraphicsButton:


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_

Detailed Description

Simple Button implementation for QGraphicsScene

Definition at line 71 of file QtGraphicsButton.hh.

Constructor & Destructor Documentation

QtGraphicsButton::QtGraphicsButton ( const QImage &  _image,
QGraphicsItem *  _parent = 0,
int  _width = -1,
int  _height = -1 

Create a glViewer.

_imagebutton imahe
_parentparent graphics scene item
_widthbutton width
_heightbutton height

Definition at line 67 of file

The documentation for this class was generated from the following files: