QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
REntityData Class Referenceabstract

Base class for all entity data classes. More...

#include <REntityData.h>

Inheritance diagram for REntityData:
RArcData RBlockReferenceData RCircleData RDimensionData REllipseData RHatchData RImageData RLeaderData RLineData RPointData RPolylineData RRayData RSolidData RSplineData RTextBasedData RToleranceData RViewportData RXLineData

Public Member Functions

virtual const RShapecastToConstShape () const
 
virtual RShapecastToShape ()
 
virtual bool clickReferencePoint (const RVector &referencePoint)
 Called when user clicks a reference point.
 
virtual bool cloneOnChange () const
 Reimplement to force clone on change in transactions.
 
void copyAttributesFrom (const REntityData &entityData, bool copyBlockId=true)
 
virtual bool flipHorizontal ()
 
virtual bool flipVertical ()
 
virtual QList< RVectorgetArcReferencePoints (const RBox &queryBox=RDEFAULT_RBOX) const
 
bool getAutoUpdatesBlocked () const
 
RObject::Id getBlockId () const
 
QString getBlockName () const
 
virtual RBox getBoundingBox (bool ignoreEmpty=false) const
 
virtual QList< RBoxgetBoundingBoxes (bool ignoreEmpty=false) const
 
virtual QList< RVectorgetCenterPoints (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< RShapegetClosestShape (const RVector &pos, double range=RNANDOUBLE, bool ignoreComplex=false, RObject::Id *subEntityId=NULL) const
 
RObject::Id getClosestSubEntityId (const RVector &pos, double range, bool ignoreComplex) const
 Convenience function for scripts.
 
virtual RColor getColor () const
 
virtual RColor getColor (bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) const
 
virtual RColor getColor (const RColor &unresolvedColor, const QStack< QSharedPointer< REntity > > &blockRefStack) const
 
virtual RColor getDisplayColor ()
 
virtual double getDistanceTo (const RVector &point, bool limited=true, double range=0.0, bool draft=false, double strictRange=RMAXDOUBLE) const
 
RDocumentgetDocument ()
 
const RDocumentgetDocument () const
 
virtual int getDrawOrder () const
 
virtual QList< RVectorgetEndPoints (const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) const
 
virtual RPolyline getHull (double offset) const
 
virtual QList< RRefPointgetInternalReferencePoints (RS::ProjectionRenderingHint hint=RS::RenderTop, QList< RObject::Id > *subEntityIds=NULL) const
 Can be overwritten to return internal, resolved reference points.
 
virtual QList< RVectorgetIntersectionPoints (const REntityData &other, bool limited=true, bool same=false, const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=true, QList< QPair< RObject::Id, RObject::Id > > *entityIds=NULL) const
 
virtual QList< RVectorgetIntersectionPoints (const RShape &shape, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=true) const
 
RObject::Id getLayerId () const
 
QString getLayerName () const
 
virtual RObject::Id getLinetypeId () const
 
virtual RObject::Id getLinetypeId (bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) const
 
virtual RLinetypePattern getLinetypePattern () const
 
virtual double getLinetypeScale () const
 
virtual RLineweight::Lineweight getLineweight () const
 
virtual RLineweight::Lineweight getLineweight (bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) const
 
double getLineweightInUnits (const QStack< QSharedPointer< REntity > > &blockRefStack) const
 
virtual QList< RVectorgetMiddlePoints (const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) const
 
RObject::Id getParentId () const
 
virtual RVector getPointOnEntity () const
 
virtual QList< RVectorgetPointsWithDistanceToEnd (double distance, int from=RS::FromAny, const RBox &queryBox=RDEFAULT_RBOX, QList< RObject::Id > *subEntityIds=NULL) const
 
virtual QList< RRefPointgetReferencePoints (RS::ProjectionRenderingHint hint=RS::RenderTop) const =0
 
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 isInside (const RBox &box) 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 isSelected () const
 
virtual bool isSelectedWorkingSet () const
 
virtual bool isUpdatesEnabled () const
 
virtual bool isValid () 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)=0
 Moves the given reference point to the given target point or does nothing if this entity has no reference point as the given location.
 
 REntityData (RDocument *document=NULL)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
