QCAD
Open Source 2D CAD
RCopyOperation.h
Go to the documentation of this file.
1 
20 #ifndef RCOPYOPERATION_H
21 #define RCOPYOPERATION_H
22 
23 #include "operations_global.h"
24 
25 #include "RDocument.h"
26 #include "REntity.h"
27 #include "RExporter.h"
28 #include "RClipboardOperation.h"
29 #include "RVector.h"
30 
31 
40 public:
41  RCopyOperation(const RVector& offset, RDocument& src);
42  virtual ~RCopyOperation() {}
43 
44  virtual RTransaction apply(RDocument& document, bool preview = false) const;
45  virtual void preview(RDocument& document, RExporter& exporter) const;
46 
47  void setClear(bool on) {
48  clear = on;
49  }
50 
51 private:
52  bool clear;
55 };
56 
58 
59 #endif
void setClear(bool on)
Definition: RCopyOperation.h:47
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
RVector offset
Definition: RCopyOperation.h:53
Transaction implementation.
Definition: RTransaction.h:70
virtual RTransaction apply(RDocument &document, bool preview=false) const =0
Applies this operation to selection in the given document.
#define QCADOPERATIONS_EXPORT
Definition: operations_global.h:10
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RCopyOperation.h:39
virtual ~RCopyOperation()
Definition: RCopyOperation.h:42
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:63
Q_DECLARE_METATYPE(RMath *)
RDocument & src
Definition: RCopyOperation.h:54
Abstract base class for exporters.
Definition: RExporter.h:63
bool clear
Definition: RCopyOperation.h:52
Base class for clipboard related operations (copy, cut, paste).
Definition: RClipboardOperation.h:44