mouse.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 2006-2007 Trolltech ASA. All rights reserved.
00004 **
00005 ** This file is part of the example classes of the Qt Toolkit.
00006 **
00007 ** This file may be used under the terms of the GNU General Public
00008 ** License version 2.0 as published by the Free Software Foundation
00009 ** and appearing in the file LICENSE.GPL included in the packaging of
00010 ** this file.  Please review the following information to ensure GNU
00011 ** General Public Licensing requirements will be met:
00012 ** http://trolltech.com/products/qt/licenses/licensing/opensource/
00013 **
00014 ** If you are unsure which license is appropriate for your use, please
00015 ** review the following information:
00016 ** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
00017 ** or contact the sales department at sales@trolltech.com.
00018 **
00019 ** In addition, as a special exception, Trolltech gives you certain
00020 ** additional rights. These rights are described in the Trolltech GPL
00021 ** Exception version 1.0, which can be found at
00022 ** http://www.trolltech.com/products/qt/gplexception/ and in the file
00023 ** GPL_EXCEPTION.txt in this package.
00024 **
00025 ** In addition, as a special exception, Trolltech, as the sole copyright
00026 ** holder for Qt Designer, grants users of the Qt/Eclipse Integration
00027 ** plug-in the right for the Qt/Eclipse Integration to link to
00028 ** functionality provided by Qt Designer and its related libraries.
00029 **
00030 ** Trolltech reserves all rights not expressly granted herein.
00031 **
00032 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00033 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00034 **
00035 ****************************************************************************/
00036 
00037 #ifndef MOUSE_H
00038 #define MOUSE_H
00039 
00040 #include <QGraphicsItem>
00041 #include <QObject>
00042 
00043 class Mouse : public QObject, public QGraphicsItem
00044 {
00045     Q_OBJECT
00046 
00047 public:
00048     Mouse();
00049 
00050     QRectF boundingRect() const;
00051     QPainterPath shape() const;
00052     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
00053                QWidget *widget);
00054 
00055 protected:
00056     void timerEvent(QTimerEvent *event);
00057 
00058 private:
00059     qreal angle;
00060     qreal speed;
00061     qreal mouseEyeDirection;
00062     QColor color;
00063 };
00064 
00065 #endif


csm
Author(s): Andrea Censi
autogenerated on Mon Jan 16 2017 03:48:29