RLayerState
Class in Core Module
Header: #include <src/core/RLayerState.h>
Inherits: RObject
Description
Section titled “Description”Represents a layer state (state of list of layers) in a drawing.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Public Functions
Section titled “Public Functions”RLayerState() |
|
RLayerState(RDocument *document, const QString &name) |
|
| virtual | ~RLayerState() |
| void | addLayer(QSharedPointer< RLayer > layer) |
| virtual QSharedPointer< RObject > | clone() const |
| QSharedPointer< RLayerState > | cloneToLayerState() const |
| QString | getCurrentLayerName() const |
| QString | getDescription() const |
| QSharedPointer< RLayer > | getLayer(const QString &layerName) const |
| QStringList | getLayerNames() const |
| QList< QSharedPointer< RLayer > > | getLayers() const |
| QString | getName() const |
| virtual QPair< QVariant, RPropertyAttributes > | getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false) |
| virtual RS::EntityType | getType() const |
| virtual bool | mustAlwaysClone() const |
| void | setCurrentLayerName(const QString &l) |
| void | setDescription(const QString &d) |
| void | setName(const QString &n) |
| virtual bool | setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)Sets the given property to the given value. |
Static Public Functions
Section titled “Static Public Functions”| static RS::EntityType | getRtti() |
| static void | init() |
Static Public Attributes
Section titled “Static Public Attributes”| static RPropertyTypeId | PropertyCustom |
| static RPropertyTypeId | PropertyHandle |
| static RPropertyTypeId | PropertyName |
| static RPropertyTypeId | PropertyProtected |
| static RPropertyTypeId | PropertyType |
Private Attributes
Section titled “Private Attributes”| QString | currentLayer |
| QString | description |
| QList< QSharedPointer< RLayer > > | layers |
| QString | name |
Member Documentation
Section titled “Member Documentation”RLayerState
Section titled “RLayerState”RLayerState::RLayerState()RLayerState
Section titled “RLayerState”RLayerState::RLayerState(RDocument *document, const QString &name)~RLayerState
Section titled “~RLayerState”virtual RLayerState::~RLayerState()virtual
addLayer
Section titled “addLayer”void RLayerState::addLayer(QSharedPointer< RLayer > layer)virtual QSharedPointer< RObject > RLayerState::clone() constvirtual inline const
Reimplemented from clone.
cloneToLayerState
Section titled “cloneToLayerState”QSharedPointer< RLayerState > RLayerState::cloneToLayerState() constinline const
getCurrentLayerName
Section titled “getCurrentLayerName”QString RLayerState::getCurrentLayerName() constinline const
getDescription
Section titled “getDescription”QString RLayerState::getDescription() constinline const
getLayer
Section titled “getLayer”QSharedPointer< RLayer > RLayerState::getLayer(const QString &layerName) constconst
getLayerNames
Section titled “getLayerNames”QStringList RLayerState::getLayerNames() constconst
getLayers
Section titled “getLayers”QList< QSharedPointer< RLayer > > RLayerState::getLayers() constconst
getName
Section titled “getName”QString RLayerState::getName() constinline const
getProperty
Section titled “getProperty”virtual QPair< QVariant, RPropertyAttributes > RLayerState::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.
getType
Section titled “getType”virtual RS::EntityType RLayerState::getType() constvirtual inline const
Returns: The unique entity type, usually the same as RTTI, different for custom entities.
Reimplemented from getType.
mustAlwaysClone
Section titled “mustAlwaysClone”virtual bool RLayerState::mustAlwaysClone() constvirtual inline const
Returns: True to always clone object instead of saving diff when object changes. This can be used for complex object types which cannot be modified using properties.
Reimplemented from mustAlwaysClone.
setCurrentLayerName
Section titled “setCurrentLayerName”void RLayerState::setCurrentLayerName(const QString &l)inline
setDescription
Section titled “setDescription”void RLayerState::setDescription(const QString &d)inline
setName
Section titled “setName”void RLayerState::setName(const QString &n)inline
setProperty
Section titled “setProperty”virtual bool RLayerState::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.
getRtti
Section titled “getRtti”static RS::EntityType RLayerState::getRtti()static inline
static void RLayerState::init()static
PropertyCustom
Section titled “PropertyCustom”static RPropertyTypeId RLayerState::PropertyCustomstatic
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.
PropertyHandle
Section titled “PropertyHandle”static RPropertyTypeId RLayerState::PropertyHandlestatic
PropertyName
Section titled “PropertyName”static RPropertyTypeId RLayerState::PropertyNamestatic
PropertyProtected
Section titled “PropertyProtected”static RPropertyTypeId RLayerState::PropertyProtectedstatic
PropertyType
Section titled “PropertyType”static RPropertyTypeId RLayerState::PropertyTypestatic
currentLayer
Section titled “currentLayer”QString RLayerState::currentLayerprivate
description
Section titled “description”QString RLayerState::descriptionprivate
layers
Section titled “layers”QList<QSharedPointer<RLayer> > RLayerState::layersprivate
QString RLayerState::nameprivate