20#ifndef RLEADERENTITY_H
21#define RLEADERENTITY_H
84 virtual QSharedPointer<RObject>
clone()
const {
89 return QSharedPointer<RLeaderEntity>(
new RLeaderEntity(*
this));
94 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
96 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
111 return data.getClosestSegment(point);
115 return data.reverse();
119 data.setArrowHead(on);
123 return data.hasArrowHead();
127 data.setSplineShaped(on);
131 return data.isSplineShaped();
143 return data.countVertices();
148 data.appendVertex(vertex);
153 data.prependVertex(vertex);
157 data.insertVertex(index, vertex);
161 data.insertVertexAt(vertex);
165 return data.getVertexAt(
i);
169 data.setVertexAt(
i, v);
173 data.removeLastVertex();
177 data.removeVertex(index);
181 return data.countSegments();
185 return data.getSegmentAt(
i);
189 return data.getBulgeAt(
i);
193 data.setBulgeAt(
i, b);
197 return data.getDirection1();
201 return data.getDirection2();
205 return data.getEndPoint();
209 return data.getStartPoint();
217 return data.isClosed();
221 return data.getDimscale();
229 return data.getDimasz(
scale);
237 return data.getExploded();
241 return data.getDimLeaderBlockId();
244 data.setDimLeaderBlockId(
id);
248 data.clearStyleOverrides();
254 virtual void print(QDebug dbg)
const;
Q_DECLARE_METATYPE(RMath *)
int i
Copyright (c) 2011-2018 by Andrew Mustun.
Definition autostart.js:32
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Base class for all entity classes.
Definition REntity.h:63
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition REntity.cpp:236
static void init()
Definition REntity.cpp:89
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
Leader entity data class.
Definition RLeaderData.h:42
Leader entity class.
Definition RLeaderEntity.h:38
static RPropertyTypeId PropertyDisplayedColor
Definition RLeaderEntity.h:53
static RPropertyTypeId PropertyVertexNX
Definition RLeaderEntity.h:59
RVector getVertexAt(int i) const
Definition RLeaderEntity.h:164
static RPropertyTypeId PropertySplineShaped
Definition RLeaderEntity.h:57
bool isSplineShaped() const
Definition RLeaderEntity.h:130
static RS::EntityType getRtti()
Definition RLeaderEntity.h:76
static RPropertyTypeId PropertyType
Definition RLeaderEntity.h:46
double getBulgeAt(int i) const
Definition RLeaderEntity.h:188
bool reverse()
Definition RLeaderEntity.h:114
static RPropertyTypeId PropertyDimscale
Definition RLeaderEntity.h:63
static RPropertyTypeId PropertyDimasz
Definition RLeaderEntity.h:64
int getClosestSegment(const RVector &point) const
Definition RLeaderEntity.h:110
RLeaderData data
Definition RLeaderEntity.h:257
void setBulgeAt(int i, double b)
Definition RLeaderEntity.h:192
double getDirection1() const
Definition RLeaderEntity.h:196
QSharedPointer< RShape > getSegmentAt(int i) const
Definition RLeaderEntity.h:184
QList< QSharedPointer< RShape > > getExploded() const
Definition RLeaderEntity.h:236
static RPropertyTypeId PropertyHandle
Definition RLeaderEntity.h:43
QSharedPointer< RLeaderEntity > cloneToLeaderEntity() const
Definition RLeaderEntity.h:88
void normalize()
Definition RLeaderEntity.h:138
static RPropertyTypeId PropertyVertexNZ
Definition RLeaderEntity.h:61
void setDimLeaderBlockId(RObject::Id id)
Definition RLeaderEntity.h:243
static RPropertyTypeId PropertyWorkingSet
Definition RLeaderEntity.h:45
static RPropertyTypeId PropertyColor
Definition RLeaderEntity.h:52
static RPropertyTypeId PropertyBlock
Definition RLeaderEntity.h:47
static RPropertyTypeId PropertyArrowHead
Definition RLeaderEntity.h:56
static RPropertyTypeId PropertyTotalLength
Definition RLeaderEntity.h:67
void setVertexAt(int i, const RVector &v)
Definition RLeaderEntity.h:168
void setDimasz(double v)
Definition RLeaderEntity.h:232
bool hasArrowHead() const
Definition RLeaderEntity.h:122
static RPropertyTypeId PropertyProtected
Definition RLeaderEntity.h:44
void prependVertex(const RVector &vertex, double bulge=0.0)
Definition RLeaderEntity.h:151
virtual const RLeaderData & getData() const
Definition RLeaderEntity.h:106
RVector getEndPoint() const
Definition RLeaderEntity.h:204
void clear()
Definition RLeaderEntity.h:134
void clearStyleOverrides()
Definition RLeaderEntity.h:247
void setData(RLeaderData &d)
Definition RLeaderEntity.h:102
void insertVertex(int index, const RVector &vertex)
Definition RLeaderEntity.h:156
double getDirection2() const
Definition RLeaderEntity.h:200
static RPropertyTypeId PropertyLinetype
Definition RLeaderEntity.h:49
void removeVertex(int index)
Definition RLeaderEntity.h:176
static RPropertyTypeId PropertyVertexNY
Definition RLeaderEntity.h:60
static RPropertyTypeId PropertyDimLeaderBlock
Definition RLeaderEntity.h:58
void removeLastVertex()
Definition RLeaderEntity.h:172
virtual QSharedPointer< RObject > clone() const
Definition RLeaderEntity.h:84
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition RLeaderEntity.h:80
void setArrowHead(bool on)
Definition RLeaderEntity.h:118
static RPropertyTypeId PropertyLineweight
Definition RLeaderEntity.h:51
int countSegments() const
Definition RLeaderEntity.h:180
static RPropertyTypeId PropertyDrawOrder
Definition RLeaderEntity.h:54
void setSplineShaped(bool on)
Definition RLeaderEntity.h:126
void setClosed(bool on)
Definition RLeaderEntity.h:212
void setDimscale(double v)
Definition RLeaderEntity.h:224
double getDimasz(bool scale=true) const
Definition RLeaderEntity.h:228
double getDimscale() const
Definition RLeaderEntity.h:220
bool isClosed() const
Definition RLeaderEntity.h:216
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLeaderEntity.h:42
static RPropertyTypeId PropertyLinetypeScale
Definition RLeaderEntity.h:50
int countVertices() const
Definition RLeaderEntity.h:142
static RPropertyTypeId PropertyLength
Definition RLeaderEntity.h:66
RVector getStartPoint() const
Definition RLeaderEntity.h:208
virtual RLeaderData & getData()
Definition RLeaderEntity.h:98
void appendVertex(const RVector &vertex, double bulge=0.0)
Definition RLeaderEntity.h:146
RObject::Id getDimLeaderBlockId() const
Definition RLeaderEntity.h:240
static RPropertyTypeId PropertyLayer
Definition RLeaderEntity.h:48
void insertVertexAt(const RVector &vertex)
Definition RLeaderEntity.h:160
int Id
Definition RObject.h:69
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
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityLeader
Leader.
Definition RS.h:275
Transaction implementation.
Definition RTransaction.h:73
Represents a 3d vector (x/y/z).
Definition RVector.h:47
#define QCADENTITY_EXPORT
Definition entity_global.h:10
void scale(void e, void factor, void focusPoint)
Scales the given entity or shape by the given factor with the given focus point.
Definition simple_modify.js:15
#define NULL
Definition opennurbs_system.h:256