QtGraphicsButton Class Reference

#include <QtGraphicsButton.hh>

List of all members.

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_

Detailed Description

Simple Button implementation for QGraphicsScene

Definition at line 64 of file QtGraphicsButton.hh.


Constructor & Destructor Documentation

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

Create a glViewer.

Parameters:
_image button imahe
_parent parent graphics scene item
_width button width
_height button height

Definition at line 61 of file QtGraphicsButton.cc.

References normalPix_, and width_.


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

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .