QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RDimRotatedEntity.h
Go to the documentation of this file.
1
20#ifndef RDIMROTATEDENTITY_H
21#define RDIMROTATEDENTITY_H
22
23#include "entity_global.h"
24
25#include "RDimLinearEntity.h"
26#include "RDimRotatedData.h"
27
28class RDocument;
29class RExporter;
30
39
40 Q_DECLARE_TR_FUNCTIONS(RDimRotatedEntity)
41
42public:
56
64
70 //static RPropertyTypeId PropertyDimdli;
80// static RPropertyTypeId PropertyDimaunit;
81// static RPropertyTypeId PropertyDimadec;
82// static RPropertyTypeId PropertyDimazin;
85
86// static RPropertyTypeId PropertyLinearFactor;
87// static RPropertyTypeId PropertyDimScale;
93
96
100
104
108
110
111public:
112 RDimRotatedEntity(RDocument* document, const RDimRotatedData& data);
113 virtual ~RDimRotatedEntity();
114
115 static void init();
116
119 }
120
124
125 virtual QSharedPointer<RObject> clone() const {
126 return QSharedPointer<RObject>(new RDimRotatedEntity(*this));
127 }
128
129 QSharedPointer<RDimRotatedEntity> cloneToDimRotatedEntity() const {
130 return QSharedPointer<RDimRotatedEntity>(new RDimRotatedEntity(*this));
131 }
132
133 virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant& value,
134 RTransaction* transaction=NULL);
135 virtual QPair<QVariant, RPropertyAttributes> getProperty(
136 RPropertyTypeId& propertyTypeId,
137 bool humanReadable = false, bool noAttributes = false, bool showOnRequest = false);
138
140 return data;
141 }
142
144 data = d;
145 }
146
147 virtual const RDimRotatedData& getData() const {
148 return data;
149 }
150
152 data.setExtensionPoint1(p);
153 }
154
156 return data.getExtensionPoint1();
157 }
158
160 data.setExtensionPoint2(p);
161 }
162
164 return data.getExtensionPoint2();
165 }
166
167 void setRotation(double a) {
168 data.setRotation(a);
169 }
170
171 double getRotation() const {
172 return data.getRotation();
173 }
174
175protected:
176 virtual void print(QDebug dbg) const;
177
178protected:
180};
181
183Q_DECLARE_METATYPE(QSharedPointer<RDimRotatedEntity>)
184Q_DECLARE_METATYPE(QSharedPointer<RDimRotatedEntity>*)
185
186#endif
Q_DECLARE_METATYPE(RMath *)
Linear dimension entity base class.
Definition RDimLinearEntity.h:38
static void init()
Definition RDimLinearEntity.cpp:94
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition RDimLinearEntity.cpp:192
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition RDimLinearEntity.cpp:169
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition RDimLinearEntity.cpp:222
Rotated dimension entity data class.
Definition RDimRotatedData.h:39
Rotated, linear dimension entity class.
Definition RDimRotatedEntity.h:38
static RPropertyTypeId PropertyExtensionPoint1X
Definition RDimRotatedEntity.h:101
QSharedPointer< RDimRotatedEntity > cloneToDimRotatedEntity() const
Definition RDimRotatedEntity.h:129
static RPropertyTypeId PropertyExtLineFixLength
Definition RDimRotatedEntity.h:95
static RPropertyTypeId PropertyProtected
Definition RDimRotatedEntity.h:45
static RPropertyTypeId PropertyDimzin
Definition RDimRotatedEntity.h:79
static RPropertyTypeId PropertyDimasz
Definition RDimRotatedEntity.h:69
static RPropertyTypeId PropertyDimtih
Definition RDimRotatedEntity.h:74
static RPropertyTypeId PropertyAngle
Definition RDimRotatedEntity.h:109
double getRotation() const
Definition RDimRotatedEntity.h:171
static RPropertyTypeId PropertyDimlunit
Definition RDimRotatedEntity.h:76
static RPropertyTypeId PropertyMiddleOfTextX
Definition RDimRotatedEntity.h:57
static RPropertyTypeId PropertyFontName
Definition RDimRotatedEntity.h:90
static RPropertyTypeId PropertyExtensionPoint1Z
Definition RDimRotatedEntity.h:103
virtual RDimRotatedData & getData()
Definition RDimRotatedEntity.h:139
static RPropertyTypeId PropertyDimensionLinePosZ
Definition RDimRotatedEntity.h:99
static RPropertyTypeId PropertyDimtxt
Definition RDimRotatedEntity.h:67
static RPropertyTypeId PropertyColor
Definition RDimRotatedEntity.h:53
static RPropertyTypeId PropertyDisplayedColor
Definition RDimRotatedEntity.h:54
static RPropertyTypeId PropertyDimgap
Definition RDimRotatedEntity.h:68
virtual QSharedPointer< RObject > clone() const
Definition RDimRotatedEntity.h:125
virtual const RDimRotatedData & getData() const
Definition RDimRotatedEntity.h:147
static RPropertyTypeId PropertyMiddleOfTextZ
Definition RDimRotatedEntity.h:59
static RPropertyTypeId PropertyExtensionPoint2X
Definition RDimRotatedEntity.h:105
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RDimRotatedEntity.h:43
static RPropertyTypeId PropertyLinetypeScale
Definition RDimRotatedEntity.h:51
static RPropertyTypeId PropertyDimexo
Definition RDimRotatedEntity.h:72
static RPropertyTypeId PropertyLowerTolerance
Definition RDimRotatedEntity.h:62
static RPropertyTypeId PropertyBlock
Definition RDimRotatedEntity.h:48
RVector getExtensionPoint2() const
Definition RDimRotatedEntity.h:163
static RPropertyTypeId PropertyDimlfac
Definition RDimRotatedEntity.h:66
RVector getExtensionPoint1() const
Definition RDimRotatedEntity.h:155
static RPropertyTypeId PropertyDimclrt
Definition RDimRotatedEntity.h:84
static RPropertyTypeId PropertyLayer
Definition RDimRotatedEntity.h:49
static RPropertyTypeId PropertyLinetype
Definition RDimRotatedEntity.h:50
static RPropertyTypeId PropertyDimscale
Definition RDimRotatedEntity.h:65
static RPropertyTypeId PropertyMiddleOfTextY
Definition RDimRotatedEntity.h:58
static RPropertyTypeId PropertyHandle
Definition RDimRotatedEntity.h:44
static RPropertyTypeId PropertyText
Definition RDimRotatedEntity.h:60
static RPropertyTypeId PropertyDimensionLinePosX
Definition RDimRotatedEntity.h:97
static RPropertyTypeId PropertyArrow2Flipped
Definition RDimRotatedEntity.h:92
static RPropertyTypeId PropertyDimensionLinePosY
Definition RDimRotatedEntity.h:98
RDimRotatedData data
Definition RDimRotatedEntity.h:179
static RPropertyTypeId PropertyExtLineFix
Definition RDimRotatedEntity.h:94
static RPropertyTypeId PropertyDimdec
Definition RDimRotatedEntity.h:77
static RPropertyTypeId PropertyDimBlockName
Definition RDimRotatedEntity.h:88
static RPropertyTypeId PropertyAutoTextPos
Definition RDimRotatedEntity.h:89
static RPropertyTypeId PropertyDimtsz
Definition RDimRotatedEntity.h:75
static RS::EntityType getRtti()
Definition RDimRotatedEntity.h:117
static RPropertyTypeId PropertyExtensionPoint2Z
Definition RDimRotatedEntity.h:107
void setExtensionPoint1(const RVector &p)
Definition RDimRotatedEntity.h:151
static RPropertyTypeId PropertyExtensionPoint1Y
Definition RDimRotatedEntity.h:102
static RPropertyTypeId PropertyDimdsep
Definition RDimRotatedEntity.h:78
static RPropertyTypeId PropertyMeasuredValue
Definition RDimRotatedEntity.h:63
static RPropertyTypeId PropertyExtensionPoint2Y
Definition RDimRotatedEntity.h:106
static RPropertyTypeId PropertyUpperTolerance
Definition RDimRotatedEntity.h:61
void setData(RDimRotatedData &d)
Definition RDimRotatedEntity.h:143
static RPropertyTypeId PropertyArrow1Flipped
Definition RDimRotatedEntity.h:91
static RPropertyTypeId PropertyDimtad
Definition RDimRotatedEntity.h:73
static RPropertyTypeId PropertyWorkingSet
Definition RDimRotatedEntity.h:46
static RPropertyTypeId PropertyDimexe
Definition RDimRotatedEntity.h:71
void setExtensionPoint2(const RVector &p)
Definition RDimRotatedEntity.h:159
static RPropertyTypeId PropertyLineweight
Definition RDimRotatedEntity.h:52
static RPropertyTypeId PropertyArchTick
Definition RDimRotatedEntity.h:83
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition RDimRotatedEntity.h:121
static RPropertyTypeId PropertyDrawOrder
Definition RDimRotatedEntity.h:55
static RPropertyTypeId PropertyType
Definition RDimRotatedEntity.h:47
void setRotation(double a)
Definition RDimRotatedEntity.h:167
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Abstract base class for exporters.
Definition RExporter.h:78
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyTypeId.h:54
static QSet< RPropertyTypeId > getPropertyTypeIds(RS::EntityType type, RPropertyAttributes::Option=RPropertyAttributes::NoOptions)
Gets all property type IDs that where registered for the given class.
Definition RPropertyTypeId.cpp:283
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityDimRotated
Linear rotated Dimension.
Definition RS.h:265
Transaction implementation.
Definition RTransaction.h:73
Represents a 3d vector (x/y/z).
Definition RVector.h:47
#define QCADENTITY_EXPORT
Definition entity_global.h:10
#define NULL
Definition opennurbs_system.h:256