Skip to content

RTextBasedEntity

Class in Entity Module
Header: #include <src/core/RTextBasedEntity.h>
Inherits: REntity
Inherited by: RAttributeDefinitionEntity, RAttributeEntity, RTextEntity

Text entity.

Scriptable: This class is available in script environments.

Shared Pointer Support: Objects can be used in QSharedPointer.

RTextBasedEntity(RDocument *document)
virtual ~RTextBasedEntity()
virtual void exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const
Exports the entity to the given exporter.
RVector getAlignmentPoint() const
double getAngle() const
virtual const RTextBasedData & getData() const =0 = 0
virtual RTextBasedData & getData()=0 = 0
RS::TextDrawingDirection getDrawingDirection() const
QString getEscapedText(bool escapeUnicode=false) const
virtual QList< QSharedPointer< RShape > > getExploded() const
QString getFontFile() const
QString getFontName() const
RS::HAlign getHAlign() const
double getHeight() const
double getLineSpacingFactor() const
RS::TextLineSpacingStyle getLineSpacingStyle() const
QList< RPainterPath > getPainterPaths(bool draft=false) const
QString getPlainText() const
RVector getPosition() const
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
QList< RVector > getRotatedBoundingBox() const
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const
QList< RTextBasedData > getSimpleTextBlocks()
virtual RTextBasedData & getTextData()
double getTextHeight() const
double getTextWidth() const
RS::VAlign getVAlign() const
double getWidth() const
double getXScale() const
bool isBackward() const
bool isBold() const
bool isItalic() const
bool isSimple() const
bool isUpsideDown() const
virtual QSharedPointer< REntity > scaleNonUniform(const RVector &scaleFactors, const RVector &center)
void setAlignmentPoint(const RVector &alignmentPoint)
void setAngle(double angle)
void setBackward(bool on)
void setBold(bool on)
void setDrawingDirection(RS::TextDrawingDirection drawingDirection)
void setFontName(const QString &fontName)
void setHAlign(RS::HAlign ha)
void setItalic(bool on)
void setLineSpacingFactor(double lineSpacingFactor)
void setLineSpacingStyle(RS::TextLineSpacingStyle lineSpacingStyle)
void setPosition(const RVector &position)
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
void setSimple(bool on)
void setText(const QString &text)
void setTextHeight(double h)
void setUpsideDown(bool on)
void setVAlign(RS::VAlign va)
void setXScale(double xScale)
void sync(const RTextBasedEntity &other)
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
static void init()
static RPropertyTypeId PropertyAngle
static RPropertyTypeId PropertyBackward
static RPropertyTypeId PropertyBlock
static RPropertyTypeId PropertyBold
static RPropertyTypeId PropertyColor
static RPropertyTypeId PropertyCustom
static RPropertyTypeId PropertyDisplayedColor
static RPropertyTypeId PropertyDrawOrder
static RPropertyTypeId PropertyFontName
static RPropertyTypeId PropertyHAlign
static RPropertyTypeId PropertyHandle
static RPropertyTypeId PropertyHeight
static RPropertyTypeId PropertyItalic
static RPropertyTypeId PropertyLayer
static RPropertyTypeId PropertyLineSpacingFactor
static RPropertyTypeId PropertyLinetype
static RPropertyTypeId PropertyLinetypeScale
static RPropertyTypeId PropertyLineweight
static RPropertyTypeId PropertyPlainText
static RPropertyTypeId PropertyPositionX
static RPropertyTypeId PropertyPositionY
static RPropertyTypeId PropertyPositionZ
static RPropertyTypeId PropertySimple
static RPropertyTypeId PropertyText
static RPropertyTypeId PropertyType
static RPropertyTypeId PropertyUpsideDown
static RPropertyTypeId PropertyVAlign
static RPropertyTypeId PropertyWidth
static RPropertyTypeId PropertyXScale
virtual void print(QDebug dbg) const
Stream operator for QDebug.

