|
QCAD
Open Source 2D CAD
|
Go to the documentation of this file.
80 Q_DECLARE_FLAGS(LayerFlags, LayerFlag)
86 bool locked =
false,
const RColor& color = Qt::black,
108 void setName(
const QString& n);
111 return isOff() || isFrozen();
151 if (name.toLower()!=
"defpoints") {
196 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
198 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
213 return QList<QString>();
235 if (layerProxy!=NULL) {
236 return layerProxy->getHierarchySeparator();
242 if (layerProxy!=NULL) {
243 return layerProxy->hasChildLayers(doc, layerName);
249 if (layerProxy!=NULL) {
250 return layerProxy->getChildLayerNames(doc, layerName, recursive);
252 return QList<QString>();
256 if (layerProxy!=NULL) {
257 return layerProxy->getParentLayerName(layerName);
263 if (layerProxy!=NULL) {
264 return layerProxy->getShortLayerName(layerName);
270 if (layerProxy!=NULL) {
271 return layerProxy->getLayerNameHierarchy(layerName);
273 return QList<QString>();
277 if (layerProxy!=NULL) {
278 return layerProxy->isChildLayerOf(layerName, parentLayerName);
284 return layerProxy!=NULL;
291 if (layerProxy!=NULL) {
static RPropertyTypeId PropertyCollapsed
Definition: RLayer.h:60
static RPropertyTypeId PropertyType
Definition: RLayer.h:51
@ Collapsed
layer is collapsed
Definition: RLayer.h:75
@ OffIsFreeze
off means freeze for this layer
Definition: RLayer.h:78
@ ObjectLayer
Definition: RS.h:130
QList< QString > getLayerNameHierarchy() const
Definition: RLayer.h:226
QList< QString > getChildLayerNames(bool recursive=true) const
Definition: RLayer.h:210
LayerFlags flags
Definition: RLayer.h:306
static const Id INVALID_ID
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RObject.h:67
static RPropertyTypeId PropertyName
Definition: RLayer.h:56
virtual RObject * clone() const =0
static bool hasChildLayersStatic(const RDocument *doc, const QString &layerName)
Definition: RLayer.h:241
static RPropertyTypeId PropertyLinetype
Definition: RLayer.h:65
static bool hasProxy()
Definition: RLayer.h:283
static QString getParentLayerNameStatic(const QString &layerName)
Definition: RLayer.h:255
void setFlag(int flag, bool on=true)
Definition: RObject.h:123
@ Snappable
snap disabled for this layer
Definition: RLayer.h:77
@ Weight000
Definition: RLineweight.h:47
@ Plottable
printing disabled for this layer
Definition: RLayer.h:76
static QString getHierarchySeparator()
Definition: RLayer.h:234
bool isOffOrFrozen() const
Definition: RLayer.h:110
static RPropertyTypeId PropertyLocked
Definition: RLayer.h:59
QString getShortLayerName() const
Definition: RLayer.h:222
Abstract base class for all objects.
Definition: RObject.h:61
QString getParentLayerName() const
Definition: RLayer.h:218
void setPlottable(bool on)
Definition: RLayer.h:150
void setCollapsed(bool on)
Definition: RLayer.h:142
bool isPlottable() const
Definition: RLayer.h:146
bool isLocked() const
Definition: RLayer.h:130
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:125
bool hasChildLayers() const
Definition: RLayer.h:202
static RPropertyTypeId PropertyHandle
Definition: RLayer.h:52
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition: RObject.cpp:106
static void setLayerProxy(RLayerProxy *p)
Definition: RLayer.h:290
void setFrozen(bool on)
Definition: RLayer.h:126
RLinetype::Id getLinetypeId() const
Definition: RLayer.h:180
bool isOff() const
Definition: RLayer.h:114
RLinetype::Id linetypeId
Definition: RLayer.h:308
static RPropertyTypeId PropertyCustom
Definition: RLayer.h:50
void setLocked(bool on)
Definition: RLayer.h:134
static RLayerProxy * layerProxy
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RLayer.h:311
void setOffIsFreeze(bool on)
Definition: RLayer.h:168
Represents a layer in a drawing.
Definition: RLayer.h:48
bool isChildLayerOf(const QString &layerName) const
Definition: RLayer.h:230
static QList< QString > getLayerNameHierarchyStatic(const QString &layerName)
Definition: RLayer.h:269
QCADCORE_EXPORT QDebug operator<<(QDebug dbg, const RLayer &l)
Stream operator for QDebug.
Definition: RLayer.cpp:247
static RPropertyTypeId PropertySnappable
Definition: RLayer.h:62
static RPropertyTypeId PropertySelected
Definition: RLayer.h:54
LayerFlag
Definition: RLayer.h:70
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition: RObject.cpp:151
static RPropertyTypeId PropertyLineweight
Definition: RLayer.h:66
RColor color
Definition: RLayer.h:307
Q_DECLARE_METATYPE(RMath *)
bool getFlag(int flag) const
Definition: RObject.h:130
@ Off
layer is off
Definition: RLayer.h:72
static RLayerProxy * getLayerProxy()
Definition: RLayer.h:300
static void init()
Definition: RObject.cpp:67
void setLineweight(RLineweight::Lineweight lw)
Definition: RLayer.h:192
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPropertyTypeId.h:59
int Id
Definition: RObject.h:66
bool isOffIsFreeze() const
Definition: RLayer.h:164
void setColor(const RColor &c)
Definition: RLayer.h:176
void setOff(bool on)
Definition: RLayer.h:118
RLineweight::Lineweight lineweight
Definition: RLayer.h:309
static RPropertyTypeId PropertyOff
Definition: RLayer.h:57
static RPropertyTypeId PropertyOffIsFreeze
Definition: RLayer.h:63
void setLinetypeId(RLinetype::Id lt)
Definition: RLayer.h:184
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition: RDocument.h:72
bool isCollapsed() const
Definition: RLayer.h:138
void setSnappable(bool on)
Definition: RLayer.h:160
Lineweight
Definition: RLineweight.h:46
bool isFrozen() const
Definition: RLayer.h:122
QString getName() const
Definition: RLayer.h:104
@ Locked
layer is locked
Definition: RLayer.h:74
static RPropertyTypeId PropertyColor
Definition: RLayer.h:64
Transaction implementation.
Definition: RTransaction.h:74
virtual RS::EntityType getType() const
Definition: RLayer.h:96
RDocument * getDocument()
Definition: RObject.h:113
bool isSnappable() const
Definition: RLayer.h:156
static QString getShortLayerNameStatic(const QString &layerName)
Definition: RLayer.h:262
RLineweight::Lineweight getLineweight() const
Definition: RLayer.h:188
@ Frozen
layer is frozen
Definition: RLayer.h:73
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RLayerProxy.h:34
static RPropertyTypeId PropertyPlottable
Definition: RLayer.h:61
static RPropertyTypeId PropertyProtected
Definition: RLayer.h:53
RColor getColor() const
Definition: RLayer.h:172
#define QCADCORE_EXPORT
Definition: core_global.h:10
static QList< QString > getChildLayerNamesStatic(const RDocument *doc, const QString &layerName, bool recursive=true)
Definition: RLayer.h:248
static RPropertyTypeId PropertyFrozen
Definition: RLayer.h:58
Color.
Definition: RColor.h:44
static bool isChildLayerOfStatic(const QString &layerName, const QString &parentLayerName)
Definition: RLayer.h:276
QString name
Definition: RLayer.h:305