QCAD
Open Source 2D CAD
RDimRadialEntity.h
Go to the documentation of this file.
1 
20 #ifndef RDIMRADIALENTITY_H
21 #define RDIMRADIALENTITY_H
22 
23 #include "entity_global.h"
24 
25 #include "RDimensionEntity.h"
26 #include "RDimRadialData.h"
27 
28 class RDocument;
29 class RExporter;
30 
39 
40  Q_DECLARE_TR_FUNCTIONS(RDimRadialEntity)
41 
42 public:
55 
63 
69 
73 
77 
78 public:
79  RDimRadialEntity(RDocument* document, const RDimRadialData& data);
80  virtual ~RDimRadialEntity();
81 
82  static void init();
83 
84  static QSet<RPropertyTypeId> getStaticPropertyTypeIds() {
86  }
87 
88  virtual RDimRadialEntity* clone() const {
89  return new RDimRadialEntity(*this);
90  }
91 
92  bool setProperty(RPropertyTypeId propertyTypeId, const QVariant& value,
93  RTransaction* transaction=NULL);
94  QPair<QVariant, RPropertyAttributes> getProperty(
95  RPropertyTypeId& propertyTypeId,
96  bool humanReadable = false, bool noAttributes = false);
97 
98  virtual RDimRadialData& getData() {
99  return data;
100  }
101 
103  data = d;
104  }
105 
106  virtual const RDimRadialData& getData() const {
107  return data;
108  }
109 
110  void setChordPoint(const RVector& p) {
111  data.setChordPoint(p);
112  }
113 
115  return data.getChordPoint();
116  }
117 
118 protected:
119  virtual void print(QDebug dbg) const;
120 
121 protected:
123 };
124 
126 Q_DECLARE_METATYPE(QSharedPointer<RDimRadialEntity>)
127 Q_DECLARE_METATYPE(QSharedPointer<RDimRadialEntity>*)
128 
129 #endif
bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition: RDimensionEntity.cpp:105
static RPropertyTypeId PropertyProtected
Definition: RDimRadialEntity.h:45
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
Base class for dimension entity classes.
Definition: RDimensionEntity.h:38
virtual RDimRadialData & getData()
Definition: RDimRadialEntity.h:98
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RDimRadialEntity.h:43
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
static RPropertyTypeId PropertyLinetypeScale
Definition: RDimRadialEntity.h:50
virtual RDimRadialEntity * clone() const
Definition: RDimRadialEntity.h:88
static RPropertyTypeId PropertyType
Definition: RDimRadialEntity.h:46
static RPropertyTypeId PropertyHandle
Definition: RDimRadialEntity.h:44
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RPropertyTypeId.h:58
static RPropertyTypeId PropertyColor
Definition: RDimRadialEntity.h:52
static RPropertyTypeId PropertyLineweight
Definition: RDimRadialEntity.h:51
Transaction implementation.
Definition: RTransaction.h:74
RDimRadialData data
Definition: RDimRadialEntity.h:122
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RDimRadialData.h:36
static RPropertyTypeId PropertyLowerTolerance
Definition: RDimRadialEntity.h:61
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition: RDimRadialEntity.h:84
static RPropertyTypeId PropertyUpperTolerance
Definition: RDimRadialEntity.h:60
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition: RDimensionEntity.cpp:300
static RPropertyTypeId PropertyChordPointY
Definition: RDimRadialEntity.h:75
static QSet< RPropertyTypeId > getPropertyTypeIds(const std::type_info &classInfo)
Gets all property type IDs that where registered for the given class.
Definition: RPropertyTypeId.cpp:229
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:67
static RPropertyTypeId PropertyChordPointX
Definition: RDimRadialEntity.h:74
Q_DECLARE_METATYPE(RMath *)
static RPropertyTypeId PropertyBlock
Definition: RDimRadialEntity.h:47
virtual const RDimRadialData & getData() const
Definition: RDimRadialEntity.h:106
void setData(RDimRadialData &d)
Definition: RDimRadialEntity.h:102
static RPropertyTypeId PropertyMeasuredValue
Definition: RDimRadialEntity.h:62
static RPropertyTypeId PropertyMiddleOfTextZ
Definition: RDimRadialEntity.h:58
static RPropertyTypeId PropertyDisplayedColor
Definition: RDimRadialEntity.h:53
RVector getChordPoint() const
Definition: RDimRadialEntity.h:114
static RPropertyTypeId PropertyDimScale
Definition: RDimRadialEntity.h:65
static RPropertyTypeId PropertyLinetype
Definition: RDimRadialEntity.h:49
static RPropertyTypeId PropertyDimBlockName
Definition: RDimRadialEntity.h:66
static RPropertyTypeId PropertyCenterPointX
Definition: RDimRadialEntity.h:70
Abstract base class for exporters.
Definition: RExporter.h:71
static RPropertyTypeId PropertyMiddleOfTextY
Definition: RDimRadialEntity.h:57
Aligned dimension entity class.
Definition: RDimRadialEntity.h:38
static RPropertyTypeId PropertyCenterPointZ
Definition: RDimRadialEntity.h:72
static RPropertyTypeId PropertyLinearFactor
Definition: RDimRadialEntity.h:64
static RPropertyTypeId PropertyMiddleOfTextX
Definition: RDimRadialEntity.h:56
static RPropertyTypeId PropertyAutoTextPos
Definition: RDimRadialEntity.h:67
static RPropertyTypeId PropertyDrawOrder
Definition: RDimRadialEntity.h:54
static void init()
Definition: RDimensionEntity.cpp:67
static RPropertyTypeId PropertyLayer
Definition: RDimRadialEntity.h:48
static RPropertyTypeId PropertyFontName
Definition: RDimRadialEntity.h:68
static RPropertyTypeId PropertyCenterPointY
Definition: RDimRadialEntity.h:71
void setChordPoint(const RVector &p)
Definition: RDimRadialEntity.h:110
QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false)
Definition: RDimensionEntity.cpp:153
static RPropertyTypeId PropertyText
Definition: RDimRadialEntity.h:59
static RPropertyTypeId PropertyChordPointZ
Definition: RDimRadialEntity.h:76