RTextBasedEntity::RTextBasedEntity(RDocument *document)

virtual RTextBasedEntity::~RTextBasedEntity()

virtual

virtual void RTextBasedEntity::exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const

virtual const

Exports the entity to the given exporter.

The exporter might be a file exporter, a graphics scene or any other platform one can export entities to.

Reimplemented from exportEntity.

Reimplemented in exportEntity.

RVector RTextBasedEntity::getAlignmentPoint() const

inline const

double RTextBasedEntity::getAngle() const

inline const

virtual const RTextBasedData & RTextBasedEntity::getData() const =0 = 0

pure virtual const

Returns: Const reference to the data object of the entity.

Reimplemented from getData.

Reimplemented in getData, getData, getData.

virtual RTextBasedData & RTextBasedEntity::getData()=0 = 0

pure virtual

Returns: Reference to the data object of the entity.

Reimplemented from getData.

Reimplemented in getData, getData, getData.

RS::TextDrawingDirection RTextBasedEntity::getDrawingDirection() const

inline const

QString RTextBasedEntity::getEscapedText(bool escapeUnicode=false) const

inline const

virtual QList< QSharedPointer< RShape > > RTextBasedEntity::getExploded() const

virtual inline const

QString RTextBasedEntity::getFontFile() const

inline const

QString RTextBasedEntity::getFontName() const

inline const

RS::HAlign RTextBasedEntity::getHAlign() const

inline const

double RTextBasedEntity::getHeight() const

inline const

double RTextBasedEntity::getLineSpacingFactor() const

inline const

RS::TextLineSpacingStyle RTextBasedEntity::getLineSpacingStyle() const

inline const

QList< RPainterPath > RTextBasedEntity::getPainterPaths(bool draft=false) const

inline const

QString RTextBasedEntity::getPlainText() const

inline const

RVector RTextBasedEntity::getPosition() const

inline const

virtual QPair< QVariant, RPropertyAttributes > RTextBasedEntity::getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)

virtual

Returns: The value and attributes of the given property or an invalid property if this property owner has no property with the given ID.

Reimplemented from getProperty.

Reimplemented in getProperty, getProperty.

QList< RVector > RTextBasedEntity::getRotatedBoundingBox() const

inline const

virtual QList< QSharedPointer< RShape > > RTextBasedEntity::getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const

virtual inline const

Returns: Shapes that represent the geometry of this entity.

Parameters:

  • queryBox: Limit returned shapes to query box
  • ignoreComplex: Ignore complex shapes and explode those into simple shapes
  • segment: Split up splines into spline segments

Reimplemented from getShapes.

QList< RTextBasedData > RTextBasedEntity::getSimpleTextBlocks()

inline

virtual RTextBasedData & RTextBasedEntity::getTextData()

virtual inline

double RTextBasedEntity::getTextHeight() const

inline const

double RTextBasedEntity::getTextWidth() const

inline const

RS::VAlign RTextBasedEntity::getVAlign() const

inline const

double RTextBasedEntity::getWidth() const

inline const

double RTextBasedEntity::getXScale() const

inline const

bool RTextBasedEntity::isBackward() const

inline const

bool RTextBasedEntity::isBold() const

inline const

bool RTextBasedEntity::isItalic() const

inline const

bool RTextBasedEntity::isSimple() const

inline const

bool RTextBasedEntity::isUpsideDown() const

inline const

virtual QSharedPointer< REntity > RTextBasedEntity::scaleNonUniform(const RVector &scaleFactors, const RVector &center)

virtual

Reimplemented from scaleNonUniform.

void RTextBasedEntity::setAlignmentPoint(const RVector &alignmentPoint)

inline

void RTextBasedEntity::setAngle(double angle)

inline

void RTextBasedEntity::setBackward(bool on)

inline

void RTextBasedEntity::setBold(bool on)

inline

void RTextBasedEntity::setDrawingDirection(RS::TextDrawingDirection drawingDirection)

