QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RClipboardOperation.h
Go to the documentation of this file.
1 
20 #ifndef RCLIPBOARDOPERATION_H
21 #define RCLIPBOARDOPERATION_H
22 
23 #include "operations_global.h"
24 
25 #include <QMap>
26 
27 #include "RDocument.h"
28 #include "REntity.h"
29 #include "RExporter.h"
30 #include "ROperation.h"
31 #include "RVector.h"
32 
33 typedef QMap<QString, QString> RQMapQStringQString;
34 
35 #define RDEFAULT_QMAP_QSTRING_QSTRING RQMapQStringQString()
36 
45 public:
47  virtual ~RClipboardOperation() {}
48 
49 protected:
50  void copy(
51  RDocument& src, RDocument& dest,
52  const RVector& offset,
53  double scale,
54  double rotation,
55  bool flipHorizontal,
56  bool flipVertical,
57  bool toCurrentLayer,
58  bool toCurrentBlock,
59  bool overwriteLayers,
60  bool overwriteBlocks,
61  const QString& blockName,
62  RTransaction& transaction,
63  bool selectionOnly, bool clear,
64  bool toModelSpaceBlock,
65  bool preview,
67  ) const;
68 
69  void copyEntity(
70  REntity& entity,
71  RDocument& src, RDocument& dest,
72  const RVector& offset,
73  double scale,
74  double unitScale,
75  double rotation,
76  bool flipHorizontal,
77  bool flipVertical,
78  bool toCurrentLayer,
79  bool toCurrentBlock,
80  bool overwriteLayers,
81  bool overwriteBlocks,
82  const QString& blockName,
83  RTransaction& transaction,
84  bool toModelSpaceBlock
85  ) const;
86 
87  QSharedPointer<RLayer> copyEntityLayer(
88  REntity& entity,
89  RDocument& src,
90  RDocument& dest,
91  bool overwriteLayers,
92  RTransaction& transaction
93  ) const;
94 
95 private:
96  mutable QMap<QString, QSharedPointer<RLayer> > copiedLayers;
97  mutable QMap<QString, QSharedPointer<RBlock> > copiedBlocks;
98 
99 };
100 
102 
103 #endif