QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
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 "RVector.h"
26
27class RGraphicsScene;
28class RGraphicsView;
29
40public:
41 RInputEvent(const RVector& position, RGraphicsScene& s, RGraphicsView& v, qreal devicePixelRatio=1.0);
42 virtual ~RInputEvent();
43
44 RVector getModelPosition() const;
45 void setModelPosition(const RVector& v);
46
47 RVector getCursorPosition() const;
48 void setCursorPosition(const RVector& v);
49
50 RVector getScreenPosition() const;
51 void setScreenPosition(const RVector& v);
52
53// RVector getUcsPosition() const;
54
56 RGraphicsScene& getGraphicsScene() const;
57
61 bool isValid() const {
62 return modelPosition.valid;
63 }
64
65protected:
68// RVector ucsPosition;
70
73};
74
76
77#endif
Q_DECLARE_METATYPE(RMath *)
Abstract base class for all graphics scenes.
Definition RGraphicsScene.h:64
Graphics view.
Definition RGraphicsView.h:67
An input event for a graphics scene.
Definition RInputEvent.h:39
RVector cursorPosition
Definition RInputEvent.h:67
RVector modelPosition
Definition RInputEvent.h:66
RVector screenPosition
Definition RInputEvent.h:69
bool isValid() const
Definition RInputEvent.h:61
RGraphicsScene & scene
Definition RInputEvent.h:71
RGraphicsView & view
Definition RInputEvent.h:72
Represents a 3d vector (x/y/z).
Definition RVector.h:47
#define QCADCORE_EXPORT
Definition core_global.h:10
void getGraphicsView()
Returns the current or last active RGraphicsView.
Definition simple.js:32
char s
Definition opennurbs_string.cpp:32