QCAD
Open Source 2D CAD
REntityPickEvent.h
Go to the documentation of this file.
1 
20 #ifndef RENTITYPICKEVENT_H
21 #define RENTITYPICKEVENT_H
22 
23 #include "core_global.h"
24 
25 #include "RInputEvent.h"
26 #include "REntity.h"
27 #include "RVector.h"
28 
29 class RGraphicsView;
30 class RGraphicsScene;
31 
39 public:
44  REntityPickEvent(REntity::Id entityId, const RVector& position,
46 
51  return entityId;
52  }
53 
54  void setModifiers(Qt::KeyboardModifiers m) {
55  mods = m;
56  }
57  Qt::KeyboardModifiers getModifiers() const {
58  return mods;
59  }
60 
64  bool isValid() const {
65  return entityId!=REntity::INVALID_ID;
66  }
67 
68 private:
70  Qt::KeyboardModifiers mods;
71 };
72 
75 
76 #endif
Qt::KeyboardModifiers getModifiers() const
Definition: REntityPickEvent.h:57
Qt::KeyboardModifiers mods
Definition: REntityPickEvent.h:70
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
An input event for a graphics scene.
Definition: RInputEvent.h:41
Abstract base class for all graphics scenes.
Definition: RGraphicsScene.h:61
REntity::Id entityId
Definition: REntityPickEvent.h:69
REntity::Id getEntityId() const
Definition: REntityPickEvent.h:50
#define QCADCORE_EXPORT
Definition: core_global.h:10
int Id
Definition: RObject.h:57
void setModifiers(Qt::KeyboardModifiers m)
Definition: REntityPickEvent.h:54
Entity pick event.
Definition: REntityPickEvent.h:38
static const Id INVALID_ID
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RObject.h:58
bool isValid() const
Definition: REntityPickEvent.h:64
Q_DECLARE_METATYPE(RMath *)
Graphics view.
Definition: RGraphicsView.h:58