QCAD
Open Source 2D CAD
RInputEvent.h
Go to the documentation of this file.
1 
20 #ifndef RINPUTEVENT_H
21 #define RINPUTEVENT_H
22 
23 #include "core_global.h"
24 
25 #include <QMouseEvent>
26 
27 #include "RVector.h"
28 
29 class RGraphicsScene;
30 class RGraphicsView;
31 
42 public:
43  RInputEvent(const RVector& position, RGraphicsScene& s, RGraphicsView& v, qreal devicePixelRatio=1.0);
44  virtual ~RInputEvent();
45 
46  RVector getModelPosition() const;
47  void setModelPosition(const RVector& v);
48 // RVector getUcsPosition() const;
49  RVector getScreenPosition() const;
50 
51  RGraphicsView& getGraphicsView() const;
52  RGraphicsScene& getGraphicsScene() const;
53 
57  bool isValid() const {
58  return modelPosition.valid;
59  }
60 
61 protected:
63 // RVector ucsPosition;
65 
68 };
69 
71 
72 #endif
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
An input event for a graphics scene.
Definition: RInputEvent.h:41
RGraphicsScene & scene
Definition: RInputEvent.h:66
Abstract base class for all graphics scenes.
Definition: RGraphicsScene.h:60
RGraphicsView & view
Definition: RInputEvent.h:67
#define QCADCORE_EXPORT
Definition: core_global.h:10
RVector screenPosition
Definition: RInputEvent.h:64
Q_DECLARE_METATYPE(RMath *)
bool isValid() const
Definition: RInputEvent.h:57
RVector modelPosition
Definition: RInputEvent.h:62
Graphics view.
Definition: RGraphicsView.h:58