inline

void RTextBasedEntity::setFontName(const QString &fontName)

inline

void RTextBasedEntity::setHAlign(RS::HAlign ha)

inline

void RTextBasedEntity::setItalic(bool on)

inline

void RTextBasedEntity::setLineSpacingFactor(double lineSpacingFactor)

inline

void RTextBasedEntity::setLineSpacingStyle(RS::TextLineSpacingStyle lineSpacingStyle)

inline

void RTextBasedEntity::setPosition(const RVector &position)

inline

virtual bool RTextBasedEntity::setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)

virtual

Sets the given property to the given value.

If this property owner does not know a property with that ID, it is up to the property owner what happens. The property might be added into a list of dynamic properties or dropped.

Returns: True if the property owner was modified in any way, false otherwise.

Reimplemented from setProperty.

Reimplemented in setProperty, setProperty.

void RTextBasedEntity::setSimple(bool on)

inline

void RTextBasedEntity::setText(const QString &text)

inline

void RTextBasedEntity::setTextHeight(double h)

inline

void RTextBasedEntity::setUpsideDown(bool on)

inline

void RTextBasedEntity::setVAlign(RS::VAlign va)

inline

void RTextBasedEntity::setXScale(double xScale)

inline

void RTextBasedEntity::sync(const RTextBasedEntity &other)

inline

static QSet< RPropertyTypeId > RTextBasedEntity::getStaticPropertyTypeIds()

static inline

static void RTextBasedEntity::init()

static

static RPropertyTypeId RTextBasedEntity::PropertyAngle

static

static RPropertyTypeId RTextBasedEntity::PropertyBackward

static

static RPropertyTypeId RTextBasedEntity::PropertyBlock

static

static RPropertyTypeId RTextBasedEntity::PropertyBold

static

static RPropertyTypeId RTextBasedEntity::PropertyColor

static

static RPropertyTypeId RTextBasedEntity::PropertyCustom

static

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

static RPropertyTypeId RTextBasedEntity::PropertyDisplayedColor

static

static RPropertyTypeId RTextBasedEntity::PropertyDrawOrder

static

static RPropertyTypeId RTextBasedEntity::PropertyFontName

static

static RPropertyTypeId RTextBasedEntity::PropertyHAlign

static

static RPropertyTypeId RTextBasedEntity::PropertyHandle

static

static RPropertyTypeId RTextBasedEntity::PropertyHeight

static

static RPropertyTypeId RTextBasedEntity::PropertyItalic

static

static RPropertyTypeId RTextBasedEntity::PropertyLayer

static

static RPropertyTypeId RTextBasedEntity::PropertyLineSpacingFactor

static

static RPropertyTypeId RTextBasedEntity::PropertyLinetype

static

static RPropertyTypeId RTextBasedEntity::PropertyLinetypeScale

static

static RPropertyTypeId RTextBasedEntity::PropertyLineweight

static

static RPropertyTypeId RTextBasedEntity::PropertyPlainText

static

static RPropertyTypeId RTextBasedEntity::PropertyPositionX

static

static RPropertyTypeId RTextBasedEntity::PropertyPositionY

static

static RPropertyTypeId RTextBasedEntity::PropertyPositionZ

static

static RPropertyTypeId RTextBasedEntity::PropertySimple

static

static RPropertyTypeId RTextBasedEntity::PropertyText

static

static RPropertyTypeId RTextBasedEntity::PropertyType

static

static RPropertyTypeId RTextBasedEntity::PropertyUpsideDown

static

static RPropertyTypeId RTextBasedEntity::PropertyVAlign

static

static RPropertyTypeId RTextBasedEntity::PropertyWidth

static

static RPropertyTypeId RTextBasedEntity::PropertyXScale

static

virtual void RTextBasedEntity::print(QDebug dbg) const

virtual const protected

Stream operator for QDebug.

Reimplemented from print.

Reimplemented in print, print, print.