QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RBlockReferenceEntity.h
Go to the documentation of this file.
1 #ifndef RBLOCKREFERENCEENTITY_H
2 #define RBLOCKREFERENCEENTITY_H
3 
4 #include "REntity.h"
5 #include "RBlockReferenceData.h"
6 
7 class RDocument;
8 class RExporter;
9 
16 
17 public:
27 
36 
37 public:
40  virtual ~RBlockReferenceEntity();
41 
42  static void init();
43 
44  virtual RBlockReferenceEntity* clone() const {
45  return new RBlockReferenceEntity(*this);
46  }
47 
48  virtual RS::EntityType getType() const {
49  return RS::EntityBlockRef;
50  }
51 
52  bool setProperty(RPropertyTypeId propertyTypeId, const QVariant& value);
53  QPair<QVariant, RPropertyAttributes> getProperty(
54  RPropertyTypeId propertyTypeId,
55  bool humanReadable = false, bool noAttributes = false);
56 
57  virtual void exportEntity(RExporter& e, bool preview = false) const;
58 
60  return data;
61  }
62 
63  virtual const RBlockReferenceData& getData() const {
64  return data;
65  }
66 
67  RVector getPosition() const {
68  return data.getPosition();
69  }
70 
72  return data.getScaleFactors();
73  }
74 
75  double getRotation() const {
76  return data.getRotation();
77  }
78 
80  data.setReferencedBlockId(blockId);
81  }
82 
84  return data.getReferencedBlockId();
85  }
86 
87  QString getReferencedBlockName() const {
89  }
90 
91  virtual void update() const {
92  data.update();
93  }
94 
95  void update(REntity::Id entityId) const {
96  data.update(entityId);
97  }
98 
102  virtual void print(QDebug dbg) const;
103 
104 protected:
106  mutable int recursionDepth;
107 };
108 
113 
114 #endif