RLayer
Class in Core Module
Header: #include <src/core/RLayer.h>
Inherits: RObject
Description
Section titled “Description”Represents a layer in a drawing.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Public Types
Section titled “Public Types”| enum | LayerFlag { Off, Frozen, Locked, Collapsed, Plottable, Snappable, OffIsFreeze } |
Public Functions
Section titled “Public Functions”RLayer() |
|
RLayer(const RLayer &other) |
|
RLayer(RDocument *document, const QString &name, bool frozen=false, bool locked=false, const RColor &color=Qt::black, RObject::Id linetypeId=RObject::INVALID_ID, RLineweight::Lineweight lineweight=RLineweight::Weight000, bool off=false) |
|
| virtual | ~RLayer() |
| virtual QSharedPointer< RObject > | clone() const |
| QSharedPointer< RLayer > | cloneToLayer() const |
| QList< QString > | getChildLayerNames(bool recursive=true) const |
| RColor | getColor() const |
| QList< QString > | getLayerNameHierarchy() const |
| RObject::Id | getLinetypeId() const |
| RLineweight::Lineweight | getLineweight() const |
| QString | getName() const |
| RObject::Id | getParentLayerId() const |
| QString | getParentLayerName() const |
| virtual QPair< QVariant, RPropertyAttributes > | getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false) |
| QString | getShortLayerName() const |
| virtual RS::EntityType | getType() const |
| bool | hasChildLayers() const |
| bool | isChildLayerOf(const QString &layerName) const |
| bool | isCollapsed() const |
| bool | isFrozen() const |
| bool | isLocked() const |
| bool | isOff() const |
| bool | isOffIsFreeze() const |
| bool | isOffOrFrozen() const |
| bool | isPlottable() const |
| bool | isSnappable() const |
| virtual void | print(QDebug dbg) constStream operator for QDebug. |
| void | setCollapsed(bool on) |
| void | setColor(const RColor &c) |
| void | setFrozen(bool on) |
| void | setLinetypeId(RObject::Id lt) |
| void | setLineweight(RLineweight::Lineweight lw) |
| void | setLocked(bool on) |
| void | setName(const QString &n) |
| void | setOff(bool on) |
| void | setOffIsFreeze(bool on) |
| void | setPlottable(bool on) |
| virtual bool | setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)Sets the given property to the given value. |
| void | setSnappable(bool on) |
Static Public Functions
Section titled “Static Public Functions”| static QList< QString > | getChildLayerNamesStatic(const RDocument *doc, const QString &layerName, bool recursive=true) |
| static QString | getHierarchySeparator() |
| static QList< QString > | getLayerNameHierarchyStatic(const QString &layerName) |
| static RLayerProxy * | getLayerProxy() |
| static QString | getParentLayerNameStatic(const QString &layerName) |
| static RS::EntityType | getRtti() |
| static QString | getShortLayerNameStatic(const QString &layerName) |
| static bool | hasChildLayersStatic(const RDocument *doc, const QString &layerName) |
| static bool | hasProxy() |
| static void | init() |
| static bool | isChildLayerOfStatic(const QString &layerName, const QString &parentLayerName) |
| static void | setLayerProxy(RLayerProxy *p) |
Static Public Attributes
Section titled “Static Public Attributes”| static RPropertyTypeId | PropertyCollapsed |
| static RPropertyTypeId | PropertyColor |
| static RPropertyTypeId | PropertyCustom |
| static RPropertyTypeId | PropertyFrozen |
| static RPropertyTypeId | PropertyHandle |
| static RPropertyTypeId | PropertyLinetype |
| static RPropertyTypeId | PropertyLineweight |
| static RPropertyTypeId | PropertyLocked |
| static RPropertyTypeId | PropertyName |
| static RPropertyTypeId | PropertyOff |
| static RPropertyTypeId | PropertyOffIsFreeze |
| static RPropertyTypeId | PropertyPlottable |
| static RPropertyTypeId | PropertyProtected |
| static RPropertyTypeId | PropertySelected |
| static RPropertyTypeId | PropertySnappable |
| static RPropertyTypeId | PropertyType |
Private Attributes
Section titled “Private Attributes”| RColor | color |
| LayerFlags | flags |
| RObject::Id | linetypeId |
| RLineweight::Lineweight | lineweight |
| QString | name |
Static Private Attributes
Section titled “Static Private Attributes”| static RLayerProxy * | layerProxy |
Member Documentation
Section titled “Member Documentation”LayerFlag
Section titled “LayerFlag”enum LayerFlagRLayer
Section titled “RLayer”RLayer::RLayer()RLayer
Section titled “RLayer”RLayer::RLayer(const RLayer &other)RLayer
Section titled “RLayer”RLayer::RLayer(RDocument *document, const QString &name, bool frozen=false, bool locked=false, const RColor &color=Qt::black, RObject::Id linetypeId=RObject::INVALID_ID, RLineweight::Lineweight lineweight=RLineweight::Weight000, bool off=false)~RLayer
Section titled “~RLayer”virtual RLayer::~RLayer()virtual
virtual QSharedPointer< RObject > RLayer::clone() constvirtual inline const
Reimplemented from clone.
cloneToLayer
Section titled “cloneToLayer”QSharedPointer< RLayer > RLayer::cloneToLayer() constinline const
getChildLayerNames
Section titled “getChildLayerNames”QList< QString > RLayer::getChildLayerNames(bool recursive=true) constinline const
getColor
Section titled “getColor”RColor RLayer::getColor() constinline const
getLayerNameHierarchy
Section titled “getLayerNameHierarchy”QList< QString > RLayer::getLayerNameHierarchy() constinline const
getLinetypeId
Section titled “getLinetypeId”RObject::Id RLayer::getLinetypeId() constinline const
getLineweight
Section titled “getLineweight”RLineweight::Lineweight RLayer::getLineweight() constinline const
getName
Section titled “getName”QString RLayer::getName() constinline const
getParentLayerId
Section titled “getParentLayerId”RLayer::Id RLayer::getParentLayerId() constconst
getParentLayerName
Section titled “getParentLayerName”QString RLayer::getParentLayerName() constinline const
getProperty
Section titled “getProperty”virtual QPair< QVariant, RPropertyAttributes > RLayer::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.
getShortLayerName
Section titled “getShortLayerName”QString RLayer::getShortLayerName() constinline const
getType
Section titled “getType”virtual RS::EntityType RLayer::getType() constvirtual inline const
Returns: The unique entity type, usually the same as RTTI, different for custom entities.
Reimplemented from getType.
hasChildLayers
Section titled “hasChildLayers”bool RLayer::hasChildLayers() constinline const
isChildLayerOf
Section titled “isChildLayerOf”bool RLayer::isChildLayerOf(const QString &layerName) constinline const
isCollapsed
Section titled “isCollapsed”bool RLayer::isCollapsed() constinline const
isFrozen
Section titled “isFrozen”bool RLayer::isFrozen() constinline const
isLocked
Section titled “isLocked”bool RLayer::isLocked() constinline const
bool RLayer::isOff() constinline const
isOffIsFreeze
Section titled “isOffIsFreeze”bool RLayer::isOffIsFreeze() constinline const
isOffOrFrozen
Section titled “isOffOrFrozen”bool RLayer::isOffOrFrozen() constinline const
isPlottable
Section titled “isPlottable”bool RLayer::isPlottable() constinline const
isSnappable
Section titled “isSnappable”bool RLayer::isSnappable() constinline const
virtual void RLayer::print(QDebug dbg) constvirtual const
Stream operator for QDebug.
Reimplemented from print.
setCollapsed
Section titled “setCollapsed”void RLayer::setCollapsed(bool on)inline
setColor
Section titled “setColor”void RLayer::setColor(const RColor &c)inline
setFrozen
Section titled “setFrozen”void RLayer::setFrozen(bool on)inline
setLinetypeId
Section titled “setLinetypeId”void RLayer::setLinetypeId(RObject::Id lt)inline
setLineweight
Section titled “setLineweight”void RLayer::setLineweight(RLineweight::Lineweight lw)inline
setLocked
Section titled “setLocked”void RLayer::setLocked(bool on)inline
setName
Section titled “setName”void RLayer::setName(const QString &n)setOff
Section titled “setOff”void RLayer::setOff(bool on)inline
setOffIsFreeze
Section titled “setOffIsFreeze”void RLayer::setOffIsFreeze(bool on)inline
setPlottable
Section titled “setPlottable”void RLayer::setPlottable(bool on)inline
setProperty
Section titled “setProperty”virtual bool RLayer::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.
setSnappable
Section titled “setSnappable”void RLayer::setSnappable(bool on)inline
getChildLayerNamesStatic
Section titled “getChildLayerNamesStatic”static QList< QString > RLayer::getChildLayerNamesStatic(const RDocument *doc, const QString &layerName, bool recursive=true)static inline
getHierarchySeparator
Section titled “getHierarchySeparator”static QString RLayer::getHierarchySeparator()static inline
getLayerNameHierarchyStatic
Section titled “getLayerNameHierarchyStatic”static QList< QString > RLayer::getLayerNameHierarchyStatic(const QString &layerName)static inline
getLayerProxy
Section titled “getLayerProxy”static RLayerProxy * RLayer::getLayerProxy()static inline
Non-Scriptable: This function is not available in script environments.
getParentLayerNameStatic
Section titled “getParentLayerNameStatic”static QString RLayer::getParentLayerNameStatic(const QString &layerName)static inline
getRtti
Section titled “getRtti”static RS::EntityType RLayer::getRtti()static inline
getShortLayerNameStatic
Section titled “getShortLayerNameStatic”static QString RLayer::getShortLayerNameStatic(const QString &layerName)static inline
hasChildLayersStatic
Section titled “hasChildLayersStatic”static bool RLayer::hasChildLayersStatic(const RDocument *doc, const QString &layerName)static inline
hasProxy
Section titled “hasProxy”static bool RLayer::hasProxy()static inline
static void RLayer::init()static
isChildLayerOfStatic
Section titled “isChildLayerOfStatic”static bool RLayer::isChildLayerOfStatic(const QString &layerName, const QString &parentLayerName)static inline
setLayerProxy
Section titled “setLayerProxy”static void RLayer::setLayerProxy(RLayerProxy *p)static inline
Non-Scriptable: This function is not available in script environments.
PropertyCollapsed
Section titled “PropertyCollapsed”static RPropertyTypeId RLayer::PropertyCollapsedstatic
PropertyColor
Section titled “PropertyColor”static RPropertyTypeId RLayer::PropertyColorstatic
PropertyCustom
Section titled “PropertyCustom”static RPropertyTypeId RLayer::PropertyCustomstatic
PropertyFrozen
Section titled “PropertyFrozen”static RPropertyTypeId RLayer::PropertyFrozenstatic
PropertyHandle
Section titled “PropertyHandle”static RPropertyTypeId RLayer::PropertyHandlestatic
PropertyLinetype
Section titled “PropertyLinetype”static RPropertyTypeId RLayer::PropertyLinetypestatic
PropertyLineweight
Section titled “PropertyLineweight”static RPropertyTypeId RLayer::PropertyLineweightstatic
PropertyLocked
Section titled “PropertyLocked”static RPropertyTypeId RLayer::PropertyLockedstatic
PropertyName
Section titled “PropertyName”static RPropertyTypeId RLayer::PropertyNamestatic
PropertyOff
Section titled “PropertyOff”static RPropertyTypeId RLayer::PropertyOffstatic
PropertyOffIsFreeze
Section titled “PropertyOffIsFreeze”static RPropertyTypeId RLayer::PropertyOffIsFreezestatic
PropertyPlottable
Section titled “PropertyPlottable”static RPropertyTypeId RLayer::PropertyPlottablestatic
PropertyProtected
Section titled “PropertyProtected”static RPropertyTypeId RLayer::PropertyProtectedstatic
PropertySelected
Section titled “PropertySelected”static RPropertyTypeId RLayer::PropertySelectedstatic
PropertySnappable
Section titled “PropertySnappable”static RPropertyTypeId RLayer::PropertySnappablestatic
PropertyType
Section titled “PropertyType”static RPropertyTypeId RLayer::PropertyTypestatic
RColor RLayer::colorprivate
LayerFlags RLayer::flagsprivate
linetypeId
Section titled “linetypeId”RObject::Id RLayer::linetypeIdprivate
lineweight
Section titled “lineweight”RLineweight::Lineweight RLayer::lineweightprivate
QString RLayer::nameprivate
layerProxy
Section titled “layerProxy”static RLayerProxy * RLayer::layerProxy = NULLstatic private
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.