QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
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
28class RDocument;
29class RExporter;
30
39
40 Q_DECLARE_TR_FUNCTIONS(RTextBasedEntity)
41
42public:
56
75
76public:
77 RTextEntity(RDocument* document, const RTextData& data);
78 virtual ~RTextEntity();
79
80 static void init();
81
83 return RS::EntityText;
84 }
85
86 static QSet<RPropertyTypeId> getStaticPropertyTypeIds() {
88 }
89
90 virtual QSharedPointer<RObject> clone() const {
91 return QSharedPointer<RObject>(new RTextEntity(*this));
92 }
93
94 QSharedPointer<RTextEntity> cloneToTextEntity() const {
95 return QSharedPointer<RTextEntity>(new RTextEntity(*this));
96 }
97
98 virtual RTextData& getData() {
99 return data;
100 }
101
103 data = d;
104 }
105
106 virtual const RTextData& getData() const {
107 return data;
108 }
109
110protected:
111 virtual void print(QDebug dbg) const;
112
113protected:
115};
116
118Q_DECLARE_METATYPE(QSharedPointer<RTextEntity>)
119Q_DECLARE_METATYPE(QSharedPointer<RTextEntity>*)
120
121#endif
Q_DECLARE_METATYPE(RMath *)
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
@ EntityText
Text.
Definition RS.h:259
Text entity.
Definition RTextBasedEntity.h:38
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition RTextBasedEntity.cpp:234
static void init()
Definition RTextBasedEntity.cpp:61
Text entity data class.
Definition RTextData.h:38
Linear dimension entity class.
Definition RTextEntity.h:38
virtual const RTextData & getData() const
Definition RTextEntity.h:106
virtual QSharedPointer< RObject > clone() const
Definition RTextEntity.h:90
static RPropertyTypeId PropertyLinetype
Definition RTextEntity.h:50
static RPropertyTypeId PropertyPlainText
Definition RTextEntity.h:62
static RPropertyTypeId PropertyWidth
Definition RTextEntity.h:65
static RPropertyTypeId PropertyBlock
Definition RTextEntity.h:48
static RPropertyTypeId PropertyColor
Definition RTextEntity.h:53
static RPropertyTypeId PropertyLineweight
Definition RTextEntity.h:52
static RPropertyTypeId PropertyWorkingSet
Definition RTextEntity.h:46
static RPropertyTypeId PropertyHAlign
Definition RTextEntity.h:71
QSharedPointer< RTextEntity > cloneToTextEntity() const
Definition RTextEntity.h:94
static RPropertyTypeId PropertyAngle
Definition RTextEntity.h:66
static RPropertyTypeId PropertyUpsideDown
Definition RTextEntity.h:74
static RPropertyTypeId PropertyXScale
Definition RTextEntity.h:67
virtual RTextData & getData()
Definition RTextEntity.h:98
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition RTextEntity.h:86
static RPropertyTypeId PropertyHeight
Definition RTextEntity.h:64
static RPropertyTypeId PropertyProtected
Definition RTextEntity.h:45
static RPropertyTypeId PropertyPositionZ
Definition RTextEntity.h:60
static RPropertyTypeId PropertyBackward
Definition RTextEntity.h:73
static RPropertyTypeId PropertyLayer
Definition RTextEntity.h:49
void setData(RTextData &d)
Definition RTextEntity.h:102
static RPropertyTypeId PropertyDrawOrder
Definition RTextEntity.h:55
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RTextEntity.h:43
static RPropertyTypeId PropertyPositionX
Definition RTextEntity.h:58
static RPropertyTypeId PropertyBold
Definition RTextEntity.h:68
static RPropertyTypeId PropertyFontName
Definition RTextEntity.h:63
static RPropertyTypeId PropertyType
Definition RTextEntity.h:47
RTextData data
Definition RTextEntity.h:114
static RPropertyTypeId PropertyHandle
Definition RTextEntity.h:44
static RPropertyTypeId PropertyVAlign
Definition RTextEntity.h:72
static RPropertyTypeId PropertySimple
Definition RTextEntity.h:57
static RPropertyTypeId PropertyItalic
Definition RTextEntity.h:69
static RPropertyTypeId PropertyLinetypeScale
Definition RTextEntity.h:51
static RS::EntityType getRtti()
Definition RTextEntity.h:82
static RPropertyTypeId PropertyDisplayedColor
Definition RTextEntity.h:54
static RPropertyTypeId PropertyLineSpacingFactor
Definition RTextEntity.h:70
static RPropertyTypeId PropertyText
Definition RTextEntity.h:61
static RPropertyTypeId PropertyPositionY
Definition RTextEntity.h:59
#define QCADENTITY_EXPORT
Definition entity_global.h:10