virtual bool rotate (double rotation, const RVector &center=RDEFAULT_RVECTOR)
 
virtual bool scale (const RVector &scaleFactors, const RVector &center=RDEFAULT_RVECTOR)
 
virtual bool scale (double scaleFactor, const RVector &center=RDEFAULT_RVECTOR)
 
virtual void scaleVisualProperties (double scaleFactor)
 
void setAutoUpdatesBlocked (bool on)
 
virtual void setBlockId (RObject::Id blockId)
 
void setColor (const RColor &color)
 
void setDocument (RDocument *document)
 
virtual void setDrawOrder (int drawOrder)
 Sets the draw order of this entity.
 
virtual void setLayerId (RObject::Id layerId)
 
void setLayerName (const QString &layerName)
 
virtual void setLinetypeId (RObject::Id linetypeId)
 Sets the linetype of this entity to the given linetype ID.
 
virtual void setLinetypePattern (const RLinetypePattern &p)
 
virtual void setLinetypeScale (double linetypeScale)
 
void setLineweight (RLineweight::Lineweight lineweight)
 
virtual void setParentId (RObject::Id parentId)
 
virtual void setSelected (bool on)
 Selects or deselects this entity.
 
virtual void setSelectedWorkingSet (bool on)
 Selects or deselects this entity for addition to the current working set.
 
void setUpdatesEnabled (bool on)
 Enables / disables cache updates.
 
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 () const
 Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).
 
virtual ~REntityData ()
 

Static Public Member Functions

static int getDefaultDrawOrder ()
 

Protected Attributes

bool autoUpdatesBlocked
 Block auto updates is true during imports, undo and redo.
 
RObject::Id blockId
 
RColor color
 
RDocumentdocument
 
int drawOrder
 
RObject::Id layerId
 
RObject::Id linetypeId
 
double linetypeScale
 
RLineweight::Lineweight lineweight
 
RObject::Id parentId
 
bool selectionStatus
 
bool selectionStatusWorkingSet
 
bool updatesEnabled
 

Friends

class REntity
 

Detailed Description

Base class for all entity data classes.

Such classes are used to separate functionality from data. Data objects may for example be used to perform certain calculations. A custom entity might use the same data class as a standard entity to provide similar behavior (e.g. a wall might behave similar like a line entity).

\TODO derive from RObjectData with flags for selection status etc.

Scriptable:\nThis class is available in script environments.\n
Shared Pointer Support:\nObjects can be used in QSharedPointer.\n

Constructor & Destructor Documentation

◆ REntityData()

REntityData::REntityData ( RDocument * document = NULL)

Copyright (c) 2011-2018 by Andrew Mustun.

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.

◆ ~REntityData()

virtual REntityData::~REntityData ( )
inlinevirtual

Member Function Documentation

◆ castToConstShape()

virtual const RShape * REntityData::castToConstShape ( ) const
inlinevirtual
Non-Scriptable:\nThis function is not available in script environments.\n

◆ castToShape()

◆ clickReferencePoint()

virtual bool REntityData::clickReferencePoint ( const RVector & referencePoint)
inlinevirtual

Called when user clicks a reference point.

Returns
True if clicking the reference point had any immediate effect.

Reimplemented in RDimensionData.

◆ cloneOnChange()

virtual bool REntityData::cloneOnChange ( ) const
inlinevirtual

Reimplement to force clone on change in transactions.

Reimplemented in RHatchData.

◆ copyAttributesFrom()

void REntityData::copyAttributesFrom ( const REntityData & entityData,
bool copyBlockId = true )

◆ flipHorizontal()

◆ flipVertical()

◆ getArcReferencePoints()

QList< RVector > REntityData::getArcReferencePoints ( const RBox & queryBox = RDEFAULT_RBOX) const
virtual
Returns
Vector of reference points of this entity. Used for snap to reference points.

Reimplemented in RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ getAutoUpdatesBlocked()

