QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ROperation Class Reference

This abstract class is an interface for all operation implementations. More...

#include <ROperation.h>

Inheritance diagram for ROperation:
RRequireHeap RNonCopyable RAddObjectsOperation RChangePropertyOperation RClipboardOperation RDeleteAllEntitiesOperation RDeleteObjectsOperation RMixedOperation RMoveReferencePointOperation RMoveSelectionOperation

List of all members.

Public Member Functions

virtual RTransaction apply (RDocument &document, bool preview=false) const =0
 Applies this operation to selection in the given document.
RS::EntityType getEntityTypeFilter () const
 ROperation (bool undoable=true, RS::EntityType entityTypeFilter=RS::EntityAll)
void setAllowInvisible (bool on)
void setRecordAffectedObjects (bool on)
void setSpatialIndexDisabled (bool on)
virtual ~ROperation ()
- Public Member Functions inherited from RRequireHeap
void doDelete ()

Protected Attributes

bool allowInvisible
RS::EntityType entityTypeFilter
bool recordAffectedObjects
bool spatialIndexDisabled
bool undoable

Additional Inherited Members

- Protected Member Functions inherited from RRequireHeap
virtual ~RRequireHeap ()

Detailed 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 wrapped for script environments.

Constructor & Destructor Documentation

ROperation::ROperation ( bool  undoable = true,
RS::EntityType  entityTypeFilter = RS::EntityAll 
)
inline
virtual ROperation::~ROperation ( )
inlinevirtual

Member Function Documentation

virtual RTransaction ROperation::apply ( RDocument document,
bool  preview = false 
) const
pure 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.

Implemented in RPasteOperation, RAddObjectsOperation, RMixedOperation, RChangePropertyOperation, RDeleteObjectsOperation, RDeleteAllEntitiesOperation, RMoveSelectionOperation, RMoveReferencePointOperation, RCopyOperation, and RDeleteSelectionOperation.

RS::EntityType ROperation::getEntityTypeFilter ( ) const
inline
void ROperation::setAllowInvisible ( bool  on)
inline
void ROperation::setRecordAffectedObjects ( bool  on)
inline
void ROperation::setSpatialIndexDisabled ( bool  on)
inline

Member Data Documentation

bool ROperation::allowInvisible
protected
RS::EntityType ROperation::entityTypeFilter
protected
bool ROperation::recordAffectedObjects
protected
bool ROperation::spatialIndexDisabled
protected
bool ROperation::undoable
protected

The documentation for this class was generated from the following file: