QCAD
Open Source 2D CAD
RTextEntity.h
Go to the documentation of this file.
1 
20 #ifndef RTEXTENTITY_H
21 #define RTEXTENTITY_H
22 
23 #include "entity_global.h"
24 
25 #include "RTextBasedEntity.h"
26 #include "RTextData.h"
27 
28 class RDocument;
29 class RExporter;
30 
39 
40  Q_DECLARE_TR_FUNCTIONS(RTextBasedEntity)
41 
42 public:
55 
71 
72 public:
73  RTextEntity(RDocument* document, const RTextData& data);
74  virtual ~RTextEntity();
75 
76  static void init();
77 
78  static QSet<RPropertyTypeId> getStaticPropertyTypeIds() {
80  }
81 
82  virtual RTextEntity* clone() const {
83  return new RTextEntity(*this);
84  }
85 
86  virtual RTextData& getData() {
87  return data;
88  }
89 
90  void setData(RTextData& d) {
91  data = d;
92  }
93 
94  virtual const RTextData& getData() const {
95  return data;
96  }
97 
98 protected:
99  virtual void print(QDebug dbg) const;
100 
101 protected:
103 };
104 
106 Q_DECLARE_METATYPE(QSharedPointer<RTextEntity>)
107 Q_DECLARE_METATYPE(QSharedPointer<RTextEntity>*)
108 
109 #endif
static RPropertyTypeId PropertyLineSpacingFactor
Definition: RTextEntity.h:68
static RPropertyTypeId PropertyPlainText
Definition: RTextEntity.h:61
static RPropertyTypeId PropertyXScale
Definition: RTextEntity.h:65
static RPropertyTypeId PropertyPositionY
Definition: RTextEntity.h:58
static void init()
Definition: RTextBasedEntity.cpp:58
static RPropertyTypeId PropertyBold
Definition: RTextEntity.h:66
Linear dimension entity class.
Definition: RTextEntity.h:38
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
void setData(RTextData &d)
Definition: RTextEntity.h:90
static RPropertyTypeId PropertyLinetype
Definition: RTextEntity.h:49
static RPropertyTypeId PropertyLayer
Definition: RTextEntity.h:48
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition: RTextEntity.h:78
virtual RTextEntity * clone() const
Definition: RTextEntity.h:82
static RPropertyTypeId PropertyFontName
Definition: RTextEntity.h:62
RTextData data
Definition: RTextEntity.h:102
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition: RTextBasedEntity.cpp:172
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RPropertyTypeId.h:58
static RPropertyTypeId PropertyPositionZ
Definition: RTextEntity.h:59
static RPropertyTypeId PropertyLineweight
Definition: RTextEntity.h:51
static RPropertyTypeId PropertyDrawOrder
Definition: RTextEntity.h:54
static RPropertyTypeId PropertyColor
Definition: RTextEntity.h:52
static RPropertyTypeId PropertySimple
Definition: RTextEntity.h:56
static RPropertyTypeId PropertyLinetypeScale
Definition: RTextEntity.h:50
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RTextData.h:37
static RPropertyTypeId PropertyVAlign
Definition: RTextEntity.h:70
Text entity.
Definition: RTextBasedEntity.h:38
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
Q_DECLARE_METATYPE(RMath *)
virtual RTextData & getData()
Definition: RTextEntity.h:86
static RPropertyTypeId PropertyItalic
Definition: RTextEntity.h:67
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RTextEntity.h:43
static RPropertyTypeId PropertyType
Definition: RTextEntity.h:46
static RPropertyTypeId PropertyText
Definition: RTextEntity.h:60
static RPropertyTypeId PropertyHandle
Definition: RTextEntity.h:44
static RPropertyTypeId PropertyBlock
Definition: RTextEntity.h:47
Abstract base class for exporters.
Definition: RExporter.h:71
virtual const RTextData & getData() const
Definition: RTextEntity.h:94
static RPropertyTypeId PropertyHeight
Definition: RTextEntity.h:63
static RPropertyTypeId PropertyDisplayedColor
Definition: RTextEntity.h:53
static RPropertyTypeId PropertyAngle
Definition: RTextEntity.h:64
static RPropertyTypeId PropertyProtected
Definition: RTextEntity.h:45
static RPropertyTypeId PropertyHAlign
Definition: RTextEntity.h:69
static RPropertyTypeId PropertyPositionX
Definition: RTextEntity.h:57