QCAD
Open Source 2D CAD
RMouseEvent.h
Go to the documentation of this file.
1 
20 #ifndef RMOUSEEVENT_H
21 #define RMOUSEEVENT_H
22 
23 #include "core_global.h"
24 
25 #include <QMouseEvent>
26 
27 #include "RVector.h"
28 #include "RInputEvent.h"
29 
30 class RGraphicsScene;
31 class RGraphicsView;
32 
42 class QCADCORE_EXPORT RMouseEvent: public QMouseEvent, public RInputEvent {
43 public:
44  RMouseEvent(QEvent::Type type, const RVector& position,
45  Qt::MouseButton button, Qt::MouseButtons buttons,
46  Qt::KeyboardModifiers modifiers, RGraphicsScene& s,
47  RGraphicsView& v);
48 
49  RMouseEvent(const QMouseEvent& mouseEvent, RGraphicsScene& s,
50  RGraphicsView& v, qreal devicePixelRatio = 1.0);
51 
52  virtual ~RMouseEvent();
53 
54  static bool hasMouseMoved();
55  static void resetOriginalMousePos();
56  static void setOriginalMousePos(const QPoint& p);
57 
58 private:
59  static QPoint oriCursor;
60 };
61 
63 
64 #endif
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
static QPoint oriCursor
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RMouseEvent.h:59
An input event for a graphics scene.
Definition: RInputEvent.h:41
Abstract base class for all graphics scenes.
Definition: RGraphicsScene.h:60
#define QCADCORE_EXPORT
Definition: core_global.h:10
Q_DECLARE_METATYPE(RMath *)
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
Graphics view.
Definition: RGraphicsView.h:58