bool REntityData::getAutoUpdatesBlocked ( ) const

◆ getBlockId()

RObject::Id REntityData::getBlockId ( ) const
inline

◆ getBlockName()

QString REntityData::getBlockName ( ) const

◆ getBoundingBox()

RBox REntityData::getBoundingBox ( bool ignoreEmpty = false) const
virtual

◆ getBoundingBoxes()

virtual QList< RBox > REntityData::getBoundingBoxes ( bool ignoreEmpty = false) const
inlinevirtual
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.

Reimplemented in RWipeoutData, RBlockReferenceData, and RPolylineData.

◆ getCenterPoints()

QList< RVector > REntityData::getCenterPoints ( const RBox & queryBox = RDEFAULT_RBOX,
QList< RObject::Id > * subEntityIds = NULL ) const
virtual
Returns
Vector of center points of this entity. Used for snap to center points.

Reimplemented in RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ getClosestPointOnEntity()

RVector REntityData::getClosestPointOnEntity ( const RVector & point,
double range = RNANDOUBLE,
bool limited = true,
RObject::Id * subEntityId = NULL ) const
virtual
Returns
Closest point to point on this entity. Used for snap to points on entity.

◆ getClosestShape()

QSharedPointer< RShape > REntityData::getClosestShape ( const RVector & pos,
double range = RNANDOUBLE,
bool ignoreComplex = false,
RObject::Id * subEntityId = NULL ) const
virtual
Returns
The one shape that is part of this entity which is the closest to the given position.

◆ getClosestSubEntityId()

RObject::Id REntityData::getClosestSubEntityId ( const RVector & pos,
double range,
bool ignoreComplex ) const
inline

Convenience function for scripts.

◆ getColor() [1/3]

virtual RColor REntityData::getColor ( ) const
inlinevirtual

Reimplemented in RAttributeData, and RHatchData.

◆ getColor() [2/3]

RColor REntityData::getColor ( bool resolve,
const QStack< QSharedPointer< REntity > > & blockRefStack ) const
virtual
Returns
Color of this entity.
Parameters
resolveResolve color if ByLayer or ByBlock.

Reimplemented in RAttributeData, and RHatchData.

◆ getColor() [3/3]

RColor REntityData::getColor ( const RColor & unresolvedColor,
const QStack< QSharedPointer< REntity > > & blockRefStack ) const
virtual

Reimplemented in RHatchData.

◆ getDefaultDrawOrder()

static int REntityData::getDefaultDrawOrder ( )
inlinestatic

◆ getDisplayColor()

virtual RColor REntityData::getDisplayColor ( )
inlinevirtual

◆ getDistanceTo()

double REntityData::getDistanceTo ( const RVector & point,
bool limited = true,
double range = 0.0,
bool draft = false,
double strictRange = RMAXDOUBLE ) const
virtual
Returns
The shortest distance from this entity to the given point.
Parameters
limitedLimit lines, arcs at end points, otherwise the orthogonal distance to the unlimited line / circle is returned.
rangeThis is returned for solid filled entities (solid filled or dense hatches, text entities) if the point is on the entity and the distance would be zero.
draftCalculate based on draft mode representation of the entity.
strictRangeIf limited, this is the maximum range from either end point of the entity. Zero to only return distances that are strictly orthogonal to the entity.

Reimplemented in RBlockReferenceData, RTextBasedData, RViewportData, RArcData, RCircleData, RDimensionData, REllipseData, RHatchData, RImageData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, RWipeoutData, and RXLineData.

◆ getDocument() [1/2]

RDocument * REntityData::getDocument ( )
inline

◆ getDocument() [2/2]

const RDocument * REntityData::getDocument ( ) const
inline

◆ getDrawOrder()

virtual int REntityData::getDrawOrder ( ) const
inlinevirtual
Returns
The draw order of this entity. Entities are usually drawn in ascending order of this number.

◆ getEndPoints()

