QCAD
Open Source 2D CAD
RDeleteObjectsOperation.h
Go to the documentation of this file.
1 
20 #ifndef RDELETEOBJECTSOPERATION_H
21 #define RDELETEOBJECTSOPERATION_H
22 
23 #include "operations_global.h"
24 
25 #include <QList>
26 #include <QSharedPointer>
27 
28 #include "RDocument.h"
29 #include "RExporter.h"
30 #include "ROperation.h"
31 #include "RTransaction.h"
32 #include "RVector.h"
33 
34 class RObject;
35 
43 public:
44  RDeleteObjectsOperation(bool undoable = true);
45  RDeleteObjectsOperation(QList<QSharedPointer<RObject> >& list, bool undoable =
46  true);
48  }
49 
50  void deleteObject(const QSharedPointer<RObject>& o);
51 
52  virtual RTransaction apply(RDocument& document, bool preview = false) const;
53  virtual void preview(RDocument& document, RExporter& exporter) const;
54 
55 private:
56  QList<QSharedPointer<RObject> > list;
57 };
58 
60 
61 #endif
This abstract class is an interface for all operation implementations.
Definition: ROperation.h:44
Abstract base class for all objects.
Definition: RObject.h:48
Transaction implementation.
Definition: RTransaction.h:70
QList< QSharedPointer< RObject > > list
Definition: RDeleteObjectsOperation.h:56
virtual RTransaction apply(RDocument &document, bool preview=false) const =0
Applies this operation to selection in the given document.
virtual ~RDeleteObjectsOperation()
Definition: RDeleteObjectsOperation.h:47
#define QCADOPERATIONS_EXPORT
Definition: operations_global.h:10
Implementation of an operation that deletes entities.
Definition: RDeleteObjectsOperation.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 *)
Abstract base class for exporters.
Definition: RExporter.h:63