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