RBlock
Class in Core Module
Header: #include <src/core/RBlock.h>
Inherits: RObject
Description
Section titled “Description”Represents a block definition 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”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() constBlock was imported as part of an XRef. |
| bool | isFrozen() const |
| bool | isModelSpace() const |
| bool | isOwnedByReference() const |
| bool | isPixelUnit() const |
| bool | isXRef() constBlock 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 Public Functions
Section titled “Static Public Functions”| static RBlockProxy * | getBlockProxy() |
| static RS::EntityType | getRtti() |
| static bool | hasProxy() |
| static void | init() |
| static void | setBlockProxy(RBlockProxy *p) |
Static Public Attributes
Section titled “Static Public Attributes”| 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 |
Protected Functions
Section titled “Protected Functions”| virtual void | print(QDebug dbg) const |
Private Attributes
Section titled “Private Attributes”| bool | anonymous |
| bool | frozen |
| RObject::Id | layoutId |
| QString | name |
| RVector | origin |
| bool | ownedByReference |
| bool | pixelUnit |
| QString | xRefFileName |
| bool | xRefLoaded |
Static Private Attributes
Section titled “Static Private Attributes”| static RBlockProxy * | blockProxy |
Member Documentation
Section titled “Member Documentation”RBlock
Section titled “RBlock”RBlock::RBlock()RBlock
Section titled “RBlock”RBlock::RBlock(RDocument *document, const QString &name, const RVector &origin)~RBlock
Section titled “~RBlock”virtual RBlock::~RBlock()virtual
bindXRef
Section titled “bindXRef”void RBlock::bindXRef(bool useTransaction=true)virtual QSharedPointer< RObject > RBlock::clone() constvirtual inline const
Reimplemented from clone.
cloneToBlock
Section titled “cloneToBlock”QSharedPointer< RBlock > RBlock::cloneToBlock() constinline const
getFullXRefFilePath
Section titled “getFullXRefFilePath”QString RBlock::getFullXRefFilePath() constinline const
getLayoutId
Section titled “getLayoutId”RObject::Id RBlock::getLayoutId() constinline const
getLayoutName
Section titled “getLayoutName”QString RBlock::getLayoutName() constconst
getName
Section titled “getName”QString RBlock::getName() constinline const
getOrigin
Section titled “getOrigin”RVector RBlock::getOrigin() constinline const
getProperty
Section titled “getProperty”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.
getType
Section titled “getType”virtual RS::EntityType RBlock::getType() constvirtual inline const
Returns: The unique entity type, usually the same as RTTI, different for custom entities.
Reimplemented from getType.
getXRefBlockNames
Section titled “getXRefBlockNames”QSet< QString > RBlock::getXRefBlockNames() constconst
Returns: List of block names that depend on this XRef block.
getXRefFileName
Section titled “getXRefFileName”QString RBlock::getXRefFileName() constinline const
getXRefLayerNames
Section titled “getXRefLayerNames”QSet< QString > RBlock::getXRefLayerNames() constconst
Returns: List of layer names that depend on this XRef block.
hasLayout
Section titled “hasLayout”bool RBlock::hasLayout() constinline const
isAnonymous
Section titled “isAnonymous”bool RBlock::isAnonymous() constinline const
isFromXRef
Section titled “isFromXRef”bool RBlock::isFromXRef() constinline const
Block was imported as part of an XRef.
isFrozen
Section titled “isFrozen”bool RBlock::isFrozen() constinline const
isModelSpace
Section titled “isModelSpace”bool RBlock::isModelSpace() constinline const
isOwnedByReference
Section titled “isOwnedByReference”bool RBlock::isOwnedByReference() constinline const
isPixelUnit
Section titled “isPixelUnit”bool RBlock::isPixelUnit() constinline const
isXRef
Section titled “isXRef”bool RBlock::isXRef() constinline const
Block is an XRef.
isXRefLoaded
Section titled “isXRefLoaded”bool RBlock::isXRefLoaded() constinline const
loadXRef
Section titled “loadXRef”bool RBlock::loadXRef()inline
setAnonymous
Section titled “setAnonymous”void RBlock::setAnonymous(bool on)inline
setCustomProperty
Section titled “setCustomProperty”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.
setFrozen
Section titled “setFrozen”void RBlock::setFrozen(bool on)inline
setLayoutId
Section titled “setLayoutId”void RBlock::setLayoutId(RObject::Id layoutId)inline
setName
Section titled “setName”void RBlock::setName(const QString &n)setOrigin
Section titled “setOrigin”void RBlock::setOrigin(const RVector &origin)inline
setOwnedByReference
Section titled “setOwnedByReference”void RBlock::setOwnedByReference(bool on)inline
setPixelUnit
Section titled “setPixelUnit”void RBlock::setPixelUnit(bool on)inline
setProperty
Section titled “setProperty”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.
setXRefFileName
Section titled “setXRefFileName”void RBlock::setXRefFileName(const QString &f)inline
setXRefLoaded
Section titled “setXRefLoaded”void RBlock::setXRefLoaded(bool on)inline
unloadXRef
Section titled “unloadXRef”void RBlock::unloadXRef()inline
getBlockProxy
Section titled “getBlockProxy”static RBlockProxy * RBlock::getBlockProxy()static inline
Non-Scriptable: This function is not available in script environments.
getRtti
Section titled “getRtti”static RS::EntityType RBlock::getRtti()static inline
hasProxy
Section titled “hasProxy”static bool RBlock::hasProxy()static inline
static void RBlock::init()static
setBlockProxy
Section titled “setBlockProxy”static void RBlock::setBlockProxy(RBlockProxy *p)static inline
Non-Scriptable: This function is not available in script environments.
modelSpaceName
Section titled “modelSpaceName”static const QString RBlock::modelSpaceName = "*Model_Space"static
paperSpaceName
Section titled “paperSpaceName”static const QString RBlock::paperSpaceName = "*Paper_Space"static
PropertyCustom
Section titled “PropertyCustom”static RPropertyTypeId RBlock::PropertyCustomstatic
PropertyFrozen
Section titled “PropertyFrozen”static RPropertyTypeId RBlock::PropertyFrozenstatic
PropertyHandle
Section titled “PropertyHandle”static RPropertyTypeId RBlock::PropertyHandlestatic
PropertyLayout
Section titled “PropertyLayout”static RPropertyTypeId RBlock::PropertyLayoutstatic
PropertyName
Section titled “PropertyName”static RPropertyTypeId RBlock::PropertyNamestatic
PropertyOriginX
Section titled “PropertyOriginX”static RPropertyTypeId RBlock::PropertyOriginXstatic
PropertyOriginY
Section titled “PropertyOriginY”static RPropertyTypeId RBlock::PropertyOriginYstatic
PropertyOriginZ
Section titled “PropertyOriginZ”static RPropertyTypeId RBlock::PropertyOriginZstatic
PropertyOwnedByReference
Section titled “PropertyOwnedByReference”static RPropertyTypeId RBlock::PropertyOwnedByReferencestatic
PropertyPixelUnit
Section titled “PropertyPixelUnit”static RPropertyTypeId RBlock::PropertyPixelUnitstatic
PropertyType
Section titled “PropertyType”static RPropertyTypeId RBlock::PropertyTypestatic
PropertyXRefFileName
Section titled “PropertyXRefFileName”static RPropertyTypeId RBlock::PropertyXRefFileNamestatic
virtual void RBlock::print(QDebug dbg) constvirtual const protected
Non-Scriptable: This function is not available in script environments.
Reimplemented from print.
anonymous
Section titled “anonymous”bool RBlock::anonymousprivate
frozen
Section titled “frozen”bool RBlock::frozenprivate
layoutId
Section titled “layoutId”RObject::Id RBlock::layoutIdprivate
QString RBlock::nameprivate
origin
Section titled “origin”RVector RBlock::originprivate
ownedByReference
Section titled “ownedByReference”bool RBlock::ownedByReferenceprivate
pixelUnit
Section titled “pixelUnit”bool RBlock::pixelUnitprivate
xRefFileName
Section titled “xRefFileName”QString RBlock::xRefFileNameprivate
xRefLoaded
Section titled “xRefLoaded”bool RBlock::xRefLoadedprivate
blockProxy
Section titled “blockProxy”static RBlockProxy * RBlock::blockProxy = 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.