QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPointEntity.h
Go to the documentation of this file.
1 #ifndef RPOINTENTITY_H
2 #define RPOINTENTITY_H
3 
4 #include "REntity.h"
5 #include "RPointData.h"
6 
7 class RDocument;
8 class RExporter;
9 
17 class RPointEntity: public REntity {
18 
19 public:
32 
33 public:
36  virtual ~RPointEntity();
37 
38  static void init();
39 
40  virtual RPointEntity* clone() const {
41  return new RPointEntity(*this);
42  }
43 
44  virtual RS::EntityType getType() const {
45  return RS::EntityPoint;
46  }
47 
48  bool setProperty(RPropertyTypeId propertyTypeId, const QVariant& value);
49  QPair<QVariant, RPropertyAttributes> getProperty(
50  RPropertyTypeId propertyTypeId,
51  bool humanReadable = false, bool noAttributes = false);
52 
53  virtual void exportEntity(RExporter& e, bool preview=false) const;
54 
55  virtual RPointData& getData() {
56  return data;
57  }
58 
59  virtual const RPointData& getData() const {
60  return data;
61  }
62 
63  RVector getPosition() const {
64  return data.getPosition();
65  }
66 
67 protected:
68  virtual void print(QDebug dbg) const;
69 
70 protected:
72 };
73 
75 Q_DECLARE_METATYPE(QSharedPointer<RPointEntity>)
76 Q_DECLARE_METATYPE(QSharedPointer<RPointEntity>*)
77 
78 #endif