QList< RVector > REntityData::getEndPoints ( const RBox & queryBox = RDEFAULT_RBOX,
QList< RObject::Id > * subEntityIds = NULL ) const
virtual
Returns
Vector of end points of this entity. Used for snap to end points.

Reimplemented in RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ getHull()

RPolyline REntityData::getHull ( double offset) const
virtual
Returns
A polygon that contains this entity. Default implementation returns a polygon around the bounding box.

Reimplemented in RLineData.

◆ getInternalReferencePoints()

QList< RRefPoint > REntityData::getInternalReferencePoints ( RS::ProjectionRenderingHint hint = RS::RenderTop,
QList< RObject::Id > * subEntityIds = NULL ) const
virtual

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().

Reimplemented in RBlockReferenceData, and RViewportData.

◆ getIntersectionPoints() [1/2]

QList< RVector > REntityData::getIntersectionPoints ( const REntityData & other,
bool limited = true,
bool same = false,
const RBox & queryBox = RDEFAULT_RBOX,
bool ignoreComplex = true,
QList< QPair< RObject::Id, RObject::Id > > * entityIds = NULL ) const
virtual
Returns
Points on entity which are intersection points with the given other entity. If same is true, the two datas originate from the same entity.

Reimplemented in RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ getIntersectionPoints() [2/2]

QList< RVector > REntityData::getIntersectionPoints ( const RShape & shape,
bool limited = true,
const RBox & queryBox = RDEFAULT_RBOX,
bool ignoreComplex = true ) const
virtual
Returns
Points on entity which are intersection points with the given shape.

Reimplemented in RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ getLayerId()

RObject::Id REntityData::getLayerId ( ) const
inline

◆ getLayerName()

QString REntityData::getLayerName ( ) const

◆ getLinetypeId() [1/2]

virtual RObject::Id REntityData::getLinetypeId ( ) const
inlinevirtual
Returns
Linetype ID of this entity. Note that this might be ByLayer or ByBlock.

Reimplemented in RAttributeData.

◆ getLinetypeId() [2/2]

RLinetype::Id REntityData::getLinetypeId ( bool resolve,
const QStack< QSharedPointer< REntity > > & blockRefStack ) const
virtual

Reimplemented in RAttributeData.

◆ getLinetypePattern()

RLinetypePattern REntityData::getLinetypePattern ( ) const
virtual

◆ getLinetypeScale()

virtual double REntityData::getLinetypeScale ( ) const
inlinevirtual

◆ getLineweight() [1/2]

virtual RLineweight::Lineweight REntityData::getLineweight ( ) const
inlinevirtual

Reimplemented in RAttributeData.

◆ getLineweight() [2/2]

RLineweight::Lineweight REntityData::getLineweight ( bool resolve,
const QStack< QSharedPointer< REntity > > & blockRefStack ) const
virtual
Parameters
resolveTrue: resolve ByLayer / ByBlock and always return a lineweight in 1/100 mm.
layerLayer to use for resolving if known, NULL otherwise.
blockRefBlock reference to use for resolving if known, NULL otherwise.

Reimplemented in RAttributeData.

◆ getLineweightInUnits()

double REntityData::getLineweightInUnits ( const QStack< QSharedPointer< REntity > > & blockRefStack) const

◆ getMiddlePoints()

QList< RVector > REntityData::getMiddlePoints ( const RBox & queryBox = RDEFAULT_RBOX,
QList< RObject::Id > * subEntityIds = NULL ) const
virtual
Returns
Vector of middle points of this entity. Used for snap to middle points.

Reimplemented in RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ getParentId()

RObject::Id REntityData::getParentId ( ) const
inline
Returns
ID of parent entity (block reference for block attribute).

◆ getPointOnEntity()

RVector REntityData::getPointOnEntity ( ) const
virtual
Returns
A point that is on the entity. Used to check if an entity is inside a polygon.

Reimplemented in RBlockReferenceData, RTextBasedData, RDimensionData, RHatchData, RImageData, and RToleranceData.

◆ getPointsWithDistanceToEnd()

