48 #include <QGraphicsItem> 49 #include <QGraphicsLayoutItem> 74 explicit Button (QGraphicsItem *_parent = 0);
75 Button (
const QString &_text, QGraphicsItem *_parent = 0);
87 void paint (QPainter *_painter,
const QStyleOptionGraphicsItem *_option, QWidget *_widget = 0);
102 virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *_event);
103 virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event);
106 virtual void mousePressEvent (QGraphicsSceneMouseEvent *_event);
107 virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *_event);
110 QBrush backgroundBrush_;
void setBackgroundBrush(QBrush _brush)
Sets the background brush.
void paint(QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget=0)
Button glow painting.
void pressed()
emmited if the button gets pressed
Button(QGraphicsItem *_parent=0)
Constructor.
void setBackgroundPen(QPen _pen)
Sets the background pen.
void setGeometry(const QRectF &_rect)
Sets the geometry.
QRectF boundingRect() const
Bounding rectangle.