RTextBasedEntity
Class in Entity Module
Header: #include <src/core/RTextBasedEntity.h>
Inherits: REntity
Inherited by: RAttributeDefinitionEntity, RAttributeEntity, RTextEntity
Description
Section titled “Description”Text entity.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Public Functions
Section titled “Public Functions”RTextBasedEntity(RDocument *document) |
|
| virtual | ~RTextBasedEntity() |
| virtual void | exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) constExports 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 ¢er) |
| 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 Public Functions
Section titled “Static Public Functions”| static QSet< RPropertyTypeId > | getStaticPropertyTypeIds() |
| static void | init() |
Static Public Attributes
Section titled “Static Public Attributes”Protected Functions
Section titled “Protected Functions”| virtual void | print(QDebug dbg) constStream operator for QDebug. |
Member Documentation
Section titled “Member Documentation”RTextBasedEntity
Section titled “RTextBasedEntity”RTextBasedEntity::RTextBasedEntity(RDocument *document)~RTextBasedEntity
Section titled “~RTextBasedEntity”virtual RTextBasedEntity::~RTextBasedEntity()virtual
exportEntity
Section titled “exportEntity”virtual void RTextBasedEntity::exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) constvirtual 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.
getAlignmentPoint
Section titled “getAlignmentPoint”RVector RTextBasedEntity::getAlignmentPoint() constinline const
getAngle
Section titled “getAngle”double RTextBasedEntity::getAngle() constinline const
getData
Section titled “getData”virtual const RTextBasedData & RTextBasedEntity::getData() const =0 = 0pure virtual const
Returns: Const reference to the data object of the entity.
Reimplemented from getData.
Reimplemented in getData, getData, getData.
getData
Section titled “getData”virtual RTextBasedData & RTextBasedEntity::getData()=0 = 0pure virtual
Returns: Reference to the data object of the entity.
Reimplemented from getData.
Reimplemented in getData, getData, getData.
getDrawingDirection
Section titled “getDrawingDirection”RS::TextDrawingDirection RTextBasedEntity::getDrawingDirection() constinline const
getEscapedText
Section titled “getEscapedText”QString RTextBasedEntity::getEscapedText(bool escapeUnicode=false) constinline const
getExploded
Section titled “getExploded”virtual QList< QSharedPointer< RShape > > RTextBasedEntity::getExploded() constvirtual inline const
getFontFile
Section titled “getFontFile”QString RTextBasedEntity::getFontFile() constinline const
getFontName
Section titled “getFontName”QString RTextBasedEntity::getFontName() constinline const
getHAlign
Section titled “getHAlign”RS::HAlign RTextBasedEntity::getHAlign() constinline const
getHeight
Section titled “getHeight”double RTextBasedEntity::getHeight() constinline const
getLineSpacingFactor
Section titled “getLineSpacingFactor”double RTextBasedEntity::getLineSpacingFactor() constinline const
getLineSpacingStyle
Section titled “getLineSpacingStyle”RS::TextLineSpacingStyle RTextBasedEntity::getLineSpacingStyle() constinline const
getPainterPaths
Section titled “getPainterPaths”QList< RPainterPath > RTextBasedEntity::getPainterPaths(bool draft=false) constinline const
getPlainText
Section titled “getPlainText”QString RTextBasedEntity::getPlainText() constinline const
getPosition
Section titled “getPosition”RVector RTextBasedEntity::getPosition() constinline const
getProperty
Section titled “getProperty”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.
getRotatedBoundingBox
Section titled “getRotatedBoundingBox”QList< RVector > RTextBasedEntity::getRotatedBoundingBox() constinline const
getShapes
Section titled “getShapes”virtual QList< QSharedPointer< RShape > > RTextBasedEntity::getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) constvirtual inline const
Returns: Shapes that represent the geometry of this entity.
Parameters:
queryBox: Limit returned shapes to query boxignoreComplex: Ignore complex shapes and explode those into simple shapessegment: Split up splines into spline segments
Reimplemented from getShapes.
getSimpleTextBlocks
Section titled “getSimpleTextBlocks”QList< RTextBasedData > RTextBasedEntity::getSimpleTextBlocks()inline
getTextData
Section titled “getTextData”virtual RTextBasedData & RTextBasedEntity::getTextData()virtual inline
getTextHeight
Section titled “getTextHeight”double RTextBasedEntity::getTextHeight() constinline const
getTextWidth
Section titled “getTextWidth”double RTextBasedEntity::getTextWidth() constinline const
getVAlign
Section titled “getVAlign”RS::VAlign RTextBasedEntity::getVAlign() constinline const
getWidth
Section titled “getWidth”double RTextBasedEntity::getWidth() constinline const
getXScale
Section titled “getXScale”double RTextBasedEntity::getXScale() constinline const
isBackward
Section titled “isBackward”bool RTextBasedEntity::isBackward() constinline const
isBold
Section titled “isBold”bool RTextBasedEntity::isBold() constinline const
isItalic
Section titled “isItalic”bool RTextBasedEntity::isItalic() constinline const
isSimple
Section titled “isSimple”bool RTextBasedEntity::isSimple() constinline const
isUpsideDown
Section titled “isUpsideDown”bool RTextBasedEntity::isUpsideDown() constinline const
scaleNonUniform
Section titled “scaleNonUniform”virtual QSharedPointer< REntity > RTextBasedEntity::scaleNonUniform(const RVector &scaleFactors, const RVector ¢er)virtual
Reimplemented from scaleNonUniform.
setAlignmentPoint
Section titled “setAlignmentPoint”void RTextBasedEntity::setAlignmentPoint(const RVector &alignmentPoint)inline
setAngle
Section titled “setAngle”void RTextBasedEntity::setAngle(double angle)inline
setBackward
Section titled “setBackward”void RTextBasedEntity::setBackward(bool on)inline
setBold
Section titled “setBold”void RTextBasedEntity::setBold(bool on)inline
setDrawingDirection
Section titled “setDrawingDirection”void RTextBasedEntity::setDrawingDirection(RS::TextDrawingDirection drawingDirection)inline
setFontName
Section titled “setFontName”void RTextBasedEntity::setFontName(const QString &fontName)inline
setHAlign
Section titled “setHAlign”void RTextBasedEntity::setHAlign(RS::HAlign ha)inline
setItalic
Section titled “setItalic”void RTextBasedEntity::setItalic(bool on)inline
setLineSpacingFactor
Section titled “setLineSpacingFactor”void RTextBasedEntity::setLineSpacingFactor(double lineSpacingFactor)inline
setLineSpacingStyle
Section titled “setLineSpacingStyle”void RTextBasedEntity::setLineSpacingStyle(RS::TextLineSpacingStyle lineSpacingStyle)inline
setPosition
Section titled “setPosition”void RTextBasedEntity::setPosition(const RVector &position)inline
setProperty
Section titled “setProperty”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.
setSimple
Section titled “setSimple”void RTextBasedEntity::setSimple(bool on)inline
setText
Section titled “setText”void RTextBasedEntity::setText(const QString &text)inline
setTextHeight
Section titled “setTextHeight”void RTextBasedEntity::setTextHeight(double h)inline
setUpsideDown
Section titled “setUpsideDown”void RTextBasedEntity::setUpsideDown(bool on)inline
setVAlign
Section titled “setVAlign”void RTextBasedEntity::setVAlign(RS::VAlign va)inline
setXScale
Section titled “setXScale”void RTextBasedEntity::setXScale(double xScale)inline
void RTextBasedEntity::sync(const RTextBasedEntity &other)inline
getStaticPropertyTypeIds
Section titled “getStaticPropertyTypeIds”static QSet< RPropertyTypeId > RTextBasedEntity::getStaticPropertyTypeIds()static inline
static void RTextBasedEntity::init()static
PropertyAngle
Section titled “PropertyAngle”static RPropertyTypeId RTextBasedEntity::PropertyAnglestatic
PropertyBackward
Section titled “PropertyBackward”static RPropertyTypeId RTextBasedEntity::PropertyBackwardstatic
PropertyBlock
Section titled “PropertyBlock”static RPropertyTypeId RTextBasedEntity::PropertyBlockstatic
PropertyBold
Section titled “PropertyBold”static RPropertyTypeId RTextBasedEntity::PropertyBoldstatic
PropertyColor
Section titled “PropertyColor”static RPropertyTypeId RTextBasedEntity::PropertyColorstatic
PropertyCustom
Section titled “PropertyCustom”static RPropertyTypeId RTextBasedEntity::PropertyCustomstatic
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.
PropertyDisplayedColor
Section titled “PropertyDisplayedColor”static RPropertyTypeId RTextBasedEntity::PropertyDisplayedColorstatic
PropertyDrawOrder
Section titled “PropertyDrawOrder”static RPropertyTypeId RTextBasedEntity::PropertyDrawOrderstatic
PropertyFontName
Section titled “PropertyFontName”static RPropertyTypeId RTextBasedEntity::PropertyFontNamestatic
PropertyHAlign
Section titled “PropertyHAlign”static RPropertyTypeId RTextBasedEntity::PropertyHAlignstatic
PropertyHandle
Section titled “PropertyHandle”static RPropertyTypeId RTextBasedEntity::PropertyHandlestatic
PropertyHeight
Section titled “PropertyHeight”static RPropertyTypeId RTextBasedEntity::PropertyHeightstatic
PropertyItalic
Section titled “PropertyItalic”static RPropertyTypeId RTextBasedEntity::PropertyItalicstatic
PropertyLayer
Section titled “PropertyLayer”static RPropertyTypeId RTextBasedEntity::PropertyLayerstatic
PropertyLineSpacingFactor
Section titled “PropertyLineSpacingFactor”static RPropertyTypeId RTextBasedEntity::PropertyLineSpacingFactorstatic
PropertyLinetype
Section titled “PropertyLinetype”static RPropertyTypeId RTextBasedEntity::PropertyLinetypestatic
PropertyLinetypeScale
Section titled “PropertyLinetypeScale”static RPropertyTypeId RTextBasedEntity::PropertyLinetypeScalestatic
PropertyLineweight
Section titled “PropertyLineweight”static RPropertyTypeId RTextBasedEntity::PropertyLineweightstatic
PropertyPlainText
Section titled “PropertyPlainText”static RPropertyTypeId RTextBasedEntity::PropertyPlainTextstatic
PropertyPositionX
Section titled “PropertyPositionX”static RPropertyTypeId RTextBasedEntity::PropertyPositionXstatic
PropertyPositionY
Section titled “PropertyPositionY”static RPropertyTypeId RTextBasedEntity::PropertyPositionYstatic
PropertyPositionZ
Section titled “PropertyPositionZ”static RPropertyTypeId RTextBasedEntity::PropertyPositionZstatic
PropertySimple
Section titled “PropertySimple”static RPropertyTypeId RTextBasedEntity::PropertySimplestatic
PropertyText
Section titled “PropertyText”static RPropertyTypeId RTextBasedEntity::PropertyTextstatic
PropertyType
Section titled “PropertyType”static RPropertyTypeId RTextBasedEntity::PropertyTypestatic
PropertyUpsideDown
Section titled “PropertyUpsideDown”static RPropertyTypeId RTextBasedEntity::PropertyUpsideDownstatic
PropertyVAlign
Section titled “PropertyVAlign”static RPropertyTypeId RTextBasedEntity::PropertyVAlignstatic
PropertyWidth
Section titled “PropertyWidth”static RPropertyTypeId RTextBasedEntity::PropertyWidthstatic
PropertyXScale
Section titled “PropertyXScale”static RPropertyTypeId RTextBasedEntity::PropertyXScalestatic
virtual void RTextBasedEntity::print(QDebug dbg) constvirtual const protected
Stream operator for QDebug.
Reimplemented from print.