QList< RVector > REntityData::getPointsWithDistanceToEnd ( double distance,
int from = RS::FromAny,
const RBox & queryBox = RDEFAULT_RBOX,
QList< RObject::Id > * subEntityIds = NULL ) const
virtual
Returns
Points on entity with given distance to either endpoint. Used for snap to points with distance on entity.

Reimplemented in RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ getReferencePoints()

virtual QList< RRefPoint > REntityData::getReferencePoints ( RS::ProjectionRenderingHint hint = RS::RenderTop) const
pure virtual

◆ getShapes()

virtual QList< QSharedPointer< RShape > > REntityData::getShapes ( const RBox & queryBox = RDEFAULT_RBOX,
bool ignoreComplex = false,
bool segment = false,
QList< RObject::Id > * entityIds = NULL ) const
inlinevirtual
Returns
Shapes that represent the geometry of this entity.
Parameters
queryBoxLimit returned shapes to query box
ignoreComplexIgnore complex shapes and explode those into simple shapes
segmentSplit up splines into spline segments

Reimplemented in RBlockReferenceData, RTextBasedData, RViewportData, RArcData, RCircleData, RDimensionData, REllipseData, RHatchData, RImageData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, RToleranceData, and RXLineData.

◆ getType()

◆ getVectorTo()

RVector REntityData::getVectorTo ( const RVector & point,
bool limited = true,
double strictRange = RMAXDOUBLE ) const
virtual
Returns
The distance vector from this entity to the given point.
Parameters
pointthe point to which the distance was measured
limitedIf 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).

Reimplemented in RBlockReferenceData, RViewportData, RArcData, RCircleData, REllipseData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, RToleranceData, and RXLineData.

◆ intersectsWith()

bool REntityData::intersectsWith ( const RShape & shape) const
virtual
Returns
True if this entity intersects with the given shape, false otherwise.
Todo
better to pass another entity data object?

Reimplemented in RTextBasedData, RViewportData, RArcData, RCircleData, RDimensionData, REllipseData, RHatchData, RImageData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ isInside()

virtual bool REntityData::isInside ( const RBox & box) const
inlinevirtual
Returns
True if this entity is completely inside the given box, false otherwise. Only geometry is accounted for, not the line width.

◆ isOnEntity()

bool REntityData::isOnEntity ( const RVector & point,
bool limited = true,
double tolerance = RDEFAULT_TOLERANCE_1E_MIN4 ) const
virtual
Returns
True if the given point is on this entity.

◆ isPointType()

virtual bool REntityData::isPointType ( ) const
inlinevirtual
Returns
True if entity is of point nature (point, pixel based block).

Reimplemented in RBlockReferenceData, and RPointData.

◆ isSane()

◆ isSelected()

virtual bool REntityData::isSelected ( ) const
inlinevirtual
Returns
True if the entity is currently selected. This can for example influence the color in which the entity is exported.

◆ isSelectedWorkingSet()

virtual bool REntityData::isSelectedWorkingSet ( ) const
inlinevirtual
Returns
True if the entity is currently selected to be added to the working set.

◆ isUpdatesEnabled()

virtual bool REntityData::isUpdatesEnabled ( ) const
inlinevirtual
Returns
True if the entity caches are updated when the entity is being exported.

◆ isValid()

◆ mirror() [1/2]

◆ mirror() [2/2]

bool REntityData::mirror ( const RVector & axis1,
const RVector & axis2 )
virtual

◆ move()

◆ moveReferencePoint()

virtual bool REntityData::moveReferencePoint ( const RVector & referencePoint,
const RVector & targetPoint,
Qt::KeyboardModifiers modifiers = Qt::NoModifier )
pure virtual

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.

Implemented in RWipeoutData, RBlockReferenceData, RTextBasedData, RViewportData, RArcData, RCircleData, RDimAlignedData, RDimAngular2LData, RDimAngular3PData, RDimAngularData, RDimArcLengthData, RDimDiametricData, RDimensionData, RDimLinearData, RDimOrdinateData, RDimRadialData, RDimRotatedData, REllipseData, RHatchData, RImageData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, RToleranceData, and RXLineData.

