Skip to content

RLayerState

Class in Core Module
Header: #include <src/core/RLayerState.h>
Inherits: RObject

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.

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 RS::EntityType getRtti()
static void init()
static RPropertyTypeId PropertyCustom
static RPropertyTypeId PropertyHandle
static RPropertyTypeId PropertyName
static RPropertyTypeId PropertyProtected
static RPropertyTypeId PropertyType
QString currentLayer
QString description
QList< QSharedPointer< RLayer > > layers
QString name

RLayerState::RLayerState()

RLayerState::RLayerState(RDocument *document, const QString &name)

virtual RLayerState::~RLayerState()

virtual

void RLayerState::addLayer(QSharedPointer< RLayer > layer)

virtual QSharedPointer< RObject > RLayerState::clone() const

virtual inline const

Reimplemented from clone.

QSharedPointer< RLayerState > RLayerState::cloneToLayerState() const

inline const

QString RLayerState::getCurrentLayerName() const

inline const

QString RLayerState::getDescription() const

inline const

QSharedPointer< RLayer > RLayerState::getLayer(const QString &layerName) const

const

QStringList RLayerState::getLayerNames() const

const

QList< QSharedPointer< RLayer > > RLayerState::getLayers() const

const

QString RLayerState::getName() const

inline const

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.

virtual RS::EntityType RLayerState::getType() const

virtual inline const

Returns: The unique entity type, usually the same as RTTI, different for custom entities.

Reimplemented from getType.

virtual bool RLayerState::mustAlwaysClone() const

virtual 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.

void RLayerState::setCurrentLayerName(const QString &l)

inline

void RLayerState::setDescription(const QString &d)

inline

void RLayerState::setName(const QString &n)

inline

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.

static RS::EntityType RLayerState::getRtti()

static inline

static void RLayerState::init()

static

static RPropertyTypeId RLayerState::PropertyCustom

static

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.

static RPropertyTypeId RLayerState::PropertyHandle

static

static RPropertyTypeId RLayerState::PropertyName

static

static RPropertyTypeId RLayerState::PropertyProtected

static

static RPropertyTypeId RLayerState::PropertyType

static

QString RLayerState::currentLayer

private

QString RLayerState::description

private

QList<QSharedPointer<RLayer> > RLayerState::layers

private

QString RLayerState::name

private