Skip to content

RBlock

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

Represents a block definition in a drawing.

Scriptable: This class is available in script environments.

Shared Pointer Support: Objects can be used in QSharedPointer.

RBlock()
RBlock(RDocument *document, const QString &name, const RVector &origin)
virtual ~RBlock()
void bindXRef(bool useTransaction=true)
virtual QSharedPointer< RObject > clone() const
QSharedPointer< RBlock > cloneToBlock() const
QString getFullXRefFilePath() const
RObject::Id getLayoutId() const
QString getLayoutName() const
QString getName() const
RVector getOrigin() const
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
virtual RS::EntityType getType() const
QSet< QString > getXRefBlockNames() const
QString getXRefFileName() const
QSet< QString > getXRefLayerNames() const
bool hasLayout() const
bool isAnonymous() const
bool isFromXRef() const
Block was imported as part of an XRef.
bool isFrozen() const
bool isModelSpace() const
bool isOwnedByReference() const
bool isPixelUnit() const
bool isXRef() const
Block is an XRef.
bool isXRefLoaded() const
bool loadXRef()
void setAnonymous(bool on)
virtual void setCustomProperty(const QString &title, const QString &key, const QVariant &value)
Sets a custom property with the given name.
void setFrozen(bool on)
void setLayoutId(RObject::Id layoutId)
void setName(const QString &n)
void setOrigin(const RVector &origin)
void setOwnedByReference(bool on)
void setPixelUnit(bool on)
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
void setXRefFileName(const QString &f)
void setXRefLoaded(bool on)
void unloadXRef()
static RBlockProxy * getBlockProxy()
static RS::EntityType getRtti()
static bool hasProxy()
static void init()
static void setBlockProxy(RBlockProxy *p)
static const QString modelSpaceName
static const QString paperSpaceName
static RPropertyTypeId PropertyCustom
static RPropertyTypeId PropertyFrozen
static RPropertyTypeId PropertyHandle
static RPropertyTypeId PropertyLayout
static RPropertyTypeId PropertyName
static RPropertyTypeId PropertyOriginX
static RPropertyTypeId PropertyOriginY
static RPropertyTypeId PropertyOriginZ
static RPropertyTypeId PropertyOwnedByReference
static RPropertyTypeId PropertyPixelUnit
static RPropertyTypeId PropertyType
static RPropertyTypeId PropertyXRefFileName
virtual void print(QDebug dbg) const
bool anonymous
bool frozen
RObject::Id layoutId
QString name
RVector origin
bool ownedByReference
bool pixelUnit
QString xRefFileName
bool xRefLoaded
static RBlockProxy * blockProxy

RBlock::RBlock()

RBlock::RBlock(RDocument *document, const QString &name, const RVector &origin)

virtual RBlock::~RBlock()

virtual

void RBlock::bindXRef(bool useTransaction=true)

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

virtual inline const

Reimplemented from clone.

QSharedPointer< RBlock > RBlock::cloneToBlock() const

inline const

QString RBlock::getFullXRefFilePath() const

inline const

RObject::Id RBlock::getLayoutId() const

inline const

QString RBlock::getLayoutName() const

const

QString RBlock::getName() const

inline const

RVector RBlock::getOrigin() const

inline const

virtual QPair< QVariant, RPropertyAttributes > RBlock::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 RBlock::getType() const

virtual inline const

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

Reimplemented from getType.

QSet< QString > RBlock::getXRefBlockNames() const

const

Returns: List of block names that depend on this XRef block.

QString RBlock::getXRefFileName() const

inline const

QSet< QString > RBlock::getXRefLayerNames() const

const

Returns: List of layer names that depend on this XRef block.

bool RBlock::hasLayout() const

inline const

bool RBlock::isAnonymous() const

inline const

bool RBlock::isFromXRef() const

inline const

Block was imported as part of an XRef.

bool RBlock::isFrozen() const

inline const

bool RBlock::isModelSpace() const

inline const

bool RBlock::isOwnedByReference() const

inline const

bool RBlock::isPixelUnit() const

inline const

bool RBlock::isXRef() const

inline const

Block is an XRef.

bool RBlock::isXRefLoaded() const

inline const

bool RBlock::loadXRef()

inline

void RBlock::setAnonymous(bool on)

inline

virtual void RBlock::setCustomProperty(const QString &title, const QString &key, const QVariant &value)

virtual

Sets a custom property with the given name.

Reimplemented from setCustomProperty.

void RBlock::setFrozen(bool on)

inline

void RBlock::setLayoutId(RObject::Id layoutId)

inline

void RBlock::setName(const QString &n)

void RBlock::setOrigin(const RVector &origin)

inline

void RBlock::setOwnedByReference(bool on)

inline

void RBlock::setPixelUnit(bool on)

inline

virtual bool RBlock::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.

void RBlock::setXRefFileName(const QString &f)

inline

void RBlock::setXRefLoaded(bool on)

inline

void RBlock::unloadXRef()

inline

static RBlockProxy * RBlock::getBlockProxy()

static inline

Non-Scriptable: This function is not available in script environments.

static RS::EntityType RBlock::getRtti()

static inline

static bool RBlock::hasProxy()

static inline

static void RBlock::init()

static

static void RBlock::setBlockProxy(RBlockProxy *p)

static inline

Non-Scriptable: This function is not available in script environments.

static const QString RBlock::modelSpaceName = "*Model_Space"

static

static const QString RBlock::paperSpaceName = "*Paper_Space"

static

static RPropertyTypeId RBlock::PropertyCustom

static

static RPropertyTypeId RBlock::PropertyFrozen

static

static RPropertyTypeId RBlock::PropertyHandle

static

static RPropertyTypeId RBlock::PropertyLayout

static

static RPropertyTypeId RBlock::PropertyName

static

static RPropertyTypeId RBlock::PropertyOriginX

static

static RPropertyTypeId RBlock::PropertyOriginY

static

static RPropertyTypeId RBlock::PropertyOriginZ

static

static RPropertyTypeId RBlock::PropertyOwnedByReference

static

static RPropertyTypeId RBlock::PropertyPixelUnit

static

static RPropertyTypeId RBlock::PropertyType

static

static RPropertyTypeId RBlock::PropertyXRefFileName

static

virtual void RBlock::print(QDebug dbg) const

virtual const protected

Non-Scriptable: This function is not available in script environments.

Reimplemented from print.

bool RBlock::anonymous

private

bool RBlock::frozen

private

RObject::Id RBlock::layoutId

private

QString RBlock::name

private

RVector RBlock::origin

private

bool RBlock::ownedByReference

private

bool RBlock::pixelUnit

private

QString RBlock::xRefFileName

private

bool RBlock::xRefLoaded

private

static RBlockProxy * RBlock::blockProxy = NULL

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