RClipboardOperation
Class in Operations Module
Header: #include <src/operations/RClipboardOperation.h>
Inherits: ROperation
Inherited by: RCopyOperation, RDeleteSelectionOperation, RPasteOperation
Description
Section titled “Description”Base class for clipboard related operations (copy, cut, paste).
Scriptable: This class is available in script environments.
Public Functions
Section titled “Public Functions”RClipboardOperation() |
|
| virtual | ~RClipboardOperation() |
| virtual RTransaction | apply(RDocument &document, bool preview=false)Applies this operation to selection in the given document. |
| void | copy(RDocument &src, RDocument &dest, const RVector &offset, double scale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool selectionOnly, bool clear, bool toModelSpaceBlock, bool preview) |
| void | copy(RDocument &src, RDocument &dest, const RVector &offset, double scale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool selectionOnly, bool clear, bool toModelSpaceBlock, bool preview, const RQMapQStringQString &attributes, const RQMapQStringQString &properties, const RQMapQStringQString &blockProperties) |
| QSharedPointer< RBlock > | copyBlock(RObject::Id blockId, RDocument &src, RDocument &dest, bool overwriteBlocks, bool toCurrentBlock, const QString &blockName, RTransaction &transaction) |
| void | copyEntity(REntity &entity, RDocument &src, RDocument &dest, const RVector &offset, double scale, double unitScale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool toModelSpaceBlock) |
| void | copyEntity(REntity &entity, RDocument &src, RDocument &dest, const RVector &offset, double scale, double unitScale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool toModelSpaceBlock, const RQMapQStringQString &attributes)Adds the given entity (and its layer(s) and block reference(s)) to the given document. |
| QSharedPointer< RBlock > | copyEntityBlock(REntity &entity, RDocument &src, RDocument &dest, bool overwriteBlocks, bool toCurrentBlock, const QString &blockName, RTransaction &transaction) |
| QSharedPointer< RLayer > | copyEntityLayer(REntity &entity, RDocument &src, RDocument &dest, bool overwriteLayers, RTransaction &transaction) |
| QSharedPointer< RLinetype > | copyEntityLinetype(REntity &entity, RDocument &src, RDocument &dest, bool overwriteLinetypes, RTransaction &transaction) |
| QSharedPointer< RLayer > | copyLayer(RObject::Id layerId, RDocument &src, RDocument &dest, bool overwriteLayers, RTransaction &transaction) |
| QSharedPointer< RLinetype > | copyLinetype(RObject::Id linetypeId, RDocument &src, RDocument &dest, bool overwriteLinetypes, RTransaction &transaction) |
| virtual RBlockReferenceEntity * | createBlockReferenceEntity(RDocument &doc, RS::EntityType customEntityType, const RBlockReferenceData &data) |
| void | setBlockNamePrefix(const QString &p) |
| void | setBlockOwnership(bool on) |
| void | setCopyAllLayers(bool on) |
| void | setCopyEmptyBlocks(bool on) |
| void | setCreateBlockReference(bool on) |
| void | setCustomEntityType(RS::EntityType t) |
| void | setKeepSelection(bool on) |
| void | setLayerNamePrefix(const QString &p) |
| void | setUseExistingBlock(bool on) |
Private Attributes
Section titled “Private Attributes”| QString | blockNamePrefix |
| bool | blockOwnership |
| QSet< RObject::Id > | copiedBlockContents |
| QMap< QString, QSharedPointer< RBlock > > | copiedBlocks |
| QMap< QString, QSharedPointer< RLayer > > | copiedLayers |
| QMap< QString, QSharedPointer< RLinetype > > | copiedLinetypes |
| bool | copyAllLayers |
| bool | copyEmptyBlocks |
| bool | createBlockReference |
| RS::EntityType | customEntityType |
| bool | keepSelection |
| QString | layerNamePrefix |
| bool | useExistingBlock |
Member Documentation
Section titled “Member Documentation”RClipboardOperation
Section titled “RClipboardOperation”RClipboardOperation::RClipboardOperation()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.
~RClipboardOperation
Section titled “~RClipboardOperation”virtual RClipboardOperation::~RClipboardOperation()virtual inline
virtual RTransaction RClipboardOperation::apply(RDocument &document, bool preview=false)virtual inline
Applies this operation to selection in the given document.
This is used for both previews and the actual apply. In case of a preview, the given document is a temporary document with a storage that is linked to the real document for realistic condiditions for the preview.
Reimplemented from apply.
Reimplemented in apply, apply, apply.
void RClipboardOperation::copy(RDocument &src, RDocument &dest, const RVector &offset, double scale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool selectionOnly, bool clear, bool toModelSpaceBlock, bool preview)inline
void RClipboardOperation::copy(RDocument &src, RDocument &dest, const RVector &offset, double scale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool selectionOnly, bool clear, bool toModelSpaceBlock, bool preview, const RQMapQStringQString &attributes, const RQMapQStringQString &properties, const RQMapQStringQString &blockProperties)Non-Scriptable: This function is not available in script environments.
copyBlock
Section titled “copyBlock”QSharedPointer< RBlock > RClipboardOperation::copyBlock(RObject::Id blockId, RDocument &src, RDocument &dest, bool overwriteBlocks, bool toCurrentBlock, const QString &blockName, RTransaction &transaction)copyEntity
Section titled “copyEntity”void RClipboardOperation::copyEntity(REntity &entity, RDocument &src, RDocument &dest, const RVector &offset, double scale, double unitScale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool toModelSpaceBlock)inline
copyEntity
Section titled “copyEntity”void RClipboardOperation::copyEntity(REntity &entity, RDocument &src, RDocument &dest, const RVector &offset, double scale, double unitScale, double rotation, const RVector ¢er, bool flipHorizontal, bool flipVertical, bool toCurrentLayer, bool toCurrentBlock, bool overwriteLayers, bool overwriteBlocks, const QString &blockName, const QString &layerName, RTransaction &transaction, bool toModelSpaceBlock, const RQMapQStringQString &attributes)Adds the given entity (and its layer(s) and block reference(s)) to the given document.
Non-Scriptable: This function is not available in script environments.
Parameters:
blockName: Name of an existing block in dest
copyEntityBlock
Section titled “copyEntityBlock”QSharedPointer< RBlock > RClipboardOperation::copyEntityBlock(REntity &entity, RDocument &src, RDocument &dest, bool overwriteBlocks, bool toCurrentBlock, const QString &blockName, RTransaction &transaction)copyEntityLayer
Section titled “copyEntityLayer”QSharedPointer< RLayer > RClipboardOperation::copyEntityLayer(REntity &entity, RDocument &src, RDocument &dest, bool overwriteLayers, RTransaction &transaction)copyEntityLinetype
Section titled “copyEntityLinetype”QSharedPointer< RLinetype > RClipboardOperation::copyEntityLinetype(REntity &entity, RDocument &src, RDocument &dest, bool overwriteLinetypes, RTransaction &transaction)copyLayer
Section titled “copyLayer”QSharedPointer< RLayer > RClipboardOperation::copyLayer(RObject::Id layerId, RDocument &src, RDocument &dest, bool overwriteLayers, RTransaction &transaction)copyLinetype
Section titled “copyLinetype”QSharedPointer< RLinetype > RClipboardOperation::copyLinetype(RObject::Id linetypeId, RDocument &src, RDocument &dest, bool overwriteLinetypes, RTransaction &transaction)createBlockReferenceEntity
Section titled “createBlockReferenceEntity”virtual RBlockReferenceEntity * RClipboardOperation::createBlockReferenceEntity(RDocument &doc, RS::EntityType customEntityType, const RBlockReferenceData &data)virtual
setBlockNamePrefix
Section titled “setBlockNamePrefix”void RClipboardOperation::setBlockNamePrefix(const QString &p)inline
setBlockOwnership
Section titled “setBlockOwnership”void RClipboardOperation::setBlockOwnership(bool on)inline
setCopyAllLayers
Section titled “setCopyAllLayers”void RClipboardOperation::setCopyAllLayers(bool on)inline
setCopyEmptyBlocks
Section titled “setCopyEmptyBlocks”void RClipboardOperation::setCopyEmptyBlocks(bool on)inline
setCreateBlockReference
Section titled “setCreateBlockReference”void RClipboardOperation::setCreateBlockReference(bool on)inline
setCustomEntityType
Section titled “setCustomEntityType”void RClipboardOperation::setCustomEntityType(RS::EntityType t)inline
setKeepSelection
Section titled “setKeepSelection”void RClipboardOperation::setKeepSelection(bool on)inline
setLayerNamePrefix
Section titled “setLayerNamePrefix”void RClipboardOperation::setLayerNamePrefix(const QString &p)inline
setUseExistingBlock
Section titled “setUseExistingBlock”void RClipboardOperation::setUseExistingBlock(bool on)inline
blockNamePrefix
Section titled “blockNamePrefix”QString RClipboardOperation::blockNamePrefixprivate
blockOwnership
Section titled “blockOwnership”bool RClipboardOperation::blockOwnershipprivate
copiedBlockContents
Section titled “copiedBlockContents”QSet<RObject::Id> RClipboardOperation::copiedBlockContentsprivate
copiedBlocks
Section titled “copiedBlocks”QMap<QString, QSharedPointer<RBlock> > RClipboardOperation::copiedBlocksprivate
copiedLayers
Section titled “copiedLayers”QMap<QString, QSharedPointer<RLayer> > RClipboardOperation::copiedLayersprivate
copiedLinetypes
Section titled “copiedLinetypes”QMap<QString, QSharedPointer<RLinetype> > RClipboardOperation::copiedLinetypesprivate
copyAllLayers
Section titled “copyAllLayers”bool RClipboardOperation::copyAllLayersprivate
copyEmptyBlocks
Section titled “copyEmptyBlocks”bool RClipboardOperation::copyEmptyBlocksprivate
createBlockReference
Section titled “createBlockReference”bool RClipboardOperation::createBlockReferenceprivate
customEntityType
Section titled “customEntityType”RS::EntityType RClipboardOperation::customEntityTypeprivate
keepSelection
Section titled “keepSelection”bool RClipboardOperation::keepSelectionprivate
layerNamePrefix
Section titled “layerNamePrefix”QString RClipboardOperation::layerNamePrefixprivate
useExistingBlock
Section titled “useExistingBlock”bool RClipboardOperation::useExistingBlockprivate