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 = true);
47 
48  void deleteObject(const QSharedPointer<RObject>& o);
49 
50  virtual RTransaction apply(RDocument& document, bool preview = false);
51 
52 private:
53  QList<QSharedPointer<RObject> > list;
54 };
55 
57 
58 #endif
RTransaction.h
RObject
Abstract base class for all objects.
Definition: RObject.h:61
operations_global.h
ROperation.h
ROperation::apply
virtual RTransaction apply(RDocument &document, bool preview=false)=0
Applies this operation to selection in the given document.
QCADOPERATIONS_EXPORT
#define QCADOPERATIONS_EXPORT
Definition: operations_global.h:10
RDocument.h
RDeleteObjectsOperation::~RDeleteObjectsOperation
virtual ~RDeleteObjectsOperation()
Definition: RDeleteObjectsOperation.h:46
RDeleteObjectsOperation
Implementation of an operation that deletes entities.
Definition: RDeleteObjectsOperation.h:42
RVector.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RDocument
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition: RDocument.h:72
RExporter.h
RDeleteObjectsOperation::list
QList< QSharedPointer< RObject > > list
Definition: RDeleteObjectsOperation.h:53
ROperation
This abstract class is an interface for all operation implementations.
Definition: ROperation.h:44
deleteObject
void deleteObject(void obj)
Deletes the given RObject from the drawing.
Definition: simple_create.js:199
RTransaction
Transaction implementation.
Definition: RTransaction.h:74