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:
56 
64 
72 
75 
79 
83 
84 public:
85  RDimRadialEntity(RDocument* document, const RDimRadialData& data);
86  virtual ~RDimRadialEntity();
87 
88  static void init();
89 
90  static QSet<RPropertyTypeId> getStaticPropertyTypeIds() {
92  }
93 
94  virtual RDimRadialEntity* clone() const {
95  return new RDimRadialEntity(*this);
96  }
97 
98  virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant& value,
99  RTransaction* transaction=NULL);
100  virtual QPair<QVariant, RPropertyAttributes> getProperty(
101  RPropertyTypeId& propertyTypeId,
102  bool humanReadable = false, bool noAttributes = false, bool showOnRequest = false);
103 
104  virtual RDimRadialData& getData() {
105  return data;
106  }
107 
109  data = d;
110  }
111 
112  virtual const RDimRadialData& getData() const {
113  return data;
114  }
115 
116  void setChordPoint(const RVector& p) {
117  data.setChordPoint(p);
118  }
119 
121  return data.getChordPoint();
122  }
123 
124 protected:
125  virtual void print(QDebug dbg) const;
126 
127 protected:
129 };
130 
132 Q_DECLARE_METATYPE(QSharedPointer<RDimRadialEntity>)
133 Q_DECLARE_METATYPE(QSharedPointer<RDimRadialEntity>*)
134 
135 #endif
RDimRadialEntity::PropertyUpperTolerance
static RPropertyTypeId PropertyUpperTolerance
Definition: RDimRadialEntity.h:61
RDimensionEntity
Base class for dimension entity classes.
Definition: RDimensionEntity.h:38
RDimRadialEntity::PropertyCustom
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RDimRadialEntity.h:43
RDimRadialEntity::PropertyDimBlockName
static RPropertyTypeId PropertyDimBlockName
Definition: RDimRadialEntity.h:67
RDimRadialEntity::PropertyDimScale
static RPropertyTypeId PropertyDimScale
Definition: RDimRadialEntity.h:66
RDimensionEntity::print
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition: RDimensionEntity.cpp:353
RDimRadialEntity::clone
virtual RDimRadialEntity * clone() const
Definition: RDimRadialEntity.h:94
RDimRadialEntity::PropertyFontName
static RPropertyTypeId PropertyFontName
Definition: RDimRadialEntity.h:69
RDimRadialEntity::setChordPoint
void setChordPoint(const RVector &p)
Definition: RDimRadialEntity.h:116
RDimRadialEntity::PropertyLayer
static RPropertyTypeId PropertyLayer
Definition: RDimRadialEntity.h:49
RDimRadialEntity::PropertyCenterPointY
static RPropertyTypeId PropertyCenterPointY
Definition: RDimRadialEntity.h:77
RDimRadialEntity::PropertyType
static RPropertyTypeId PropertyType
Definition: RDimRadialEntity.h:47
RDimRadialEntity::setData
void setData(RDimRadialData &d)
Definition: RDimRadialEntity.h:108
RVector
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
RDimRadialEntity::PropertyArrow1Flipped
static RPropertyTypeId PropertyArrow1Flipped
Definition: RDimRadialEntity.h:70
RDimRadialEntity::PropertyMeasuredValue
static RPropertyTypeId PropertyMeasuredValue
Definition: RDimRadialEntity.h:63
RDimRadialEntity::PropertyProtected
static RPropertyTypeId PropertyProtected
Definition: RDimRadialEntity.h:45
RDimRadialEntity::PropertyExtLineFix
static RPropertyTypeId PropertyExtLineFix
Definition: RDimRadialEntity.h:73
RDimRadialData.h
RDimRadialEntity::PropertyLinetypeScale
static RPropertyTypeId PropertyLinetypeScale
Definition: RDimRadialEntity.h:51
RDimRadialEntity::PropertyDisplayedColor
static RPropertyTypeId PropertyDisplayedColor
Definition: RDimRadialEntity.h:54
QCADENTITY_EXPORT
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
RDimRadialEntity::getData
virtual const RDimRadialData & getData() const
Definition: RDimRadialEntity.h:112
RDimRadialEntity::PropertyChordPointX
static RPropertyTypeId PropertyChordPointX
Definition: RDimRadialEntity.h:80
RDimRadialEntity::PropertyArrow2Flipped
static RPropertyTypeId PropertyArrow2Flipped
Definition: RDimRadialEntity.h:71
RDimRadialEntity::getData
virtual RDimRadialData & getData()
Definition: RDimRadialEntity.h:104
RDimensionEntity::getProperty
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition: RDimensionEntity.cpp:176
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RDimRadialEntity::PropertyCenterPointX
static RPropertyTypeId PropertyCenterPointX
Definition: RDimRadialEntity.h:76
RDimensionEntity::setProperty
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition: RDimensionEntity.cpp:122
RDimRadialEntity::getChordPoint
RVector getChordPoint() const
Definition: RDimRadialEntity.h:120
RPropertyTypeId
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPropertyTypeId.h:59
RDimRadialEntity::PropertyText
static RPropertyTypeId PropertyText
Definition: RDimRadialEntity.h:60
RDimRadialEntity::PropertyColor
static RPropertyTypeId PropertyColor
Definition: RDimRadialEntity.h:53
RDimRadialEntity::PropertyLinetype
static RPropertyTypeId PropertyLinetype
Definition: RDimRadialEntity.h:50
RExporter
Abstract base class for exporters.
Definition: RExporter.h:72
RDimRadialEntity::PropertyLineweight
static RPropertyTypeId PropertyLineweight
Definition: RDimRadialEntity.h:52
RDocument
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition: RDocument.h:72
RDimRadialEntity::PropertyCenterPointZ
static RPropertyTypeId PropertyCenterPointZ
Definition: RDimRadialEntity.h:78
RDimRadialEntity
Aligned dimension entity class.
Definition: RDimRadialEntity.h:38
RDimRadialEntity::PropertyExtLineFixLength
static RPropertyTypeId PropertyExtLineFixLength
Definition: RDimRadialEntity.h:74
RDimRadialEntity::data
RDimRadialData data
Definition: RDimRadialEntity.h:128
RDimRadialEntity::PropertyAutoTextPos
static RPropertyTypeId PropertyAutoTextPos
Definition: RDimRadialEntity.h:68
RDimRadialEntity::PropertyWorkingSet
static RPropertyTypeId PropertyWorkingSet
Definition: RDimRadialEntity.h:46
RDimRadialEntity::PropertyLowerTolerance
static RPropertyTypeId PropertyLowerTolerance
Definition: RDimRadialEntity.h:62
RDimensionEntity::init
static void init()
Definition: RDimensionEntity.cpp:76
RDimRadialEntity::PropertyLinearFactor
static RPropertyTypeId PropertyLinearFactor
Definition: RDimRadialEntity.h:65
RDimRadialEntity::PropertyChordPointY
static RPropertyTypeId PropertyChordPointY
Definition: RDimRadialEntity.h:81
RTransaction
Transaction implementation.
Definition: RTransaction.h:74
RPropertyTypeId::getPropertyTypeIds
static QSet< RPropertyTypeId > getPropertyTypeIds(const std::type_info &classInfo, RPropertyAttributes::Option=RPropertyAttributes::NoOptions)
Gets all property type IDs that where registered for the given class.
Definition: RPropertyTypeId.cpp:273
RDimRadialData
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RDimRadialData.h:36
RDimRadialEntity::PropertyMiddleOfTextZ
static RPropertyTypeId PropertyMiddleOfTextZ
Definition: RDimRadialEntity.h:59
RDimRadialEntity::PropertyBlock
static RPropertyTypeId PropertyBlock
Definition: RDimRadialEntity.h:48
entity_global.h
RDimRadialEntity::getStaticPropertyTypeIds
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition: RDimRadialEntity.h:90
RDimRadialEntity::PropertyChordPointZ
static RPropertyTypeId PropertyChordPointZ
Definition: RDimRadialEntity.h:82
RDimRadialEntity::PropertyHandle
static RPropertyTypeId PropertyHandle
Definition: RDimRadialEntity.h:44
RDimensionEntity.h
RDimRadialEntity::PropertyDrawOrder
static RPropertyTypeId PropertyDrawOrder
Definition: RDimRadialEntity.h:55
RDimRadialEntity::PropertyMiddleOfTextY
static RPropertyTypeId PropertyMiddleOfTextY
Definition: RDimRadialEntity.h:58
RDimRadialEntity::PropertyMiddleOfTextX
static RPropertyTypeId PropertyMiddleOfTextX
Definition: RDimRadialEntity.h:57