REntity
Class in Core Module
Header: #include <src/core/REntity.h>
Inherits: RObject
Inherited by: RArcEntity, RBlockReferenceEntity, RCircleEntity, RDimensionEntity, REllipseEntity, RFaceEntity, RHatchEntity, RImageEntity, RLeaderEntity, RLineEntity, RPointEntity, RPolyMeshEntity, RPolylineEntity, RRayEntity, RSolidEntity, RSplineEntity, RTextBasedEntity, RToleranceEntity, RTraceEntity, RViewportEntity, RWipeoutEntity, RXLineEntity
Description
Section titled “Description”Base class for all entity classes.
Entities can be exported using an implementor of the exporter interface by calling exportEntity.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Public Functions
Section titled “Public Functions”REntity(const REntity &other) |
|
REntity(RDocument *document) |
|
| virtual | ~REntity() |
| virtual const RShape * | castToConstShape() const |
| virtual RShape * | castToShape() |
| virtual bool | clickReferencePoint(const RVector &referencePoint)Called when user clicks a reference point. |
| virtual QSharedPointer< RObject > | clone() const =0 = 0 |
| virtual bool | cloneOnChange() const |
| QSharedPointer< REntity > | cloneToEntity() const |
| void | copyAttributesFrom(const REntity *entity, bool copyBlockId=true)Copies all attributes (layer, block, color, line weight, line style) from the given entity. |
| void | copyAttributesFrom(const REntityData &entityData, bool copyBlockId=true) |
| virtual void | exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const =0 = 0Exports the entity to the given exporter. |
| virtual bool | flipHorizontal() |
| virtual bool | flipVertical() |
| virtual void | forceAutoUpdate() |
| RObject::Id | getBlockId() const |
| QString | getBlockName() const |
| virtual RBox | getBoundingBox(bool ignoreEmpty=false) const |
| virtual QList< RBox > | getBoundingBoxes(bool ignoreEmpty=false) const |
| virtual QList< RVector > | getCenterPoints(const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) const |
| virtual RVector | getClosestPointOnEntity(const RVector &point, double range=RNANDOUBLE, bool limited=true, RObject::Id *subEntityId=NULL) const |
| virtual QSharedPointer< RShape > | getClosestShape(const RVector &pos, double range=RNANDOUBLE, bool ignoreComplex=false, RObject::Id *subEntityId=NULL) const |
| virtual QSharedPointer< RShape > | getClosestSimpleShape(const RVector &pos, double range=RNANDOUBLE) const |
| RObject::Id | getClosestSubEntityId(const RVector &pos, double range=RNANDOUBLE, bool ignoreComplex=false) constConvenience function for scripts. |
| RColor | getColor() const |
| RColor | getColor(bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) |
| RColor | getColor(const RColor &unresolvedColor, const QStack< QSharedPointer< REntity > > &blockRefStack) |
| virtual int | getComplexity() const |
| virtual const REntityData & | getData() const =0 = 0 |
| virtual REntityData & | getData()=0 = 0 |
| RColor | getDisplayColor() |
| virtual double | getDistanceTo(const RVector &point, bool limited=true, double range=0.0, bool draft=false, double strictRange=RMAXDOUBLE) const |
| int | getDrawOrder() const |
| virtual QList< RVector > | getEndPoints(const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) const |
| virtual RPolyline | getHull(double offset) const |
| virtual QList< RRefPoint > | getInternalReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop, QList< RObject::Id > *subEntityIds=NULL) constCan be overwritten to return internal, resolved reference points. |
| virtual QList< RVector > | getIntersectionPoints(const REntity &other, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=true, QList< QPair< RObject::Id, RObject::Id > > *entityIds=NULL) const |
| virtual QList< RVector > | getIntersectionPoints(const RShape &shape, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=true) const |
| virtual QList< RVector > | getIntersectionPointsWithShape(const RShape &shape, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX) constMake getIntersectionPoints with shape parameter accessible for script wrappers. |
| RObject::Id | getLayerId() const |
| QString | getLayerName() const |
| RObject::Id | getLinetypeId() const |
| RObject::Id | getLinetypeId(bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) const |
| RLinetypePattern | getLinetypePattern() const |
| double | getLinetypeScale() const |
| RLineweight::Lineweight | getLineweight() const |
| RLineweight::Lineweight | getLineweight(bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) const |
| double | getLineweightInUnits(const QStack< QSharedPointer< REntity > > &blockRefStack) const |
| virtual QList< RVector > | getMiddlePoints(const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) const |
| RObject::Id | getParentId() const |
| virtual RVector | getPointOnEntity() const |
| virtual QList< RVector > | getPointsWithDistanceToEnd(double distance, int from=RS::FromAny, const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) const |
| virtual QPair< QVariant, RPropertyAttributes > | getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false) |
| virtual QList< RRefPoint > | getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const |
| virtual QList< QSharedPointer< RShape > > | getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const |
| virtual RS::EntityType | getType() const |
| virtual RVector | getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const |
| virtual bool | intersectsWith(const RShape &shape) const |
| virtual bool | isEditable(bool allowInvisible=false) const |
| virtual bool | isInside(const RBox &box) const |
| virtual bool | isInWorkingSet() const |
| virtual bool | isOnEntity(const RVector &point, bool limited=true, double tolerance=RDEFAULT_TOLERANCE_1E_MIN4) const |
| virtual bool | isPointType() const |
| virtual bool | isSane() const |
| virtual bool | isSelectable() const |
| virtual bool | isSelected() constReimplemented by entities that are part of a block reference but not stored as part of the block definition (currently only block attributes). |
| virtual bool | isSelectedWorkingSet() const |
| virtual bool | isUpdatesEnabled() const |
| virtual bool | isValid() const |
| virtual bool | isVisible(RObject::Id blockId=RObject::INVALID_ID) const |
| virtual bool | mirror(const RLine &axis) |
| virtual bool | mirror(const RVector &axis1, const RVector &axis2) |
| virtual bool | move(const RVector &offset)Moves this entity by the given offset. |
| virtual bool | moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint, Qt::KeyboardModifiers modifiers=Qt::NoModifier)Moves the given reference point to the given target point or does nothing if this entity has no reference point as the given location. |
| virtual bool | rotate(double rotation, const RVector ¢er=RDEFAULT_RVECTOR) |
| virtual bool | scale(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR) |
| virtual bool | scale(double scaleFactor, const RVector ¢er=RDEFAULT_RVECTOR) |
| virtual QSharedPointer< REntity > | scaleNonUniform(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR) |
| virtual void | scaleVisualProperties(double scaleFactor) |
| virtual void | setAutoUpdatesBlocked(bool on) |
| void | setBlockId(RObject::Id blockId) |
| void | setColor(const RColor &color) |
| void | setDocument(RDocument *document) |
| void | setDrawOrder(int drawOrder)Sets the draw order of this entity. |
| void | setLayerId(RObject::Id layerId) |
| void | setLayerName(const QString &n) |
| void | setLinetypeId(RObject::Id linetypeId)Sets the linetype of this entity to the given linetype ID. |
| void | setLinetypePattern(const RLinetypePattern &linetypePattern) |
| void | setLinetypeScale(double linetypeScale) |
| void | setLineweight(RLineweight::Lineweight lineweight) |
| virtual bool | setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)Sets the given property to the given value. |
| virtual void | setSelected(bool on) |
| virtual void | setSelectedWorkingSet(bool on) |
| void | setUpdatesEnabled(bool on) |
| virtual void | setViewportContext(const RViewportData &) |
| virtual void | setZ(double z) |
| virtual bool | stretch(const RPolyline &area, const RVector &offset)Stretches the end points of this entity that are inside area by offset. |
| virtual void | to2D() |
| virtual void | update() constEntities can reimplement this function to invalidate any internal cache (mark the entity as dirty). |
Static Public Functions
Section titled “Static Public Functions”| static RS::EntityType | getRtti() |
| static QSet< RPropertyTypeId > | getStaticPropertyTypeIds() |
| static void | init() |
| static bool | isComplex(const RS::EntityType type) |
| static bool | isDimension(const RS::EntityType type) |
| static bool | isTextBased(const RS::EntityType type) |
| static bool | isThreeDimensionalExport(RExporter &e)Selects or deselects this entity. |
Static Public Attributes
Section titled “Static Public Attributes”| static RPropertyTypeId | PropertyBlock |
| static RPropertyTypeId | PropertyColor |
| static RPropertyTypeId | PropertyCustom |
| static RPropertyTypeId | PropertyDisplayedColor |
| static RPropertyTypeId | PropertyDrawOrder |
| static RPropertyTypeId | PropertyHandle |
| static RPropertyTypeId | PropertyLayer |
| static RPropertyTypeId | PropertyLinetype |
| static RPropertyTypeId | PropertyLinetypeScale |
| static RPropertyTypeId | PropertyLineweight |
| static RPropertyTypeId | PropertyMaxX |
| static RPropertyTypeId | PropertyMaxY |
| static RPropertyTypeId | PropertyMinX |
| static RPropertyTypeId | PropertyMinY |
| static RPropertyTypeId | PropertyParentId |
| static RPropertyTypeId | PropertyProtected |
| static RPropertyTypeId | PropertySizeX |
| static RPropertyTypeId | PropertySizeY |
| static RPropertyTypeId | PropertyType |
| static RPropertyTypeId | PropertyWorkingSet |
Protected Functions
Section titled “Protected Functions”| virtual void | print(QDebug dbg) constStream operator for QDebug. |
| void | setParentId(RObject::Id parentId) |
Friends
Section titled “Friends”| class | RStorage |
Member Documentation
Section titled “Member Documentation”REntity
Section titled “REntity”REntity::REntity(const REntity &other)REntity
Section titled “REntity”REntity::REntity(RDocument *document)~REntity
Section titled “~REntity”virtual REntity::~REntity()virtual
castToConstShape
Section titled “castToConstShape”virtual const RShape * REntity::castToConstShape() constvirtual inline const
Non-Scriptable: This function is not available in script environments.
castToShape
Section titled “castToShape”virtual RShape * REntity::castToShape()virtual inline
clickReferencePoint
Section titled “clickReferencePoint”virtual bool REntity::clickReferencePoint(const RVector &referencePoint)virtual inline
Called when user clicks a reference point.
Returns: True if clicking the reference point had any immediate effect.
virtual QSharedPointer< RObject > REntity::clone() const =0 = 0pure virtual const
Reimplemented from clone.
Reimplemented in clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone, clone.
cloneOnChange
Section titled “cloneOnChange”virtual bool REntity::cloneOnChange() constvirtual inline const
cloneToEntity
Section titled “cloneToEntity”QSharedPointer< REntity > REntity::cloneToEntity() constinline const
copyAttributesFrom
Section titled “copyAttributesFrom”void REntity::copyAttributesFrom(const REntity *entity, bool copyBlockId=true)Copies all attributes (layer, block, color, line weight, line style) from the given entity.
copyAttributesFrom
Section titled “copyAttributesFrom”void REntity::copyAttributesFrom(const REntityData &entityData, bool copyBlockId=true)exportEntity
Section titled “exportEntity”virtual void REntity::exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const =0 = 0pure 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 in exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity, exportEntity.
flipHorizontal
Section titled “flipHorizontal”virtual bool REntity::flipHorizontal()virtual inline
flipVertical
Section titled “flipVertical”virtual bool REntity::flipVertical()virtual inline
forceAutoUpdate
Section titled “forceAutoUpdate”virtual void REntity::forceAutoUpdate()virtual inline
Reimplemented from forceAutoUpdate.
getBlockId
Section titled “getBlockId”RObject::Id REntity::getBlockId() constinline const
getBlockName
Section titled “getBlockName”QString REntity::getBlockName() constinline const
getBoundingBox
Section titled “getBoundingBox”virtual RBox REntity::getBoundingBox(bool ignoreEmpty=false) constvirtual inline const
Returns: The bounding box that contains this entity.
getBoundingBoxes
Section titled “getBoundingBoxes”virtual QList< RBox > REntity::getBoundingBoxes(bool ignoreEmpty=false) constvirtual inline const
Returns: List of bounding boxes that contain this entity. This is used for complex entities such as block references to further optimize algorithms that depend on bounding boxes (e.g. spatial index algorithms). The default implementation returns the bounding box that contains the whole entity.
getCenterPoints
Section titled “getCenterPoints”virtual QList< RVector > REntity::getCenterPoints(const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) constvirtual inline const
Returns: Vector of center points of this entity. Used for snap to center points.
getClosestPointOnEntity
Section titled “getClosestPointOnEntity”virtual RVector REntity::getClosestPointOnEntity(const RVector &point, double range=RNANDOUBLE, bool limited=true, RObject::Id *subEntityId=NULL) constvirtual inline const
Returns: Closest point to point on this entity. Used for snap to points on entity.
getClosestShape
Section titled “getClosestShape”virtual QSharedPointer< RShape > REntity::getClosestShape(const RVector &pos, double range=RNANDOUBLE, bool ignoreComplex=false, RObject::Id *subEntityId=NULL) constvirtual inline const
Returns: The one shape that is part of this entity which is the closest to the given position.
getClosestSimpleShape
Section titled “getClosestSimpleShape”virtual QSharedPointer< RShape > REntity::getClosestSimpleShape(const RVector &pos, double range=RNANDOUBLE) constvirtual inline const
Returns: The one shape that is part of this entity which is the closest to the given position.
getClosestSubEntityId
Section titled “getClosestSubEntityId”RObject::Id REntity::getClosestSubEntityId(const RVector &pos, double range=RNANDOUBLE, bool ignoreComplex=false) constinline const
Convenience function for scripts.
getColor
Section titled “getColor”RColor REntity::getColor() constinline const
getColor
Section titled “getColor”RColor REntity::getColor(bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack)getColor
Section titled “getColor”RColor REntity::getColor(const RColor &unresolvedColor, const QStack< QSharedPointer< REntity > > &blockRefStack)getComplexity
Section titled “getComplexity”virtual int REntity::getComplexity() constvirtual inline const
Reimplemented from getComplexity.
Reimplemented in getComplexity, getComplexity, getComplexity.
getData
Section titled “getData”virtual const REntityData & REntity::getData() const =0 = 0pure virtual const
Returns: Const reference to the data object of the entity.
Reimplemented in getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData.
getData
Section titled “getData”virtual REntityData & REntity::getData()=0 = 0pure virtual
Returns: Reference to the data object of the entity.
Reimplemented in getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData, getData.
getDisplayColor
Section titled “getDisplayColor”RColor REntity::getDisplayColor()inline
getDistanceTo
Section titled “getDistanceTo”virtual double REntity::getDistanceTo(const RVector &point, bool limited=true, double range=0.0, bool draft=false, double strictRange=RMAXDOUBLE) constvirtual inline const
getDrawOrder
Section titled “getDrawOrder”int REntity::getDrawOrder() constinline const
Returns: The draw order of this entity. Entities are usually drawn in ascending order of this number.
getEndPoints
Section titled “getEndPoints”virtual QList< RVector > REntity::getEndPoints(const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) constvirtual inline const
Returns: Vector of end points of this entity. Used for snap to end points.
getHull
Section titled “getHull”virtual RPolyline REntity::getHull(double offset) constvirtual inline const
Returns: A polygon that contains this entity. Default implementation returns a polygon around the bounding box.
getInternalReferencePoints
Section titled “getInternalReferencePoints”virtual QList< RRefPoint > REntity::getInternalReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop, QList< RObject::Id > *subEntityIds=NULL) constvirtual inline const
Can be overwritten to return internal, resolved reference points.
This is used for example for block references in combination with snap to reference points. Default implementation returns same as getReferencePoints().
getIntersectionPoints
Section titled “getIntersectionPoints”virtual QList< RVector > REntity::getIntersectionPoints(const REntity &other, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=true, QList< QPair< RObject::Id, RObject::Id > > *entityIds=NULL) constvirtual const
getIntersectionPoints
Section titled “getIntersectionPoints”virtual QList< RVector > REntity::getIntersectionPoints(const RShape &shape, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=true) constvirtual const
getIntersectionPointsWithShape
Section titled “getIntersectionPointsWithShape”virtual QList< RVector > REntity::getIntersectionPointsWithShape(const RShape &shape, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX) constvirtual inline const
Make getIntersectionPoints with shape parameter accessible for script wrappers.
getLayerId
Section titled “getLayerId”RObject::Id REntity::getLayerId() constinline const
getLayerName
Section titled “getLayerName”QString REntity::getLayerName() constinline const
getLinetypeId
Section titled “getLinetypeId”RObject::Id REntity::getLinetypeId() constinline const
Returns: Linetype ID of this entity. Note that this might be ByLayer or ByBlock.
getLinetypeId
Section titled “getLinetypeId”RLinetype::Id REntity::getLinetypeId(bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) constconst
Returns: Linetype ID of this entity. Note that this might be ByLayer or ByBlock.
getLinetypePattern
Section titled “getLinetypePattern”RLinetypePattern REntity::getLinetypePattern() constinline const
getLinetypeScale
Section titled “getLinetypeScale”double REntity::getLinetypeScale() constinline const
getLineweight
Section titled “getLineweight”RLineweight::Lineweight REntity::getLineweight() constinline const
getLineweight
Section titled “getLineweight”RLineweight::Lineweight REntity::getLineweight(bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) constconst
getLineweightInUnits
Section titled “getLineweightInUnits”double REntity::getLineweightInUnits(const QStack< QSharedPointer< REntity > > &blockRefStack) constconst
getMiddlePoints
Section titled “getMiddlePoints”virtual QList< RVector > REntity::getMiddlePoints(const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) constvirtual inline const
Returns: Vector of middle points of this entity. Used for snap to middle points.
getParentId
Section titled “getParentId”RObject::Id REntity::getParentId() constinline const
Returns: ID of parent entity (block reference for block attribute).
getPointOnEntity
Section titled “getPointOnEntity”virtual RVector REntity::getPointOnEntity() constvirtual inline const
Returns: A point that is on the entity. Used to check if an entity is inside a polygon.
getPointsWithDistanceToEnd
Section titled “getPointsWithDistanceToEnd”virtual QList< RVector > REntity::getPointsWithDistanceToEnd(double distance, int from=RS::FromAny, const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) constvirtual inline const
Returns: Points on entity with given distance to either endpoint. Used for snap to points with distance on entity.
getProperty
Section titled “getProperty”virtual QPair< QVariant, RPropertyAttributes > REntity::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, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty.
getReferencePoints
Section titled “getReferencePoints”virtual QList< RRefPoint > REntity::getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) constvirtual inline const
Returns: Vector of reference points of this entity. Reference points can usually be moved around by the user to change the geometry of the entity.
getShapes
Section titled “getShapes”virtual QList< QSharedPointer< RShape > > REntity::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 in getShapes, getShapes.
getType
Section titled “getType”virtual RS::EntityType REntity::getType() constvirtual inline const
Returns: The unique entity type, usually the same as RTTI, different for custom entities.
Reimplemented from getType.
getVectorTo
Section titled “getVectorTo”virtual RVector REntity::getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) constvirtual inline const
Returns: The distance vector from this entity to the given point.
Parameters:
point: the point to which the distance was measuredlimited: If true, an invalid vector is returned if the closest point on the entity is outside of the entity (e.g. in the extension line of a line or outside the start / end angle of an arc).
intersectsWith
Section titled “intersectsWith”virtual bool REntity::intersectsWith(const RShape &shape) constvirtual inline const
Returns: True if this entity intersects with the given shape, false otherwise.
isEditable
Section titled “isEditable”virtual bool REntity::isEditable(bool allowInvisible=false) constvirtual const
Returns: true if this entity can be edited (i.e. is not on a locked layer).
isInside
Section titled “isInside”virtual bool REntity::isInside(const RBox &box) constvirtual inline const
Returns: True if this entity is completely inside the given box, false otherwise. Only geometry is accounted for, not the line width.
isInWorkingSet
Section titled “isInWorkingSet”virtual bool REntity::isInWorkingSet() constvirtual const
isOnEntity
Section titled “isOnEntity”virtual bool REntity::isOnEntity(const RVector &point, bool limited=true, double tolerance=RDEFAULT_TOLERANCE_1E_MIN4) constvirtual inline const
Returns: True if the given point is on this entity.
isPointType
Section titled “isPointType”virtual bool REntity::isPointType() constvirtual inline const
isSane
Section titled “isSane”virtual bool REntity::isSane() constvirtual inline const
isSelectable
Section titled “isSelectable”virtual bool REntity::isSelectable() constvirtual const
Reimplemented in isSelectable.
isSelected
Section titled “isSelected”virtual bool REntity::isSelected() constvirtual inline const
Reimplemented by entities that are part of a block reference but not stored as part of the block definition (currently only block attributes).
The default implementation returns false. Reimplemented by entities that do not want to be automatically painted
Returns: True if the entity is currently selected. This can for example influence the color in which the entity is exported.
Reimplemented from isSelected.
isSelectedWorkingSet
Section titled “isSelectedWorkingSet”virtual bool REntity::isSelectedWorkingSet() constvirtual inline const
Returns: True if the entity is currently selected to be added to the working set.
isUpdatesEnabled
Section titled “isUpdatesEnabled”virtual bool REntity::isUpdatesEnabled() constvirtual inline const
isValid
Section titled “isValid”virtual bool REntity::isValid() constvirtual inline const
Reimplemented in isValid.
isVisible
Section titled “isVisible”virtual bool REntity::isVisible(RObject::Id blockId=RObject::INVALID_ID) constvirtual const
Returns: true if this entity is visible (i.e. is on current or given block, is not on a frozen or hidden layer or in a frozen block).
mirror
Section titled “mirror”virtual bool REntity::mirror(const RLine &axis)virtual inline
mirror
Section titled “mirror”virtual bool REntity::mirror(const RVector &axis1, const RVector &axis2)virtual inline
virtual bool REntity::move(const RVector &offset)virtual inline
Moves this entity by the given offset.
moveReferencePoint
Section titled “moveReferencePoint”virtual bool REntity::moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint, Qt::KeyboardModifiers modifiers=Qt::NoModifier)virtual inline
Moves the given reference point to the given target point or does nothing if this entity has no reference point as the given location.
Returns: True if a reference point has been moved successfully, false otherwise.
rotate
Section titled “rotate”virtual bool REntity::rotate(double rotation, const RVector ¢er=RDEFAULT_RVECTOR)virtual inline
virtual bool REntity::scale(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR)virtual inline
virtual bool REntity::scale(double scaleFactor, const RVector ¢er=RDEFAULT_RVECTOR)virtual inline
scaleNonUniform
Section titled “scaleNonUniform”virtual QSharedPointer< REntity > REntity::scaleNonUniform(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR)virtual
Reimplemented in scaleNonUniform, scaleNonUniform, scaleNonUniform, scaleNonUniform.
scaleVisualProperties
Section titled “scaleVisualProperties”virtual void REntity::scaleVisualProperties(double scaleFactor)virtual inline
setAutoUpdatesBlocked
Section titled “setAutoUpdatesBlocked”virtual void REntity::setAutoUpdatesBlocked(bool on)virtual inline
Reimplemented from setAutoUpdatesBlocked.
setBlockId
Section titled “setBlockId”void REntity::setBlockId(RObject::Id blockId)inline
setColor
Section titled “setColor”void REntity::setColor(const RColor &color)inline
setDocument
Section titled “setDocument”void REntity::setDocument(RDocument *document)inline
setDrawOrder
Section titled “setDrawOrder”void REntity::setDrawOrder(int drawOrder)inline
Sets the draw order of this entity.
setLayerId
Section titled “setLayerId”void REntity::setLayerId(RObject::Id layerId)inline
setLayerName
Section titled “setLayerName”void REntity::setLayerName(const QString &n)inline
setLinetypeId
Section titled “setLinetypeId”void REntity::setLinetypeId(RObject::Id linetypeId)inline
Sets the linetype of this entity to the given linetype ID.
See also: RDocument::getLinetypeId
setLinetypePattern
Section titled “setLinetypePattern”void REntity::setLinetypePattern(const RLinetypePattern &linetypePattern)inline
setLinetypeScale
Section titled “setLinetypeScale”void REntity::setLinetypeScale(double linetypeScale)inline
setLineweight
Section titled “setLineweight”void REntity::setLineweight(RLineweight::Lineweight lineweight)inline
setProperty
Section titled “setProperty”virtual bool REntity::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, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty.
setSelected
Section titled “setSelected”virtual void REntity::setSelected(bool on)virtual
Reimplemented from setSelected.
setSelectedWorkingSet
Section titled “setSelectedWorkingSet”virtual void REntity::setSelectedWorkingSet(bool on)virtual inline
setUpdatesEnabled
Section titled “setUpdatesEnabled”void REntity::setUpdatesEnabled(bool on)inline
setViewportContext
Section titled “setViewportContext”virtual void REntity::setViewportContext(const RViewportData &)virtual inline
Reimplemented in setViewportContext.
virtual void REntity::setZ(double z)virtual inline
stretch
Section titled “stretch”virtual bool REntity::stretch(const RPolyline &area, const RVector &offset)virtual inline
Stretches the end points of this entity that are inside area by offset.
virtual void REntity::to2D()virtual inline
update
Section titled “update”virtual void REntity::update() constvirtual inline const
Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).
Reimplemented in update.
getRtti
Section titled “getRtti”static RS::EntityType REntity::getRtti()static inline
getStaticPropertyTypeIds
Section titled “getStaticPropertyTypeIds”static QSet< RPropertyTypeId > REntity::getStaticPropertyTypeIds()static inline
static void REntity::init()static
isComplex
Section titled “isComplex”static bool REntity::isComplex(const RS::EntityType type)static
isDimension
Section titled “isDimension”static bool REntity::isDimension(const RS::EntityType type)static
isTextBased
Section titled “isTextBased”static bool REntity::isTextBased(const RS::EntityType type)static
isThreeDimensionalExport
Section titled “isThreeDimensionalExport”static bool REntity::isThreeDimensionalExport(RExporter &e)static
Selects or deselects this entity.
Returns: True if the given exporter exports to a 3D view: a graphics scene with the projection rendering hint RS::RenderThreeD (RExporter::getProjectionRenderingHint). 2D graphics scenes use RS::RenderTop, other exporters (file export, painter path and shape exporters) always get the 2D representation.
Entity types with a separate 3D representation (e.g. mesh entities which export their top view to 2D views and their triangles to 3D views, or custom entities, see RCustomEntityHandler::exportEntity3D) use this in their exportEntity implementation to decide which representation to export.
PropertyBlock
Section titled “PropertyBlock”static RPropertyTypeId REntity::PropertyBlockstatic
PropertyColor
Section titled “PropertyColor”static RPropertyTypeId REntity::PropertyColorstatic
PropertyCustom
Section titled “PropertyCustom”static RPropertyTypeId REntity::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 REntity::PropertyDisplayedColorstatic
PropertyDrawOrder
Section titled “PropertyDrawOrder”static RPropertyTypeId REntity::PropertyDrawOrderstatic
PropertyHandle
Section titled “PropertyHandle”static RPropertyTypeId REntity::PropertyHandlestatic
PropertyLayer
Section titled “PropertyLayer”static RPropertyTypeId REntity::PropertyLayerstatic
PropertyLinetype
Section titled “PropertyLinetype”static RPropertyTypeId REntity::PropertyLinetypestatic
PropertyLinetypeScale
Section titled “PropertyLinetypeScale”static RPropertyTypeId REntity::PropertyLinetypeScalestatic
PropertyLineweight
Section titled “PropertyLineweight”static RPropertyTypeId REntity::PropertyLineweightstatic
PropertyMaxX
Section titled “PropertyMaxX”static RPropertyTypeId REntity::PropertyMaxXstatic
PropertyMaxY
Section titled “PropertyMaxY”static RPropertyTypeId REntity::PropertyMaxYstatic
PropertyMinX
Section titled “PropertyMinX”static RPropertyTypeId REntity::PropertyMinXstatic
PropertyMinY
Section titled “PropertyMinY”static RPropertyTypeId REntity::PropertyMinYstatic
PropertyParentId
Section titled “PropertyParentId”static RPropertyTypeId REntity::PropertyParentIdstatic
PropertyProtected
Section titled “PropertyProtected”static RPropertyTypeId REntity::PropertyProtectedstatic
PropertySizeX
Section titled “PropertySizeX”static RPropertyTypeId REntity::PropertySizeXstatic
PropertySizeY
Section titled “PropertySizeY”static RPropertyTypeId REntity::PropertySizeYstatic
PropertyType
Section titled “PropertyType”static RPropertyTypeId REntity::PropertyTypestatic
PropertyWorkingSet
Section titled “PropertyWorkingSet”static RPropertyTypeId REntity::PropertyWorkingSetstatic
virtual void REntity::print(QDebug dbg) constvirtual const protected
Stream operator for QDebug.
Reimplemented from print.
Reimplemented in print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print.
setParentId
Section titled “setParentId”void REntity::setParentId(RObject::Id parentId)inline protected
Use RStorage::setEntityParentId instead.
RStorage
Section titled “RStorage”friend class RStorageprivate