QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RAddObjectsOperation.h
Go to the documentation of this file.
1 #ifndef RADDOBJECTSOPERATION_H
2 #define RADDOBJECTSOPERATION_H
3 
4 #include <QList>
5 #include <QSharedPointer>
6 
7 #include "RDocument.h"
8 #include "RExporter.h"
9 #include "ROperation.h"
10 #include "RTransaction.h"
11 #include "RVector.h"
12 
13 class RObject;
14 
22 public:
23  RAddObjectsOperation(bool undoable = true);
24  RAddObjectsOperation(QList<QSharedPointer<RObject> >& list,
25  bool useCurrentAttributes = true, bool undoable = true);
27  }
28 
29  void addObject(const QSharedPointer<RObject>& object,
30  bool useCurrentAttributes = true);
31 
32  virtual RTransaction apply(RDocument& document, bool preview = false) const;
33 
34  int getPreviewCounter() const {
35  return previewCounter;
36  }
37 
38  void setLimitPreview(bool on) {
39  limitPreview = on;
40  }
41 
42 private:
43  QList<QPair<QSharedPointer<RObject>, bool> > list;
46 };
47 
49 
50 #endif