77 Q_DECLARE_FLAGS(LayerFlags, LayerFlag)
83 bool locked =
false,
const RColor& color = Qt::black,
101 virtual QSharedPointer<RObject>
clone()
const {
102 return QSharedPointer<RObject>(
new RLayer(*
this));
106 return QSharedPointer<RLayer>(
new RLayer(*
this));
115 void setName(
const QString& n);
118 return isOff() || isFrozen();
158 if (name.toLower()!=
"defpoints") {
203 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
205 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
220 return QList<QString>();
242 if (layerProxy!=
NULL) {
243 return layerProxy->getHierarchySeparator();
249 if (layerProxy!=
NULL) {
250 return layerProxy->hasChildLayers(doc, layerName);
256 if (layerProxy!=
NULL) {
257 return layerProxy->getChildLayerNames(doc, layerName, recursive);
259 return QList<QString>();
263 if (layerProxy!=
NULL) {
264 return layerProxy->getParentLayerName(layerName);
270 if (layerProxy!=
NULL) {
271 return layerProxy->getShortLayerName(layerName);
277 if (layerProxy!=
NULL) {
278 return layerProxy->getLayerNameHierarchy(layerName);
280 return QList<QString>();
284 if (layerProxy!=
NULL) {
285 return layerProxy->isChildLayerOf(layerName, parentLayerName);
291 return layerProxy!=
NULL;
298 if (layerProxy!=
NULL) {
311 virtual void print(QDebug dbg)
const;
Q_DECLARE_METATYPE(RMath *)
Color.
Definition RColor.h:43
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Represents a layer in a drawing.
Definition RLayer.h:45
static bool hasChildLayersStatic(const RDocument *doc, const QString &layerName)
Definition RLayer.h:248
void setLinetypeId(RObject::Id lt)
Definition RLayer.h:191
static RPropertyTypeId PropertySelected
Definition RLayer.h:51
LayerFlag
Definition RLayer.h:67
@ Snappable
snap disabled for this layer
Definition RLayer.h:74
@ Frozen
layer is frozen
Definition RLayer.h:70
@ OffIsFreeze
off means freeze for this layer
Definition RLayer.h:75
@ Locked
layer is locked
Definition RLayer.h:71
@ Off
layer is off
Definition RLayer.h:69
@ Plottable
printing disabled for this layer
Definition RLayer.h:73
@ Collapsed
layer is collapsed
Definition RLayer.h:72
void setOff(bool on)
Definition RLayer.h:125
static RPropertyTypeId PropertyColor
Definition RLayer.h:61
void setSnappable(bool on)
Definition RLayer.h:167
static RPropertyTypeId PropertyCustom
Definition RLayer.h:47
static QList< QString > getLayerNameHierarchyStatic(const QString &layerName)
Definition RLayer.h:276
static RPropertyTypeId PropertySnappable
Definition RLayer.h:59
void setFrozen(bool on)
Definition RLayer.h:133
QList< QString > getChildLayerNames(bool recursive=true) const
Definition RLayer.h:217
static QString getHierarchySeparator()
Definition RLayer.h:241
static RPropertyTypeId PropertyProtected
Definition RLayer.h:50
virtual RS::EntityType getType() const
Definition RLayer.h:97
QString getParentLayerName() const
Definition RLayer.h:225
RObject::Id getLinetypeId() const
Definition RLayer.h:187
static RPropertyTypeId PropertyCollapsed
Definition RLayer.h:57
static RPropertyTypeId PropertyType
Definition RLayer.h:48
RColor color
Definition RLayer.h:316
bool isOff() const
Definition RLayer.h:121
void setCollapsed(bool on)
Definition RLayer.h:149
static RPropertyTypeId PropertyLineweight
Definition RLayer.h:63
static bool hasProxy()
Definition RLayer.h:290
QString getName() const
Definition RLayer.h:111
void setPlottable(bool on)
Definition RLayer.h:157
bool hasChildLayers() const
Definition RLayer.h:209
LayerFlags flags
Definition RLayer.h:315
static RPropertyTypeId PropertyPlottable
Definition RLayer.h:58
static RLayerProxy * getLayerProxy()
Definition RLayer.h:307
void setLineweight(RLineweight::Lineweight lw)
Definition RLayer.h:199
bool isPlottable() const
Definition RLayer.h:153
static RPropertyTypeId PropertyFrozen
Definition RLayer.h:55
bool isCollapsed() const
Definition RLayer.h:145
void setOffIsFreeze(bool on)
Definition RLayer.h:175
RLineweight::Lineweight lineweight
Definition RLayer.h:318
static RPropertyTypeId PropertyName
Definition RLayer.h:53
static RPropertyTypeId PropertyOffIsFreeze
Definition RLayer.h:60
QString name
Definition RLayer.h:314
QString getShortLayerName() const
Definition RLayer.h:229
static RPropertyTypeId PropertyHandle
Definition RLayer.h:49
void setColor(const RColor &c)
Definition RLayer.h:183
static QList< QString > getChildLayerNamesStatic(const RDocument *doc, const QString &layerName, bool recursive=true)
Definition RLayer.h:255
bool isFrozen() const
Definition RLayer.h:129
bool isSnappable() const
Definition RLayer.h:163
static QString getShortLayerNameStatic(const QString &layerName)
Definition RLayer.h:269
static RPropertyTypeId PropertyLinetype
Definition RLayer.h:62
bool isOffIsFreeze() const
Definition RLayer.h:171
static RLayerProxy * layerProxy
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLayer.h:320
bool isOffOrFrozen() const
Definition RLayer.h:117
QList< QString > getLayerNameHierarchy() const
Definition RLayer.h:233
bool isLocked() const
Definition RLayer.h:137
static RPropertyTypeId PropertyLocked
Definition RLayer.h:56
static void setLayerProxy(RLayerProxy *p)
Definition RLayer.h:297
RColor getColor() const
Definition RLayer.h:179
RObject::Id linetypeId
Definition RLayer.h:317
static RS::EntityType getRtti()
Definition RLayer.h:93
virtual QSharedPointer< RObject > clone() const
Definition RLayer.h:101
static bool isChildLayerOfStatic(const QString &layerName, const QString &parentLayerName)
Definition RLayer.h:283
QSharedPointer< RLayer > cloneToLayer() const
Definition RLayer.h:105
RLineweight::Lineweight getLineweight() const
Definition RLayer.h:195
bool isChildLayerOf(const QString &layerName) const
Definition RLayer.h:237
static QString getParentLayerNameStatic(const QString &layerName)
Definition RLayer.h:262
static RPropertyTypeId PropertyOff
Definition RLayer.h:54
void setLocked(bool on)
Definition RLayer.h:141
Proxy for advanced layer functionality.
Definition RLayerProxy.h:37
Lineweight
Definition RLineweight.h:44
@ Weight000
Definition RLineweight.h:45
Abstract base class for all objects.
Definition RObject.h:64
static void init()
Definition RObject.cpp:68
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition RObject.cpp:180
static const Id INVALID_ID
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RObject.h:70
bool getFlag(int flag) const
Definition RObject.h:149
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition RObject.cpp:136
int Id
Definition RObject.h:69
void setFlag(int flag, bool on=true)
Definition RObject.h:142
RDocument * getDocument()
Definition RObject.h:132
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition RObject.cpp:719
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyAttributes.h:42
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyTypeId.h:54
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ ObjectLayer
Definition RS.h:232
Transaction implementation.
Definition RTransaction.h:73
#define QCADCORE_EXPORT
Definition core_global.h:10
#define NULL
Definition opennurbs_system.h:256