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:
54 
70 
71 public:
72  RTextEntity(RDocument* document, const RTextData& data,
73  RObject::Id objectId = RObject::INVALID_ID);
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 RS::EntityType getType() const {
87  return RS::EntityText;
88  }
89 
90  virtual RTextData& getData() {
91  return data;
92  }
93 
94  void setData(RTextData& d) {
95  data = d;
96  }
97 
98  virtual const RTextData& getData() const {
99  return data;
100  }
101 
102 protected:
103  virtual void print(QDebug dbg) const;
104 
105 protected:
107 };
108 
110 Q_DECLARE_METATYPE(QSharedPointer<RTextEntity>)
111 Q_DECLARE_METATYPE(QSharedPointer<RTextEntity>*)
112 
113 #endif
static RPropertyTypeId PropertyLineSpacingFactor
Definition: RTextEntity.h:67
static RPropertyTypeId PropertyPlainText
Definition: RTextEntity.h:60
static RPropertyTypeId PropertyXScale
Definition: RTextEntity.h:64
static RPropertyTypeId PropertyPositionY
Definition: RTextEntity.h:57
Text.
Definition: RS.h:93
static void init()
Definition: RTextBasedEntity.cpp:57
static RPropertyTypeId PropertyBold
Definition: RTextEntity.h:65
Linear dimension entity class.
Definition: RTextEntity.h:38
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:75
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
void setData(RTextData &d)
Definition: RTextEntity.h:94
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:61
RTextData data
Definition: RTextEntity.h:106
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition: RTextBasedEntity.cpp:169
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RPropertyTypeId.h:57
static RPropertyTypeId PropertyPositionZ
Definition: RTextEntity.h:58
static RPropertyTypeId PropertyLineweight
Definition: RTextEntity.h:51
int Id
Definition: RObject.h:53
static RPropertyTypeId PropertyDrawOrder
Definition: RTextEntity.h:53
static RPropertyTypeId PropertyColor
Definition: RTextEntity.h:52
static RPropertyTypeId PropertySimple
Definition: RTextEntity.h:55
static RPropertyTypeId PropertyLinetypeScale
Definition: RTextEntity.h:50
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RTextData.h:37
static const Id INVALID_ID
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RObject.h:54
static RPropertyTypeId PropertyVAlign
Definition: RTextEntity.h:69
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:63
Q_DECLARE_METATYPE(RMath *)
virtual RTextData & getData()
Definition: RTextEntity.h:90
static RPropertyTypeId PropertyItalic
Definition: RTextEntity.h:66
virtual RS::EntityType getType() const
Definition: RTextEntity.h:86
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RTextEntity.h:43
static RPropertyTypeId PropertyType
Definition: RTextEntity.h:46
static RPropertyTypeId PropertyText
Definition: RTextEntity.h:59
static RPropertyTypeId PropertyHandle
Definition: RTextEntity.h:44
static RPropertyTypeId PropertyBlock
Definition: RTextEntity.h:47
Abstract base class for exporters.
Definition: RExporter.h:63
virtual const RTextData & getData() const
Definition: RTextEntity.h:98
static RPropertyTypeId PropertyHeight
Definition: RTextEntity.h:62
static RPropertyTypeId PropertyAngle
Definition: RTextEntity.h:63
static RPropertyTypeId PropertyProtected
Definition: RTextEntity.h:45
static RPropertyTypeId PropertyHAlign
Definition: RTextEntity.h:68
static RPropertyTypeId PropertyPositionX
Definition: RTextEntity.h:56