◆ rotate()

◆ scale() [1/2]

◆ scale() [2/2]

bool REntityData::scale ( double scaleFactor,
const RVector & center = RDEFAULT_RVECTOR )
virtual

◆ scaleVisualProperties()

void REntityData::scaleVisualProperties ( double scaleFactor)
virtual

◆ setAutoUpdatesBlocked()

void REntityData::setAutoUpdatesBlocked ( bool on)

◆ setBlockId()

virtual void REntityData::setBlockId ( RObject::Id blockId)
inlinevirtual

◆ setColor()

void REntityData::setColor ( const RColor & color)
inline

◆ setDocument()

void REntityData::setDocument ( RDocument * document)
inline

◆ setDrawOrder()

virtual void REntityData::setDrawOrder ( int drawOrder)
inlinevirtual

Sets the draw order of this entity.

◆ setLayerId()

virtual void REntityData::setLayerId ( RObject::Id layerId)
inlinevirtual

◆ setLayerName()

void REntityData::setLayerName ( const QString & layerName)

◆ setLinetypeId()

virtual void REntityData::setLinetypeId ( RObject::Id linetypeId)
inlinevirtual

Sets the linetype of this entity to the given linetype ID.

See also
RDocument::getLinetypeId

◆ setLinetypePattern()

void REntityData::setLinetypePattern ( const RLinetypePattern & p)
virtual

◆ setLinetypeScale()

virtual void REntityData::setLinetypeScale ( double linetypeScale)
inlinevirtual

◆ setLineweight()

void REntityData::setLineweight ( RLineweight::Lineweight lineweight)
inline

◆ setParentId()

virtual void REntityData::setParentId ( RObject::Id parentId)
inlinevirtual

◆ setSelected()

virtual void REntityData::setSelected ( bool on)
inlinevirtual

Selects or deselects this entity.

Reimplemented in RTextBasedData.

◆ setSelectedWorkingSet()

virtual void REntityData::setSelectedWorkingSet ( bool on)
inlinevirtual

Selects or deselects this entity for addition to the current working set.

◆ setUpdatesEnabled()

void REntityData::setUpdatesEnabled ( bool on)
inline

Enables / disables cache updates.

◆ setZ()

void REntityData::setZ ( double z)
virtual

◆ stretch()

bool REntityData::stretch ( const RPolyline & area,
const RVector & offset )
virtual

Stretches the end points of this entity that are inside area by offset.

Reimplemented in RViewportData, RArcData, RCircleData, RDimLinearData, RDimOrdinateData, REllipseData, RHatchData, RLeaderData, RLineData, RPointData, RPolylineData, RRayData, RSolidData, RSplineData, and RXLineData.

◆ to2D()

◆ update()

virtual void REntityData::update ( ) const
inlinevirtual

Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).

Reimplemented in RBlockReferenceData, RTextBasedData, RDimensionData, RHatchData, RLeaderData, RSplineData, and RToleranceData.

Friends And Related Symbol Documentation

◆ REntity

friend class REntity
friend

Member Data Documentation

◆ autoUpdatesBlocked

bool REntityData::autoUpdatesBlocked
protected

Block auto updates is true during imports, undo and redo.

◆ blockId

RObject::Id REntityData::blockId
protected

◆ color

RColor REntityData::color
protected

◆ document

RDocument* REntityData::document
protected

◆ drawOrder

int REntityData::drawOrder
protected

◆ layerId

RObject::Id REntityData::layerId
protected

◆ linetypeId

RObject::Id REntityData::linetypeId
protected

◆ linetypeScale

double REntityData::linetypeScale
protected

◆ lineweight

RLineweight::Lineweight REntityData::lineweight
protected

◆ parentId

RObject::Id REntityData::parentId
protected

◆ selectionStatus

bool REntityData::selectionStatus
protected

◆ selectionStatusWorkingSet

bool REntityData::selectionStatusWorkingSet
protected

◆ updatesEnabled

bool REntityData::updatesEnabled
protected

The documentation for this class was generated from the following files: