QCAD
Open Source 2D CAD
RDimLinearEntity.h
Go to the documentation of this file.
1 
20 #ifndef RDIMLINEARENTITY_H
21 #define RDIMLINEARENTITY_H
22 
23 #include "entity_global.h"
24 
25 #include "RDimensionEntity.h"
26 #include "RDimLinearData.h"
27 
28 class RDocument;
29 class RExporter;
30 
39 
40  Q_DECLARE_TR_FUNCTIONS(RDimLinearEntity)
41 
42 public:
54 
62 
67 
71 
75 
79 
80 public:
82  virtual ~RDimLinearEntity();
83 
84  static void init();
85 
86  bool setProperty(RPropertyTypeId propertyTypeId, const QVariant& value,
87  RTransaction* transaction=NULL);
88  QPair<QVariant, RPropertyAttributes> getProperty(
89  RPropertyTypeId& propertyTypeId,
90  bool humanReadable = false, bool noAttributes = false);
91 
92  virtual RDimLinearData& getData() = 0;
93  virtual const RDimLinearData& getData() const = 0;
94 
95  void setExtensionPoint1(const RVector& p) {
96  getData().setExtensionPoint1(p);
97  }
98 
100  return getData().getExtensionPoint1();
101  }
102 
103  void setExtensionPoint2(const RVector& p) {
104  getData().setExtensionPoint2(p);
105  }
106 
108  return getData().getExtensionPoint2();
109  }
110 
111 protected:
112  virtual void print(QDebug dbg) const;
113 };
114 
116 Q_DECLARE_METATYPE(QSharedPointer<RDimLinearEntity>)
117 Q_DECLARE_METATYPE(QSharedPointer<RDimLinearEntity>*)
118 
119 #endif
static RPropertyTypeId PropertyExtensionPoint2Y
Definition: RDimLinearEntity.h:77
bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition: RDimensionEntity.cpp:101
static RPropertyTypeId PropertyColor
Definition: RDimLinearEntity.h:52
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
Base class for dimension entity classes.
Definition: RDimensionEntity.h:38
virtual RDimensionData & getData()=0
static RPropertyTypeId PropertyDrawOrder
Definition: RDimLinearEntity.h:53
static RPropertyTypeId PropertyUpperTolerance
Definition: RDimLinearEntity.h:59
static RPropertyTypeId PropertyMiddleOfTextZ
Definition: RDimLinearEntity.h:57
void setExtensionPoint1(const RVector &p)
Definition: RDimLinearEntity.h:95
static RPropertyTypeId PropertyDimensionLinePosY
Definition: RDimLinearEntity.h:69
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
void setExtensionPoint2(const RVector &p)
Definition: RDimLinearEntity.h:103
static RPropertyTypeId PropertyDimensionLinePosX
Definition: RDimLinearEntity.h:68
static RPropertyTypeId PropertyType
Definition: RDimLinearEntity.h:46
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RPropertyTypeId.h:57
static RPropertyTypeId PropertyHandle
Definition: RDimLinearEntity.h:44
int Id
Definition: RObject.h:53
static RPropertyTypeId PropertyMeasuredValue
Definition: RDimLinearEntity.h:61
static RPropertyTypeId PropertyExtensionPoint2Z
Definition: RDimLinearEntity.h:78
Transaction implementation.
Definition: RTransaction.h:70
static RPropertyTypeId PropertyBlock
Definition: RDimLinearEntity.h:47
RVector getExtensionPoint2() const
Definition: RDimLinearEntity.h:107
static const Id INVALID_ID
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RObject.h:54
static RPropertyTypeId PropertyText
Definition: RDimLinearEntity.h:58
static RPropertyTypeId PropertyDimScale
Definition: RDimLinearEntity.h:64
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition: RDimensionEntity.cpp:275
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimLinearEntity.h:43
static RPropertyTypeId PropertyExtensionPoint1X
Definition: RDimLinearEntity.h:72
Linear dimension entity base class.
Definition: RDimLinearEntity.h:38
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:63
static RPropertyTypeId PropertyLayer
Definition: RDimLinearEntity.h:48
Q_DECLARE_METATYPE(RMath *)
static RPropertyTypeId PropertyAutoTextPos
Definition: RDimLinearEntity.h:65
static RPropertyTypeId PropertyMiddleOfTextX
Definition: RDimLinearEntity.h:55
static RPropertyTypeId PropertyExtensionPoint1Z
Definition: RDimLinearEntity.h:74
static RPropertyTypeId PropertyLowerTolerance
Definition: RDimLinearEntity.h:60
static RPropertyTypeId PropertyLineweight
Definition: RDimLinearEntity.h:51
static RPropertyTypeId PropertyFontName
Definition: RDimLinearEntity.h:66
Abstract base class for exporters.
Definition: RExporter.h:63
static RPropertyTypeId PropertyLinetypeScale
Definition: RDimLinearEntity.h:50
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimLinearData.h:36
static RPropertyTypeId PropertyMiddleOfTextY
Definition: RDimLinearEntity.h:56
static RPropertyTypeId PropertyExtensionPoint2X
Definition: RDimLinearEntity.h:76
static void init()
Definition: RDimensionEntity.cpp:65
static RPropertyTypeId PropertyLinetype
Definition: RDimLinearEntity.h:49
RVector getExtensionPoint1() const
Definition: RDimLinearEntity.h:99
QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false)
Definition: RDimensionEntity.cpp:148
static RPropertyTypeId PropertyLinearFactor
Definition: RDimLinearEntity.h:63
static RPropertyTypeId PropertyExtensionPoint1Y
Definition: RDimLinearEntity.h:73
static RPropertyTypeId PropertyDimensionLinePosZ
Definition: RDimLinearEntity.h:70
static RPropertyTypeId PropertyProtected
Definition: RDimLinearEntity.h:45