ROperation
Class in Core Module
Header: #include <src/core/ROperation.h>
Inherits: RRequireHeap, RNonCopyable (private)
Inherited by: RAddObjectsOperation, RChangePropertyOperation, RClickReferencePointOperation, RClipboardOperation, RDeleteAllEntitiesOperation, RDeleteObjectsOperation, RMixedOperation, RMoveReferencePointOperation, RMoveSelectionOperation, RMultiOperation, RScaleSelectionOperation
Description
Section titled “Description”This abstract class is an interface for all operation implementations.
An operation encapsulates a modification that can be applied to a document. An implementing class might for example implement a move operation that moves all selected entities by a given vector.
Scriptable: This class is available in script environments.
Public Functions
Section titled “Public Functions”ROperation(bool undoable=true, RS::EntityType entityTypeFilter=RS::EntityAll) |
|
| virtual | ~ROperation() |
| virtual RTransaction | apply(RDocument &document, bool preview=false)=0 = 0Applies this operation to selection in the given document. |
| RS::EntityType | getEntityTypeFilter() const |
| QString | getText() const |
| int | getTransactionGroup() const |
| bool | getTransactionType(RTransaction::Type t) const |
| RTransaction::Types | getTransactionTypes() const |
| void | setAllowAll(bool on) |
| void | setAllowInvisible(bool on) |
| void | setKeepChildren(bool on)Keep child entities (e.g. |
| void | setRecordAffectedObjects(bool on) |
| void | setSpatialIndexDisabled(bool on) |
| void | setText(const QString &t) |
| void | setTransactionGroup(int g) |
| void | setTransactionType(RTransaction::Type t, bool on=true) |
Protected Attributes
Section titled “Protected Attributes”| bool | allowAll |
| bool | allowInvisible |
| RS::EntityType | entityTypeFilter |
| bool | keepChildren |
| bool | recordAffectedObjects |
| bool | spatialIndexDisabled |
| QString | text |
| int | transactionGroup |
| RTransaction::Types | transactionTypes |
| bool | undoable |
Member Documentation
Section titled “Member Documentation”ROperation
Section titled “ROperation”ROperation::ROperation(bool undoable=true, RS::EntityType entityTypeFilter=RS::EntityAll)inline
~ROperation
Section titled “~ROperation”virtual ROperation::~ROperation()virtual inline
virtual RTransaction ROperation::apply(RDocument &document, bool preview=false)=0 = 0pure virtual
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 in apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply.
getEntityTypeFilter
Section titled “getEntityTypeFilter”RS::EntityType ROperation::getEntityTypeFilter() constinline const
getText
Section titled “getText”QString ROperation::getText() constinline const
getTransactionGroup
Section titled “getTransactionGroup”int ROperation::getTransactionGroup() constinline const
getTransactionType
Section titled “getTransactionType”bool ROperation::getTransactionType(RTransaction::Type t) constinline const
getTransactionTypes
Section titled “getTransactionTypes”RTransaction::Types ROperation::getTransactionTypes() constinline const
setAllowAll
Section titled “setAllowAll”void ROperation::setAllowAll(bool on)inline
setAllowInvisible
Section titled “setAllowInvisible”void ROperation::setAllowInvisible(bool on)inline
setKeepChildren
Section titled “setKeepChildren”void ROperation::setKeepChildren(bool on)inline
Keep child entities (e.g.
keep block attributes when deleting block references)
setRecordAffectedObjects
Section titled “setRecordAffectedObjects”void ROperation::setRecordAffectedObjects(bool on)inline
setSpatialIndexDisabled
Section titled “setSpatialIndexDisabled”void ROperation::setSpatialIndexDisabled(bool on)inline
setText
Section titled “setText”void ROperation::setText(const QString &t)inline
setTransactionGroup
Section titled “setTransactionGroup”void ROperation::setTransactionGroup(int g)inline
setTransactionType
Section titled “setTransactionType”void ROperation::setTransactionType(RTransaction::Type t, bool on=true)inline
allowAll
Section titled “allowAll”bool ROperation::allowAllprotected
allowInvisible
Section titled “allowInvisible”bool ROperation::allowInvisibleprotected
entityTypeFilter
Section titled “entityTypeFilter”RS::EntityType ROperation::entityTypeFilterprotected
keepChildren
Section titled “keepChildren”bool ROperation::keepChildrenprotected
recordAffectedObjects
Section titled “recordAffectedObjects”bool ROperation::recordAffectedObjectsprotected
spatialIndexDisabled
Section titled “spatialIndexDisabled”bool ROperation::spatialIndexDisabledprotected
QString ROperation::textprotected
transactionGroup
Section titled “transactionGroup”int ROperation::transactionGroupprotected
transactionTypes
Section titled “transactionTypes”RTransaction::Types ROperation::transactionTypesprotected
undoable
Section titled “undoable”bool ROperation::undoableprotected