20#ifndef RTEXTBASEDENTITY_H
21#define RTEXTBASEDENTITY_H
89 return getData().getRotatedBoundingBox();
94 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
96 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
103 return getData().getPainterPaths(draft);
106 virtual QList<QSharedPointer<RShape> >
getShapes(
const RBox& queryBox =
RDEFAULT_RBOX,
bool ignoreComplex =
false,
bool segment =
false, QList<RObject::Id>* entityIds =
NULL)
const {
111 return getData().getExploded();
143 return getData().isUpsideDown();
151 return getData().getPosition();
155 getData().setPosition(position);
159 return getData().getAlignmentPoint();
163 getData().setAlignmentPoint(alignmentPoint);
167 return getData().getTextHeight();
175 return getData().getTextWidth();
202 return getData().getFontName();
206 getData().setFontName(fontName);
210 return getData().getFontFile();
214 getData().setDrawingDirection(drawingDirection);
218 return getData().getDrawingDirection();
222 getData().setLineSpacingStyle(lineSpacingStyle);
226 return getData().getLineSpacingStyle();
230 getData().setLineSpacingFactor(lineSpacingFactor);
234 return getData().getLineSpacingFactor();
262 return getData().getEscapedText(escapeUnicode);
270 return getData().getPlainText();
282 return getData().getSimpleTextBlocks();
286 virtual void print(QDebug dbg)
const;
#define RDEFAULT_RBOX
Definition RBox.h:35
Q_DECLARE_METATYPE(RMath *)
Represents a box e.g.
Definition RBox.h:46
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const
Definition REntityData.h:111
Base class for all entity classes.
Definition REntity.h:63
virtual REntityData & getData()=0
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition REntity.cpp:236
virtual QSharedPointer< REntity > scaleNonUniform(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR)
Definition REntity.cpp:471
static void init()
Definition REntity.cpp:89
static RS::EntityType getRtti()
Definition REntity.h:98
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition REntity.cpp:338
virtual void exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const =0
Exports the entity to the given exporter.
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition REntity.cpp:487
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
VAlign
Vertical alignments.
Definition RS.h:332
TextLineSpacingStyle
Line spacing style for texts.
Definition RS.h:363
HAlign
Horizontal alignments.
Definition RS.h:342
TextDrawingDirection
Text drawing direction.
Definition RS.h:354
Stores and manages all data that defines the geometry and appearance of a text based entity (text,...
Definition RTextBasedData.h:68
Text entity.
Definition RTextBasedEntity.h:38
RS::TextDrawingDirection getDrawingDirection() const
Definition RTextBasedEntity.h:217
void setLineSpacingFactor(double lineSpacingFactor)
Definition RTextBasedEntity.h:229
virtual RTextBasedData & getTextData()
Definition RTextBasedEntity.h:114
double getTextWidth() const
Definition RTextBasedEntity.h:174
void setAlignmentPoint(const RVector &alignmentPoint)
Definition RTextBasedEntity.h:162
static RPropertyTypeId PropertyBold
Definition RTextBasedEntity.h:66
static RPropertyTypeId PropertyAngle
Definition RTextBasedEntity.h:64
double getWidth() const
Definition RTextBasedEntity.h:178
bool isUpsideDown() const
Definition RTextBasedEntity.h:142
RS::HAlign getHAlign() const
Definition RTextBasedEntity.h:193
RS::TextLineSpacingStyle getLineSpacingStyle() const
Definition RTextBasedEntity.h:225
double getLineSpacingFactor() const
Definition RTextBasedEntity.h:233
void setDrawingDirection(RS::TextDrawingDirection drawingDirection)
Definition RTextBasedEntity.h:213
void setVAlign(RS::VAlign va)
Definition RTextBasedEntity.h:189
bool isSimple() const
Definition RTextBasedEntity.h:257
virtual RTextBasedData & getData()=0
QString getFontName() const
Definition RTextBasedEntity.h:201
static RPropertyTypeId PropertyFontName
Definition RTextBasedEntity.h:61
void setUpsideDown(bool on)
Definition RTextBasedEntity.h:146
void setSimple(bool on)
Definition RTextBasedEntity.h:253
static RPropertyTypeId PropertySimple
Definition RTextBasedEntity.h:55
QList< RTextBasedData > getSimpleTextBlocks()
Definition RTextBasedEntity.h:281
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RTextBasedEntity.h:43
static RPropertyTypeId PropertyHeight
Definition RTextBasedEntity.h:62
static RPropertyTypeId PropertyType
Definition RTextBasedEntity.h:45
static RPropertyTypeId PropertyColor
Definition RTextBasedEntity.h:51
static RPropertyTypeId PropertyPositionX
Definition RTextBasedEntity.h:56
void setTextHeight(double h)
Definition RTextBasedEntity.h:170
void setBold(bool on)
Definition RTextBasedEntity.h:122
static RPropertyTypeId PropertyWidth
Definition RTextBasedEntity.h:63
double getTextHeight() const
Definition RTextBasedEntity.h:166
static RPropertyTypeId PropertyXScale
Definition RTextBasedEntity.h:65
void setBackward(bool on)
Definition RTextBasedEntity.h:138
bool isBold() const
Definition RTextBasedEntity.h:118
RVector getAlignmentPoint() const
Definition RTextBasedEntity.h:158
static RPropertyTypeId PropertyLinetype
Definition RTextBasedEntity.h:48
QString getEscapedText(bool escapeUnicode=false) const
Definition RTextBasedEntity.h:261
static RPropertyTypeId PropertyHAlign
Definition RTextBasedEntity.h:69
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition RTextBasedEntity.h:80
static RPropertyTypeId PropertyDisplayedColor
Definition RTextBasedEntity.h:52
void setFontName(const QString &fontName)
Definition RTextBasedEntity.h:205
static RPropertyTypeId PropertyDrawOrder
Definition RTextBasedEntity.h:53
RS::VAlign getVAlign() const
Definition RTextBasedEntity.h:185
void sync(const RTextBasedEntity &other)
Definition RTextBasedEntity.h:277
static RPropertyTypeId PropertyPositionY
Definition RTextBasedEntity.h:57
virtual const RTextBasedData & getData() const =0
static RPropertyTypeId PropertyLineweight
Definition RTextBasedEntity.h:50
static RPropertyTypeId PropertyLineSpacingFactor
Definition RTextBasedEntity.h:68
static RPropertyTypeId PropertyBackward
Definition RTextBasedEntity.h:71
static RPropertyTypeId PropertyLayer
Definition RTextBasedEntity.h:47
static RPropertyTypeId PropertyUpsideDown
Definition RTextBasedEntity.h:72
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const
Definition RTextBasedEntity.h:106
bool isItalic() const
Definition RTextBasedEntity.h:126
double getHeight() const
Definition RTextBasedEntity.h:181
QList< RVector > getRotatedBoundingBox() const
Definition RTextBasedEntity.h:88
RVector getPosition() const
Definition RTextBasedEntity.h:150
static RPropertyTypeId PropertyItalic
Definition RTextBasedEntity.h:67
void setItalic(bool on)
Definition RTextBasedEntity.h:130
double getAngle() const
Definition RTextBasedEntity.h:241
void setHAlign(RS::HAlign ha)
Definition RTextBasedEntity.h:197
virtual QList< QSharedPointer< RShape > > getExploded() const
Definition RTextBasedEntity.h:110
QString getFontFile() const
Definition RTextBasedEntity.h:209
static RPropertyTypeId PropertyBlock
Definition RTextBasedEntity.h:46
QString getPlainText() const
Definition RTextBasedEntity.h:269
double getXScale() const
Definition RTextBasedEntity.h:249
void setXScale(double xScale)
Definition RTextBasedEntity.h:245
static RPropertyTypeId PropertyHandle
Definition RTextBasedEntity.h:44
static RPropertyTypeId PropertyPlainText
Definition RTextBasedEntity.h:60
void setAngle(double angle)
Definition RTextBasedEntity.h:237
static RPropertyTypeId PropertyText
Definition RTextBasedEntity.h:59
void setText(const QString &text)
Definition RTextBasedEntity.h:273
void setLineSpacingStyle(RS::TextLineSpacingStyle lineSpacingStyle)
Definition RTextBasedEntity.h:221
QList< RPainterPath > getPainterPaths(bool draft=false) const
Definition RTextBasedEntity.h:102
static RPropertyTypeId PropertyLinetypeScale
Definition RTextBasedEntity.h:49
static RPropertyTypeId PropertyPositionZ
Definition RTextBasedEntity.h:58
static RPropertyTypeId PropertyVAlign
Definition RTextBasedEntity.h:70
bool isBackward() const
Definition RTextBasedEntity.h:134
void setPosition(const RVector &position)
Definition RTextBasedEntity.h:154
Transaction implementation.
Definition RTransaction.h:73
Represents a 3d vector (x/y/z).
Definition RVector.h:47
#define QCADCORE_EXPORT
Definition core_global.h:10
#define NULL
Definition opennurbs_system.h:256