blob: 02a7ccdeb64b645bffb4deb0a669a2d05a6dcb07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef CLOCKBUTTON_H
#define CLOCKBUTTON_H
#include <QGraphicsItem>
class ClockButton: public QObject, public QGraphicsItem
{
Q_OBJECT
public:
ClockButton(const QString &name, QGraphicsItem *parent = 0);
virtual QRectF boundingRect() const;
virtual QPainterPath shape() const;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);
protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent *);
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
signals:
void pressed();
void released();
};
#endif //CLOCKBUTTON_H
|