mouse.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2006-2007 Trolltech ASA. All rights reserved.
4 **
5 ** This file is part of the example classes of the Qt Toolkit.
6 **
7 ** This file may be used under the terms of the GNU General Public
8 ** License version 2.0 as published by the Free Software Foundation
9 ** and appearing in the file LICENSE.GPL included in the packaging of
10 ** this file. Please review the following information to ensure GNU
11 ** General Public Licensing requirements will be met:
12 ** http://trolltech.com/products/qt/licenses/licensing/opensource/
13 **
14 ** If you are unsure which license is appropriate for your use, please
15 ** review the following information:
16 ** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
17 ** or contact the sales department at sales@trolltech.com.
18 **
19 ** In addition, as a special exception, Trolltech gives you certain
20 ** additional rights. These rights are described in the Trolltech GPL
21 ** Exception version 1.0, which can be found at
22 ** http://www.trolltech.com/products/qt/gplexception/ and in the file
23 ** GPL_EXCEPTION.txt in this package.
24 **
25 ** In addition, as a special exception, Trolltech, as the sole copyright
26 ** holder for Qt Designer, grants users of the Qt/Eclipse Integration
27 ** plug-in the right for the Qt/Eclipse Integration to link to
28 ** functionality provided by Qt Designer and its related libraries.
29 **
30 ** Trolltech reserves all rights not expressly granted herein.
31 **
32 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
33 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
34 **
35 ****************************************************************************/
36 
37 #ifndef MOUSE_H
38 #define MOUSE_H
39 
40 #include <QGraphicsItem>
41 #include <QObject>
42 
43 class Mouse : public QObject, public QGraphicsItem
44 {
45  Q_OBJECT
46 
47 public:
48  Mouse();
49 
50  QRectF boundingRect() const;
51  QPainterPath shape() const;
52  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
53  QWidget *widget);
54 
55 protected:
56  void timerEvent(QTimerEvent *event);
57 
58 private:
59  qreal angle;
60  qreal speed;
62  QColor color;
63 };
64 
65 #endif
Mouse()
Definition: mouse.cpp:59
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: mouse.cpp:81
qreal angle
Definition: mouse.h:59
qreal speed
Definition: mouse.h:60
Definition: mouse.h:43
Definition: options.h:49
QColor color
Definition: mouse.h:62
QRectF boundingRect() const
Definition: mouse.cpp:67
qreal mouseEyeDirection
Definition: mouse.h:61
void timerEvent(QTimerEvent *event)
Definition: mouse.cpp:114
QPainterPath shape() const
Definition: mouse.cpp:74


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23