eventinfo.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by David Saxton                                    *
00003  *   david@bluehaze.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #ifndef EVENTINFO_H
00012 #define EVENTINFO_H
00013 
00014 #include <qpoint.h>
00015 
00016 class ItemView;
00017 
00018 class QCanvasItem;
00019 class QEvent;
00020 class QMouseEvent;
00021 class QWheelEvent;
00022 
00029 class EventInfo
00030 {
00031 public:
00032         EventInfo();
00033         EventInfo( ItemView *itemView, QMouseEvent *e );
00034         EventInfo( ItemView *itemView, QWheelEvent *e );
00035         EventInfo( ItemView *itemView, QEvent *e );
00036         
00037         QMouseEvent *mousePressEvent( int dx, int dy ) const;
00038         QMouseEvent *mouseReleaseEvent( int dx, int dy ) const;
00039         QMouseEvent *mouseDoubleClickEvent( int dx, int dy ) const;
00040         QMouseEvent *mouseMoveEvent( int dx, int dy ) const;
00041         QWheelEvent *wheelEvent( int dx, int dy ) const;
00042         
00043         QPoint pos;
00044         QPoint globalPos;
00045         QCanvasItem *qcanvasItemClickedOn;
00046         int itemRtti;
00047         short scrollDelta;
00048         Qt::Orientation scrollOrientation;
00049         bool isRightClick:1;
00050         bool ctrlPressed:1;
00051         bool shiftPressed:1;
00052         bool altPressed:1;
00053         
00054 protected:
00055         void reset();
00056 };
00057 
00058 #endif

Generated on Tue May 8 17:05:29 2007 for KTechLab by  doxygen 1.5.1