Debian Codegraph @

tests/manual/examples/widgets/touch/pinchzoom/mouse.h

raw
1 // Copyright (C) 2016 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4 #ifndef MOUSE_H
5 #define MOUSE_H
6
7 #include <QGraphicsObject>
8
9 //! [0]
10 class Mouse : public QGraphicsObject
11 {
12 Q_OBJECT
13
14 public:
15 Mouse();
16
17 QRectF boundingRect() const override;
18 QPainterPath shape() const override;
19 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
20 QWidget *widget) override;
21
22 protected:
23 void timerEvent(QTimerEvent *event) override;
24
25 private:
26 qreal angle = 0;
27 qreal speed = 0;
28 qreal mouseEyeDirection = 0;
29 QColor color;
30 };
31 //! [0]
32
33 #endif